Skip to content

Commit 1bd8355

Browse files
Update groupcast-cluster.xml (project-chip#41294)
* Update Groupcast-cluster.xml with alchemy base on lastest spec changes * run regen all
1 parent 8a83b98 commit 1bd8355

File tree

15 files changed

+119
-105
lines changed

15 files changed

+119
-105
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ limitations under the License.
1818
XML generated by Alchemy; DO NOT EDIT.
1919
Source: src/service_device_management/Groupcast.adoc
2020
Parameters: zap attribute=in-progress sdkRoot=./connectedhomeip specRoot=./connectedhomeip-spec ./connectedhomeip-spec/src/service_device_management/Groupcast.adoc
21-
Git: 0.9-fall2025-1539-ga6b4c9b4a-dirty
22-
Alchemy: v1.5.47
21+
Git: 0.9-fall2025-1635-g57838cc81
22+
Alchemy: v1.5.53
2323
-->
2424
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
2525
<domain name="General"/>
@@ -66,8 +66,8 @@ Alchemy: v1.5.47
6666
<access op="invoke" privilege="manage"/>
6767
<arg id="0" name="GroupID" type="group_id" min="1"/>
6868
<arg id="1" name="Endpoints" array="true" type="endpoint_no"/>
69-
<arg id="2" name="Key" type="octet_string" length="16" minLength="16"/>
70-
<arg id="3" name="KeyID" type="int32u"/>
69+
<arg id="2" name="KeyID" type="int32u"/>
70+
<arg id="3" name="Key" type="octet_string" optional="true" length="16" minLength="16"/>
7171
<arg id="4" name="GracePeriod" type="epoch_s" optional="true" max="86400"/>
7272
<arg id="5" name="UseAuxiliaryACL" type="boolean" optional="true"/>
7373
<otherwiseConform>
@@ -99,11 +99,11 @@ Alchemy: v1.5.47
9999
</command>
100100

101101
<command code="0x03" source="client" name="UpdateGroupKey" isFabricScoped="true">
102-
<description>This command SHALL allow a fabric maintainer to update the group operational key for an existing group ID that the server is a member of.</description>
102+
<description>This command SHALL allow a fabric maintainer to update the OperationalGroupKey for an existing group ID that the server is a member of.</description>
103103
<access op="invoke" privilege="manage"/>
104104
<arg id="0" name="GroupID" type="group_id" min="1"/>
105-
<arg id="1" name="Key" type="octet_string" length="16" minLength="16"/>
106-
<arg id="2" name="KeyID" type="int32u"/>
105+
<arg id="1" name="KeyID" type="int32u"/>
106+
<arg id="2" name="Key" type="octet_string" optional="true" length="16" minLength="16"/>
107107
<arg id="3" name="GracePeriod" type="epoch_s" optional="true"/>
108108
<otherwiseConform>
109109
<provisionalConform/>

src/controller/data_model/controller-clusters.matter

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4373,8 +4373,8 @@ cluster Groupcast = 101 {
43734373
request struct JoinGroupRequest {
43744374
group_id groupID = 0;
43754375
endpoint_no endpoints[] = 1;
4376-
octet_string<16> key = 2;
4377-
int32u keyID = 3;
4376+
int32u keyID = 2;
4377+
optional octet_string<16> key = 3;
43784378
optional epoch_s gracePeriod = 4;
43794379
optional boolean useAuxiliaryACL = 5;
43804380
}
@@ -4392,8 +4392,8 @@ cluster Groupcast = 101 {
43924392

43934393
request struct UpdateGroupKeyRequest {
43944394
group_id groupID = 0;
4395-
octet_string<16> key = 1;
4396-
int32u keyID = 2;
4395+
int32u keyID = 1;
4396+
optional octet_string<16> key = 2;
43974397
optional epoch_s gracePeriod = 3;
43984398
}
43994399

@@ -4410,7 +4410,7 @@ cluster Groupcast = 101 {
44104410
fabric command access(invoke: manage) JoinGroup(JoinGroupRequest): DefaultSuccess = 0;
44114411
/** 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. */
44124412
fabric command access(invoke: manage) LeaveGroup(LeaveGroupRequest): LeaveGroupResponse = 1;
4413-
/** This command SHALL allow a fabric maintainer to update the group operational key for an existing group ID that the server is a member of. */
4413+
/** This command SHALL allow a fabric maintainer to update the OperationalGroupKey for an existing group ID that the server is a member of. */
44144414
fabric command access(invoke: manage) UpdateGroupKey(UpdateGroupKeyRequest): DefaultSuccess = 3;
44154415
/** This command SHALL allow a fabric maintainer to expire the grace period of the previous key for an existing group ID that the server is a member of. */
44164416
fabric command access(invoke: manage) ExpireGracePeriod(ExpireGracePeriodRequest): DefaultSuccess = 4;

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

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24979,11 +24979,11 @@ public long initWithDevice(long devicePtr, int endpointId) {
2497924979
return 0L;
2498024980
}
2498124981

24982-
public void joinGroup(DefaultClusterCallback callback, Integer groupID, ArrayList<Integer> endpoints, byte[] key, Long keyID, Optional<Long> gracePeriod, Optional<Boolean> useAuxiliaryACL) {
24983-
joinGroup(callback, groupID, endpoints, key, keyID, gracePeriod, useAuxiliaryACL, 0);
24982+
public void joinGroup(DefaultClusterCallback callback, Integer groupID, ArrayList<Integer> endpoints, Long keyID, Optional<byte[]> key, Optional<Long> gracePeriod, Optional<Boolean> useAuxiliaryACL) {
24983+
joinGroup(callback, groupID, endpoints, keyID, key, gracePeriod, useAuxiliaryACL, 0);
2498424984
}
2498524985

24986-
public void joinGroup(DefaultClusterCallback callback, Integer groupID, ArrayList<Integer> endpoints, byte[] key, Long keyID, Optional<Long> gracePeriod, Optional<Boolean> useAuxiliaryACL, int timedInvokeTimeoutMs) {
24986+
public void joinGroup(DefaultClusterCallback callback, Integer groupID, ArrayList<Integer> endpoints, Long keyID, Optional<byte[]> key, Optional<Long> gracePeriod, Optional<Boolean> useAuxiliaryACL, int timedInvokeTimeoutMs) {
2498724987
final long commandId = 0L;
2498824988

2498924989
ArrayList<StructElement> elements = new ArrayList<>();
@@ -24995,14 +24995,14 @@ public void joinGroup(DefaultClusterCallback callback, Integer groupID, ArrayLis
2499524995
BaseTLVType endpointstlvValue = ArrayType.generateArrayType(endpoints, (elementendpoints) -> new UIntType(elementendpoints));
2499624996
elements.add(new StructElement(endpointsFieldID, endpointstlvValue));
2499724997

24998-
final long keyFieldID = 2L;
24999-
BaseTLVType keytlvValue = new ByteArrayType(key);
25000-
elements.add(new StructElement(keyFieldID, keytlvValue));
25001-
25002-
final long keyIDFieldID = 3L;
24998+
final long keyIDFieldID = 2L;
2500324999
BaseTLVType keyIDtlvValue = new UIntType(keyID);
2500425000
elements.add(new StructElement(keyIDFieldID, keyIDtlvValue));
2500525001

25002+
final long keyFieldID = 3L;
25003+
BaseTLVType keytlvValue = key.<BaseTLVType>map((nonOptionalkey) -> new ByteArrayType(nonOptionalkey)).orElse(new EmptyType());
25004+
elements.add(new StructElement(keyFieldID, keytlvValue));
25005+
2500625006
final long gracePeriodFieldID = 4L;
2500725007
BaseTLVType gracePeriodtlvValue = gracePeriod.<BaseTLVType>map((nonOptionalgracePeriod) -> new UIntType(nonOptionalgracePeriod)).orElse(new EmptyType());
2500825008
elements.add(new StructElement(gracePeriodFieldID, gracePeriodtlvValue));
@@ -25067,26 +25067,26 @@ public void onResponse(StructType invokeStructValue) {
2506725067
}}, commandId, commandArgs, timedInvokeTimeoutMs);
2506825068
}
2506925069

25070-
public void updateGroupKey(DefaultClusterCallback callback, Integer groupID, byte[] key, Long keyID, Optional<Long> gracePeriod) {
25071-
updateGroupKey(callback, groupID, key, keyID, gracePeriod, 0);
25070+
public void updateGroupKey(DefaultClusterCallback callback, Integer groupID, Long keyID, Optional<byte[]> key, Optional<Long> gracePeriod) {
25071+
updateGroupKey(callback, groupID, keyID, key, gracePeriod, 0);
2507225072
}
2507325073

25074-
public void updateGroupKey(DefaultClusterCallback callback, Integer groupID, byte[] key, Long keyID, Optional<Long> gracePeriod, int timedInvokeTimeoutMs) {
25074+
public void updateGroupKey(DefaultClusterCallback callback, Integer groupID, Long keyID, Optional<byte[]> key, Optional<Long> gracePeriod, int timedInvokeTimeoutMs) {
2507525075
final long commandId = 3L;
2507625076

2507725077
ArrayList<StructElement> elements = new ArrayList<>();
2507825078
final long groupIDFieldID = 0L;
2507925079
BaseTLVType groupIDtlvValue = new UIntType(groupID);
2508025080
elements.add(new StructElement(groupIDFieldID, groupIDtlvValue));
2508125081

25082-
final long keyFieldID = 1L;
25083-
BaseTLVType keytlvValue = new ByteArrayType(key);
25084-
elements.add(new StructElement(keyFieldID, keytlvValue));
25085-
25086-
final long keyIDFieldID = 2L;
25082+
final long keyIDFieldID = 1L;
2508725083
BaseTLVType keyIDtlvValue = new UIntType(keyID);
2508825084
elements.add(new StructElement(keyIDFieldID, keyIDtlvValue));
2508925085

25086+
final long keyFieldID = 2L;
25087+
BaseTLVType keytlvValue = key.<BaseTLVType>map((nonOptionalkey) -> new ByteArrayType(nonOptionalkey)).orElse(new EmptyType());
25088+
elements.add(new StructElement(keyFieldID, keytlvValue));
25089+
2509025090
final long gracePeriodFieldID = 3L;
2509125091
BaseTLVType gracePeriodtlvValue = gracePeriod.<BaseTLVType>map((nonOptionalgracePeriod) -> new UIntType(nonOptionalgracePeriod)).orElse(new EmptyType());
2509225092
elements.add(new StructElement(gracePeriodFieldID, gracePeriodtlvValue));

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8542,7 +8542,7 @@ public static Command value(long id) throws NoSuchFieldError {
85428542
}
85438543
throw new NoSuchFieldError();
85448544
}
8545-
}public enum JoinGroupCommandField {GroupID(0),Endpoints(1),Key(2),KeyID(3),GracePeriod(4),UseAuxiliaryACL(5),;
8545+
}public enum JoinGroupCommandField {GroupID(0),Endpoints(1),KeyID(2),Key(3),GracePeriod(4),UseAuxiliaryACL(5),;
85468546
private final int id;
85478547
JoinGroupCommandField(int id) {
85488548
this.id = id;
@@ -8576,7 +8576,7 @@ public static LeaveGroupCommandField value(int id) throws NoSuchFieldError {
85768576
}
85778577
throw new NoSuchFieldError();
85788578
}
8579-
}public enum UpdateGroupKeyCommandField {GroupID(0),Key(1),KeyID(2),GracePeriod(3),;
8579+
}public enum UpdateGroupKeyCommandField {GroupID(0),KeyID(1),Key(2),GracePeriod(3),;
85808580
private final int id;
85818581
UpdateGroupKeyCommandField(int id) {
85828582
this.id = id;

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26188,12 +26188,12 @@ public Map<String, Map<String, InteractionInfo>> getCommandMap() {
2618826188
CommandParameterInfo groupcastjoinGroupendpointsCommandParameterInfo = new CommandParameterInfo("endpoints", ArrayList.class, ArrayList.class);
2618926189
groupcastjoinGroupCommandParams.put("endpoints",groupcastjoinGroupendpointsCommandParameterInfo);
2619026190

26191-
CommandParameterInfo groupcastjoinGroupkeyCommandParameterInfo = new CommandParameterInfo("key", byte[].class, byte[].class);
26192-
groupcastjoinGroupCommandParams.put("key",groupcastjoinGroupkeyCommandParameterInfo);
26193-
2619426191
CommandParameterInfo groupcastjoinGroupkeyIDCommandParameterInfo = new CommandParameterInfo("keyID", Long.class, Long.class);
2619526192
groupcastjoinGroupCommandParams.put("keyID",groupcastjoinGroupkeyIDCommandParameterInfo);
2619626193

26194+
CommandParameterInfo groupcastjoinGroupkeyCommandParameterInfo = new CommandParameterInfo("key", Optional.class, byte[].class);
26195+
groupcastjoinGroupCommandParams.put("key",groupcastjoinGroupkeyCommandParameterInfo);
26196+
2619726197
CommandParameterInfo groupcastjoinGroupgracePeriodCommandParameterInfo = new CommandParameterInfo("gracePeriod", Optional.class, Long.class);
2619826198
groupcastjoinGroupCommandParams.put("gracePeriod",groupcastjoinGroupgracePeriodCommandParameterInfo);
2619926199

@@ -26207,10 +26207,10 @@ public Map<String, Map<String, InteractionInfo>> getCommandMap() {
2620726207
commandArguments.get("groupID")
2620826208
, (ArrayList<Integer>)
2620926209
commandArguments.get("endpoints")
26210-
, (byte[])
26211-
commandArguments.get("key")
2621226210
, (Long)
2621326211
commandArguments.get("keyID")
26212+
, (Optional<byte[]>)
26213+
commandArguments.get("key")
2621426214
, (Optional<Long>)
2621526215
commandArguments.get("gracePeriod")
2621626216
, (Optional<Boolean>)
@@ -26251,12 +26251,12 @@ public Map<String, Map<String, InteractionInfo>> getCommandMap() {
2625126251
CommandParameterInfo groupcastupdateGroupKeygroupIDCommandParameterInfo = new CommandParameterInfo("groupID", Integer.class, Integer.class);
2625226252
groupcastupdateGroupKeyCommandParams.put("groupID",groupcastupdateGroupKeygroupIDCommandParameterInfo);
2625326253

26254-
CommandParameterInfo groupcastupdateGroupKeykeyCommandParameterInfo = new CommandParameterInfo("key", byte[].class, byte[].class);
26255-
groupcastupdateGroupKeyCommandParams.put("key",groupcastupdateGroupKeykeyCommandParameterInfo);
26256-
2625726254
CommandParameterInfo groupcastupdateGroupKeykeyIDCommandParameterInfo = new CommandParameterInfo("keyID", Long.class, Long.class);
2625826255
groupcastupdateGroupKeyCommandParams.put("keyID",groupcastupdateGroupKeykeyIDCommandParameterInfo);
2625926256

26257+
CommandParameterInfo groupcastupdateGroupKeykeyCommandParameterInfo = new CommandParameterInfo("key", Optional.class, byte[].class);
26258+
groupcastupdateGroupKeyCommandParams.put("key",groupcastupdateGroupKeykeyCommandParameterInfo);
26259+
2626026260
CommandParameterInfo groupcastupdateGroupKeygracePeriodCommandParameterInfo = new CommandParameterInfo("gracePeriod", Optional.class, Long.class);
2626126261
groupcastupdateGroupKeyCommandParams.put("gracePeriod",groupcastupdateGroupKeygracePeriodCommandParameterInfo);
2626226262
InteractionInfo groupcastupdateGroupKeyInteractionInfo = new InteractionInfo(
@@ -26265,10 +26265,10 @@ public Map<String, Map<String, InteractionInfo>> getCommandMap() {
2626526265
.updateGroupKey((DefaultClusterCallback) callback
2626626266
, (Integer)
2626726267
commandArguments.get("groupID")
26268-
, (byte[])
26269-
commandArguments.get("key")
2627026268
, (Long)
2627126269
commandArguments.get("keyID")
26270+
, (Optional<byte[]>)
26271+
commandArguments.get("key")
2627226272
, (Optional<Long>)
2627326273
commandArguments.get("gracePeriod")
2627426274
);

src/controller/java/generated/java/matter/controller/cluster/clusters/GroupcastCluster.kt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ class GroupcastCluster(private val controller: MatterController, private val end
9090
suspend fun joinGroup(
9191
groupID: UShort,
9292
endpoints: List<UShort>,
93-
key: ByteArray,
9493
keyID: UInt,
94+
key: ByteArray?,
9595
gracePeriod: UInt?,
9696
useAuxiliaryACL: Boolean?,
9797
timedInvokeTimeout: Duration? = null,
@@ -111,12 +111,12 @@ class GroupcastCluster(private val controller: MatterController, private val end
111111
}
112112
tlvWriter.endArray()
113113

114-
val TAG_KEY_REQ: Int = 2
115-
tlvWriter.put(ContextSpecificTag(TAG_KEY_REQ), key)
116-
117-
val TAG_KEY_ID_REQ: Int = 3
114+
val TAG_KEY_ID_REQ: Int = 2
118115
tlvWriter.put(ContextSpecificTag(TAG_KEY_ID_REQ), keyID)
119116

117+
val TAG_KEY_REQ: Int = 3
118+
key?.let { tlvWriter.put(ContextSpecificTag(TAG_KEY_REQ), key) }
119+
120120
val TAG_GRACE_PERIOD_REQ: Int = 4
121121
gracePeriod?.let { tlvWriter.put(ContextSpecificTag(TAG_GRACE_PERIOD_REQ), gracePeriod) }
122122

@@ -236,8 +236,8 @@ class GroupcastCluster(private val controller: MatterController, private val end
236236

237237
suspend fun updateGroupKey(
238238
groupID: UShort,
239-
key: ByteArray,
240239
keyID: UInt,
240+
key: ByteArray?,
241241
gracePeriod: UInt?,
242242
timedInvokeTimeout: Duration? = null,
243243
) {
@@ -249,12 +249,12 @@ class GroupcastCluster(private val controller: MatterController, private val end
249249
val TAG_GROUP_ID_REQ: Int = 0
250250
tlvWriter.put(ContextSpecificTag(TAG_GROUP_ID_REQ), groupID)
251251

252-
val TAG_KEY_REQ: Int = 1
253-
tlvWriter.put(ContextSpecificTag(TAG_KEY_REQ), key)
254-
255-
val TAG_KEY_ID_REQ: Int = 2
252+
val TAG_KEY_ID_REQ: Int = 1
256253
tlvWriter.put(ContextSpecificTag(TAG_KEY_ID_REQ), keyID)
257254

255+
val TAG_KEY_REQ: Int = 2
256+
key?.let { tlvWriter.put(ContextSpecificTag(TAG_KEY_REQ), key) }
257+
258258
val TAG_GRACE_PERIOD_REQ: Int = 3
259259
gracePeriod?.let { tlvWriter.put(ContextSpecificTag(TAG_GRACE_PERIOD_REQ), gracePeriod) }
260260
tlvWriter.endStructure()

src/controller/python/matter/clusters/CHIPClusters.py

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/controller/python/matter/clusters/Objects.py

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)