Skip to content

Commit 94e7093

Browse files
Update groupcast xml (project-chip#42807)
* Groupcast: Cluster XML updated with alchemy. * Run regen all. * Groupcast: Test updated. * regen all with format --------- Co-authored-by: Junior Martinez <junior.Martinez@silabs.com>
1 parent 23551c3 commit 94e7093

58 files changed

Lines changed: 3405 additions & 123 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/app/clusters/groupcast/tests/TestGroupcastCluster.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ TEST_F(TestGroupcastCluster, TestAttributes)
5959
{
6060
Attributes::Membership::kMetadataEntry,
6161
Attributes::MaxMembershipCount::kMetadataEntry,
62+
Attributes::MaxMcastAddrCount::kMetadataEntry,
63+
Attributes::UsedMcastAddrCount::kMetadataEntry,
64+
Attributes::FabricUnderTest::kMetadataEntry,
6265
}));
6366
}
6467

src/app/zap-templates/zcl/data-model/chip/groupcast-cluster.xml

Lines changed: 78 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,42 @@ limitations under the License.
1717
<!--
1818
XML generated by Alchemy; DO NOT EDIT.
1919
Source: src/service_device_management/Groupcast.adoc
20-
Parameters: zap attribute=in-progress sdkRoot=./connectedhomeip specRoot=./connectedhomeip-spec ./connectedhomeip-spec/src/service_device_management/Groupcast.adoc
21-
Git: 0.9-winter-2026-123-g88ce743bf
20+
Parameters: zap attribute=in-progress spec-root ./spec sdk-root ./ricardo/3 ./spec/src/service_device_management/Groupcast.adoc
21+
Git: 0.9-winter-2026-459-gce0add264
2222
Alchemy: v1.6.8
2323
-->
2424
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
2525
<domain name="General"/>
26+
<enum name="GroupcastTestResultEnum" type="enum8">
27+
<cluster code="0x0065"/>
28+
<item name="Success" value="0x00"/>
29+
<item name="GeneralError" value="0x01"/>
30+
<item name="MessageReplay" value="0x02"/>
31+
<item name="FailedAuth" value="0x03"/>
32+
<item name="NoAvailableKey" value="0x04"/>
33+
<item name="SendFailure" value="0x05"/>
34+
</enum>
35+
36+
<enum name="GroupcastTestingEnum" type="enum8">
37+
<cluster code="0x0065"/>
38+
<item name="DisableTesting" value="0x00"/>
39+
<item name="EnableListenerTesting" value="0x01"/>
40+
<item name="EnableSenderTesting" value="0x02"/>
41+
</enum>
42+
43+
<enum name="MulticastAddrPolicyEnum" type="enum8">
44+
<cluster code="0x0065"/>
45+
<item name="IanaAddr" value="0x00"/>
46+
<item name="PerGroup" value="0x01"/>
47+
</enum>
48+
2649
<struct name="MembershipStruct" apiMaturity="provisional" isFabricScoped="true">
2750
<cluster code="0x0065"/>
2851
<item fieldId="0" name="GroupID" type="group_id" min="1"/>
29-
<item fieldId="1" name="Endpoints" array="true" type="endpoint_no"/>
52+
<item fieldId="1" name="Endpoints" array="true" type="endpoint_no" optional="true" length="255"/>
3053
<item fieldId="2" name="KeySetID" type="int16u" isFabricSensitive="true"/>
31-
<item fieldId="3" name="HasAuxiliaryACL" type="boolean"/>
54+
<item fieldId="3" name="HasAuxiliaryACL" type="boolean" optional="true"/>
55+
<item fieldId="4" name="McastAddrPolicy" type="MulticastAddrPolicyEnum" default="0x00" max="0x01"/>
3256
</struct>
3357

3458
<cluster>
@@ -47,6 +71,9 @@ Alchemy: v1.6.8
4771
<feature bit="1" code="SD" name="Sender" summary="Supports sending multicast message to a targeted group of nodes.">
4872
<optionalConform choice="a" more="true" min="1"/>
4973
</feature>
74+
<feature bit="2" code="PGA" name="PerGroup" summary="Supports PerGroup multicast addresses.">
75+
<optionalConform/>
76+
</feature>
5077
</features>
5178
<attribute code="0x0000" side="server" name="Membership" define="MEMBERSHIP" type="array" entryType="MembershipStruct">
5279
<otherwiseConform>
@@ -60,6 +87,24 @@ Alchemy: v1.6.8
6087
<mandatoryConform/>
6188
</otherwiseConform>
6289
</attribute>
90+
<attribute code="0x0002" side="server" name="MaxMcastAddrCount" define="MAX_MCAST_ADDR_COUNT" type="int16u" min="1">
91+
<otherwiseConform>
92+
<provisionalConform/>
93+
<mandatoryConform/>
94+
</otherwiseConform>
95+
</attribute>
96+
<attribute code="0x0003" side="server" name="UsedMcastAddrCount" define="USED_MCAST_ADDR_COUNT" type="int16u">
97+
<otherwiseConform>
98+
<provisionalConform/>
99+
<mandatoryConform/>
100+
</otherwiseConform>
101+
</attribute>
102+
<attribute code="0x0004" side="server" name="FabricUnderTest" define="FABRIC_UNDER_TEST" type="fabric_idx">
103+
<otherwiseConform>
104+
<provisionalConform/>
105+
<mandatoryConform/>
106+
</otherwiseConform>
107+
</attribute>
63108
<command code="0x00" source="client" name="JoinGroup" isFabricScoped="true">
64109
<description>This command SHALL be used to instruct the server to join a multicast group.</description>
65110
<access op="invoke" privilege="manage"/>
@@ -69,6 +114,7 @@ Alchemy: v1.6.8
69114
<arg id="3" name="Key" type="octet_string" optional="true" length="16" minLength="16"/>
70115
<arg id="4" name="UseAuxiliaryACL" type="boolean" optional="true"/>
71116
<arg id="5" name="ReplaceEndpoints" type="boolean" optional="true"/>
117+
<arg id="6" name="McastAddrPolicy" type="MulticastAddrPolicyEnum" optional="true" max="0x01"/>
72118
<otherwiseConform>
73119
<provisionalConform/>
74120
<mandatoryConform/>
@@ -121,5 +167,33 @@ Alchemy: v1.6.8
121167
</otherwiseConform>
122168
</command>
123169

170+
<command code="0x05" source="client" name="GroupcastTesting" isFabricScoped="true">
171+
<description>This command SHALL allow an Administrator to configure test modes that allow validation of Groupcast communication.</description>
172+
<access op="invoke" privilege="administer"/>
173+
<arg id="0" name="TestOperation" type="GroupcastTestingEnum" max="0x02"/>
174+
<arg id="1" name="DurationSeconds" type="int16u" optional="true" default="60" min="10" max="1200"/>
175+
<otherwiseConform>
176+
<provisionalConform/>
177+
<mandatoryConform/>
178+
</otherwiseConform>
179+
</command>
180+
181+
<event code="0x0000" name="GroupcastTesting" priority="info" side="server" isFabricSensitive="true">
182+
<description>This event SHALL be generated during Groupcast testing processing after invocation of the GroupcastTesting command, under the conditions stated in that command&apos;s Effect on Receipt section.</description>
183+
<access op="read" privilege="administer"/>
184+
<field id="0" name="SourceIpAddress" type="octet_string" optional="true" min="16" max="16"/>
185+
<field id="1" name="DestinationIpAddress" type="octet_string" optional="true" min="16" max="16"/>
186+
<field id="2" name="GroupID" type="group_id" optional="true"/>
187+
<field id="3" name="EndpointID" type="endpoint_no" optional="true"/>
188+
<field id="4" name="ClusterID" type="cluster_id" optional="true"/>
189+
<field id="5" name="ElementID" type="int32u" optional="true"/>
190+
<field id="6" name="AccessAllowed" type="boolean" optional="true"/>
191+
<field id="7" name="GroupcastTestResult" type="GroupcastTestResultEnum" max="0x05"/>
192+
<otherwiseConform>
193+
<provisionalConform/>
194+
<mandatoryConform/>
195+
</otherwiseConform>
196+
</event>
197+
124198
</cluster>
125199
</configurator>

src/controller/data_model/controller-clusters.matter

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4383,21 +4383,58 @@ provisional cluster ScenesManagement = 98 {
43834383
cluster Groupcast = 101 {
43844384
revision 1;
43854385

4386+
enum GroupcastTestResultEnum : enum8 {
4387+
kSuccess = 0;
4388+
kGeneralError = 1;
4389+
kMessageReplay = 2;
4390+
kFailedAuth = 3;
4391+
kNoAvailableKey = 4;
4392+
kSendFailure = 5;
4393+
}
4394+
4395+
enum GroupcastTestingEnum : enum8 {
4396+
kDisableTesting = 0;
4397+
kEnableListenerTesting = 1;
4398+
kEnableSenderTesting = 2;
4399+
}
4400+
4401+
enum MulticastAddrPolicyEnum : enum8 {
4402+
kIanaAddr = 0;
4403+
kPerGroup = 1;
4404+
}
4405+
43864406
bitmap Feature : bitmap32 {
43874407
kListener = 0x1;
43884408
kSender = 0x2;
4409+
kPerGroup = 0x4;
43894410
}
43904411

43914412
fabric_scoped struct MembershipStruct {
43924413
group_id groupID = 0;
4393-
endpoint_no endpoints[] = 1;
4414+
optional endpoint_no endpoints[] = 1;
43944415
fabric_sensitive int16u keySetID = 2;
4395-
boolean hasAuxiliaryACL = 3;
4416+
optional boolean hasAuxiliaryACL = 3;
4417+
MulticastAddrPolicyEnum mcastAddrPolicy = 4;
4418+
fabric_idx fabricIndex = 254;
4419+
}
4420+
4421+
fabric_sensitive info event access(read: administer) GroupcastTesting = 0 {
4422+
optional octet_string sourceIpAddress = 0;
4423+
optional octet_string destinationIpAddress = 1;
4424+
optional group_id groupID = 2;
4425+
optional endpoint_no endpointID = 3;
4426+
optional cluster_id clusterID = 4;
4427+
optional int32u elementID = 5;
4428+
optional boolean accessAllowed = 6;
4429+
GroupcastTestResultEnum groupcastTestResult = 7;
43964430
fabric_idx fabricIndex = 254;
43974431
}
43984432

43994433
readonly attribute MembershipStruct membership[] = 0;
44004434
readonly attribute int16u maxMembershipCount = 1;
4435+
readonly attribute int16u maxMcastAddrCount = 2;
4436+
readonly attribute int16u usedMcastAddrCount = 3;
4437+
readonly attribute fabric_idx fabricUnderTest = 4;
44014438
readonly attribute command_id generatedCommandList[] = 65528;
44024439
readonly attribute command_id acceptedCommandList[] = 65529;
44034440
readonly attribute attrib_id attributeList[] = 65531;
@@ -4411,6 +4448,7 @@ cluster Groupcast = 101 {
44114448
optional octet_string<16> key = 3;
44124449
optional boolean useAuxiliaryACL = 4;
44134450
optional boolean replaceEndpoints = 5;
4451+
optional MulticastAddrPolicyEnum mcastAddrPolicy = 6;
44144452
}
44154453

44164454
request struct LeaveGroupRequest {
@@ -4434,6 +4472,11 @@ cluster Groupcast = 101 {
44344472
boolean useAuxiliaryACL = 1;
44354473
}
44364474

4475+
request struct GroupcastTestingRequest {
4476+
GroupcastTestingEnum testOperation = 0;
4477+
optional int16u durationSeconds = 1;
4478+
}
4479+
44374480
/** This command SHALL be used to instruct the server to join a multicast group. */
44384481
fabric command access(invoke: manage) JoinGroup(JoinGroupRequest): DefaultSuccess = 0;
44394482
/** This command SHALL allow a maintainer to request that the server withdraws itself or specific endpoints from a specific group or from all groups of this client's fabric. */
@@ -4442,6 +4485,8 @@ cluster Groupcast = 101 {
44424485
fabric command access(invoke: manage) UpdateGroupKey(UpdateGroupKeyRequest): DefaultSuccess = 3;
44434486
/** This command SHALL allow an Administrator to enable or disable the generation of AuxiliaryACL entries in the Access Control Cluster based on the groups joined (see Groupcast Auxiliary ACL Handling). */
44444487
fabric command access(invoke: administer) ConfigureAuxiliaryACL(ConfigureAuxiliaryACLRequest): DefaultSuccess = 4;
4488+
/** This command SHALL allow an Administrator to configure test modes that allow validation of Groupcast communication. */
4489+
fabric command access(invoke: administer) GroupcastTesting(GroupcastTestingRequest): DefaultSuccess = 5;
44454490
}
44464491

44474492
/** Attributes and commands for monitoring HEPA filters in a device */

src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java

Lines changed: 112 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25030,6 +25030,9 @@ public static class GroupcastCluster extends BaseChipCluster {
2503025030

2503125031
private static final long MEMBERSHIP_ATTRIBUTE_ID = 0L;
2503225032
private static final long MAX_MEMBERSHIP_COUNT_ATTRIBUTE_ID = 1L;
25033+
private static final long MAX_MCAST_ADDR_COUNT_ATTRIBUTE_ID = 2L;
25034+
private static final long USED_MCAST_ADDR_COUNT_ATTRIBUTE_ID = 3L;
25035+
private static final long FABRIC_UNDER_TEST_ATTRIBUTE_ID = 4L;
2503325036
private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L;
2503425037
private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L;
2503525038
private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L;
@@ -25046,11 +25049,11 @@ public long initWithDevice(long devicePtr, int endpointId) {
2504625049
return 0L;
2504725050
}
2504825051

25049-
public void joinGroup(DefaultClusterCallback callback, Integer groupID, ArrayList<Integer> endpoints, Integer keySetID, Optional<byte[]> key, Optional<Boolean> useAuxiliaryACL, Optional<Boolean> replaceEndpoints) {
25050-
joinGroup(callback, groupID, endpoints, keySetID, key, useAuxiliaryACL, replaceEndpoints, 0);
25052+
public void joinGroup(DefaultClusterCallback callback, Integer groupID, ArrayList<Integer> endpoints, Integer keySetID, Optional<byte[]> key, Optional<Boolean> useAuxiliaryACL, Optional<Boolean> replaceEndpoints, Optional<Integer> mcastAddrPolicy) {
25053+
joinGroup(callback, groupID, endpoints, keySetID, key, useAuxiliaryACL, replaceEndpoints, mcastAddrPolicy, 0);
2505125054
}
2505225055

25053-
public void joinGroup(DefaultClusterCallback callback, Integer groupID, ArrayList<Integer> endpoints, Integer keySetID, Optional<byte[]> key, Optional<Boolean> useAuxiliaryACL, Optional<Boolean> replaceEndpoints, int timedInvokeTimeoutMs) {
25056+
public void joinGroup(DefaultClusterCallback callback, Integer groupID, ArrayList<Integer> endpoints, Integer keySetID, Optional<byte[]> key, Optional<Boolean> useAuxiliaryACL, Optional<Boolean> replaceEndpoints, Optional<Integer> mcastAddrPolicy, int timedInvokeTimeoutMs) {
2505425057
final long commandId = 0L;
2505525058

2505625059
ArrayList<StructElement> elements = new ArrayList<>();
@@ -25078,6 +25081,10 @@ public void joinGroup(DefaultClusterCallback callback, Integer groupID, ArrayLis
2507825081
BaseTLVType replaceEndpointstlvValue = replaceEndpoints.<BaseTLVType>map((nonOptionalreplaceEndpoints) -> new BooleanType(nonOptionalreplaceEndpoints)).orElse(new EmptyType());
2507925082
elements.add(new StructElement(replaceEndpointsFieldID, replaceEndpointstlvValue));
2508025083

25084+
final long mcastAddrPolicyFieldID = 6L;
25085+
BaseTLVType mcastAddrPolicytlvValue = mcastAddrPolicy.<BaseTLVType>map((nonOptionalmcastAddrPolicy) -> new UIntType(nonOptionalmcastAddrPolicy)).orElse(new EmptyType());
25086+
elements.add(new StructElement(mcastAddrPolicyFieldID, mcastAddrPolicytlvValue));
25087+
2508125088
StructType commandArgs = new StructType(elements);
2508225089
invoke(new InvokeCallbackImpl(callback) {
2508325090
@Override
@@ -25179,6 +25186,30 @@ public void onResponse(StructType invokeStructValue) {
2517925186
}}, commandId, commandArgs, timedInvokeTimeoutMs);
2518025187
}
2518125188

25189+
public void groupcastTesting(DefaultClusterCallback callback, Integer testOperation, Optional<Integer> durationSeconds) {
25190+
groupcastTesting(callback, testOperation, durationSeconds, 0);
25191+
}
25192+
25193+
public void groupcastTesting(DefaultClusterCallback callback, Integer testOperation, Optional<Integer> durationSeconds, int timedInvokeTimeoutMs) {
25194+
final long commandId = 5L;
25195+
25196+
ArrayList<StructElement> elements = new ArrayList<>();
25197+
final long testOperationFieldID = 0L;
25198+
BaseTLVType testOperationtlvValue = new UIntType(testOperation);
25199+
elements.add(new StructElement(testOperationFieldID, testOperationtlvValue));
25200+
25201+
final long durationSecondsFieldID = 1L;
25202+
BaseTLVType durationSecondstlvValue = durationSeconds.<BaseTLVType>map((nonOptionaldurationSeconds) -> new UIntType(nonOptionaldurationSeconds)).orElse(new EmptyType());
25203+
elements.add(new StructElement(durationSecondsFieldID, durationSecondstlvValue));
25204+
25205+
StructType commandArgs = new StructType(elements);
25206+
invoke(new InvokeCallbackImpl(callback) {
25207+
@Override
25208+
public void onResponse(StructType invokeStructValue) {
25209+
callback.onSuccess();
25210+
}}, commandId, commandArgs, timedInvokeTimeoutMs);
25211+
}
25212+
2518225213
public interface LeaveGroupResponseCallback extends BaseClusterCallback {
2518325214
void onSuccess(Integer groupID, ArrayList<Integer> endpoints);
2518425215
}
@@ -25256,6 +25287,84 @@ public void onSuccess(byte[] tlv) {
2525625287
}, MAX_MEMBERSHIP_COUNT_ATTRIBUTE_ID, minInterval, maxInterval);
2525725288
}
2525825289

25290+
public void readMaxMcastAddrCountAttribute(
25291+
IntegerAttributeCallback callback) {
25292+
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_MCAST_ADDR_COUNT_ATTRIBUTE_ID);
25293+
25294+
readAttribute(new ReportCallbackImpl(callback, path) {
25295+
@Override
25296+
public void onSuccess(byte[] tlv) {
25297+
Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
25298+
callback.onSuccess(value);
25299+
}
25300+
}, MAX_MCAST_ADDR_COUNT_ATTRIBUTE_ID, true);
25301+
}
25302+
25303+
public void subscribeMaxMcastAddrCountAttribute(
25304+
IntegerAttributeCallback callback, int minInterval, int maxInterval) {
25305+
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_MCAST_ADDR_COUNT_ATTRIBUTE_ID);
25306+
25307+
subscribeAttribute(new ReportCallbackImpl(callback, path) {
25308+
@Override
25309+
public void onSuccess(byte[] tlv) {
25310+
Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
25311+
callback.onSuccess(value);
25312+
}
25313+
}, MAX_MCAST_ADDR_COUNT_ATTRIBUTE_ID, minInterval, maxInterval);
25314+
}
25315+
25316+
public void readUsedMcastAddrCountAttribute(
25317+
IntegerAttributeCallback callback) {
25318+
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, USED_MCAST_ADDR_COUNT_ATTRIBUTE_ID);
25319+
25320+
readAttribute(new ReportCallbackImpl(callback, path) {
25321+
@Override
25322+
public void onSuccess(byte[] tlv) {
25323+
Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
25324+
callback.onSuccess(value);
25325+
}
25326+
}, USED_MCAST_ADDR_COUNT_ATTRIBUTE_ID, true);
25327+
}
25328+
25329+
public void subscribeUsedMcastAddrCountAttribute(
25330+
IntegerAttributeCallback callback, int minInterval, int maxInterval) {
25331+
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, USED_MCAST_ADDR_COUNT_ATTRIBUTE_ID);
25332+
25333+
subscribeAttribute(new ReportCallbackImpl(callback, path) {
25334+
@Override
25335+
public void onSuccess(byte[] tlv) {
25336+
Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
25337+
callback.onSuccess(value);
25338+
}
25339+
}, USED_MCAST_ADDR_COUNT_ATTRIBUTE_ID, minInterval, maxInterval);
25340+
}
25341+
25342+
public void readFabricUnderTestAttribute(
25343+
IntegerAttributeCallback callback) {
25344+
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FABRIC_UNDER_TEST_ATTRIBUTE_ID);
25345+
25346+
readAttribute(new ReportCallbackImpl(callback, path) {
25347+
@Override
25348+
public void onSuccess(byte[] tlv) {
25349+
Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
25350+
callback.onSuccess(value);
25351+
}
25352+
}, FABRIC_UNDER_TEST_ATTRIBUTE_ID, true);
25353+
}
25354+
25355+
public void subscribeFabricUnderTestAttribute(
25356+
IntegerAttributeCallback callback, int minInterval, int maxInterval) {
25357+
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FABRIC_UNDER_TEST_ATTRIBUTE_ID);
25358+
25359+
subscribeAttribute(new ReportCallbackImpl(callback, path) {
25360+
@Override
25361+
public void onSuccess(byte[] tlv) {
25362+
Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
25363+
callback.onSuccess(value);
25364+
}
25365+
}, FABRIC_UNDER_TEST_ATTRIBUTE_ID, minInterval, maxInterval);
25366+
}
25367+
2525925368
public void readGeneratedCommandListAttribute(
2526025369
GeneratedCommandListAttributeCallback callback) {
2526125370
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID);

0 commit comments

Comments
 (0)