[ICD] Update ICD Management Cluster xml to match spec (#28088)
---------
Co-authored-by: Restyled.io <commits@restyled.io>
diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
index 0b0662b..638d709 100644
--- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
+++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
@@ -2432,7 +2432,7 @@
request struct UnregisterClientRequest {
node_id checkInNodeID = 0;
- optional OCTET_STRING<16> key = 1;
+ optional OCTET_STRING<16> verificationKey = 1;
}
response struct RegisterClientResponse = 1 {
diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter
index 7492eb6..5e4a911 100644
--- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter
+++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter
@@ -1938,7 +1938,7 @@
request struct UnregisterClientRequest {
node_id checkInNodeID = 0;
- optional OCTET_STRING<16> key = 1;
+ optional OCTET_STRING<16> verificationKey = 1;
}
response struct RegisterClientResponse = 1 {
diff --git a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter
index 25da4e6..97f09da 100644
--- a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter
+++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter
@@ -1597,7 +1597,7 @@
request struct UnregisterClientRequest {
node_id checkInNodeID = 0;
- optional OCTET_STRING<16> key = 1;
+ optional OCTET_STRING<16> verificationKey = 1;
}
response struct RegisterClientResponse = 1 {
diff --git a/src/app/clusters/icd-management-server/icd-management-server.cpp b/src/app/clusters/icd-management-server/icd-management-server.cpp
index 30fc0b0..5877224 100644
--- a/src/app/clusters/icd-management-server/icd-management-server.cpp
+++ b/src/app/clusters/icd-management-server/icd-management-server.cpp
@@ -228,8 +228,8 @@
{
PersistentStorageDelegate & storage = chip::Server::GetInstance().GetPersistentStorage();
FabricIndex fabric = commandObj->GetAccessingFabricIndex();
- status = IcdManagementServer::GetInstance().UnregisterClient(storage, fabric, commandData.checkInNodeID, commandData.key,
- is_admin);
+ status = IcdManagementServer::GetInstance().UnregisterClient(storage, fabric, commandData.checkInNodeID,
+ commandData.verificationKey, is_admin);
}
commandObj->AddStatus(commandPath, status);
diff --git a/src/app/icd/IcdManagementServer.cpp b/src/app/icd/IcdManagementServer.cpp
index 4d6c11c..1db9006 100644
--- a/src/app/icd/IcdManagementServer.cpp
+++ b/src/app/icd/IcdManagementServer.cpp
@@ -49,7 +49,7 @@
}
Status IcdManagementServer::UnregisterClient(PersistentStorageDelegate & storage, FabricIndex fabric_index, chip::NodeId node_id,
- Optional<chip::ByteSpan> key, bool is_admin)
+ Optional<chip::ByteSpan> verificationKey, bool is_admin)
{
IcdMonitoringTable table(storage, fabric_index, GetClientsSupportedPerFabric());
@@ -62,8 +62,8 @@
// Existing entry: Validate Key if, and only if, the ISD has NOT administrator permissions
if (!is_admin)
{
- VerifyOrReturnError(key.HasValue(), InteractionModel::Status::Failure);
- VerifyOrReturnError(key.Value().data_equal(entry.key), InteractionModel::Status::Failure);
+ VerifyOrReturnError(verificationKey.HasValue(), InteractionModel::Status::Failure);
+ VerifyOrReturnError(verificationKey.Value().data_equal(entry.key), InteractionModel::Status::Failure);
}
err = table.Remove(entry.index);
diff --git a/src/app/icd/IcdManagementServer.h b/src/app/icd/IcdManagementServer.h
index 8d7f4b2..8f08d62 100644
--- a/src/app/icd/IcdManagementServer.h
+++ b/src/app/icd/IcdManagementServer.h
@@ -56,7 +56,7 @@
uint64_t monitored_subject, chip::ByteSpan key, Optional<chip::ByteSpan> verification_key, bool is_admin);
Status UnregisterClient(PersistentStorageDelegate & storage, FabricIndex fabric_index, chip::NodeId node_id,
- Optional<chip::ByteSpan> key, bool is_admin);
+ Optional<chip::ByteSpan> verificationKey, bool is_admin);
Status StayActiveRequest(FabricIndex fabric_index);
diff --git a/src/app/tests/suites/TestIcdManagementCluster.yaml b/src/app/tests/suites/TestIcdManagementCluster.yaml
index 985e943..6b3d29c 100644
--- a/src/app/tests/suites/TestIcdManagementCluster.yaml
+++ b/src/app/tests/suites/TestIcdManagementCluster.yaml
@@ -256,7 +256,7 @@
values:
- name: "CheckInNodeID"
value: 101
- - name: "Key"
+ - name: "VerificationKey"
value: "\x01\x21\x21\x31\x41\x51\x61\x71\x81\x91\xa1\xb1\xc1\xd1\xe1\xf1"
- label: "Read RegisteredClients"
diff --git a/src/app/zap-templates/zcl/data-model/chip/icd-management-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/icd-management-cluster.xml
index f0fcc66..5488f58 100644
--- a/src/app/zap-templates/zcl/data-model/chip/icd-management-cluster.xml
+++ b/src/app/zap-templates/zcl/data-model/chip/icd-management-cluster.xml
@@ -42,7 +42,7 @@
<!-- Current cluster version -->
<globalAttribute side="either" code="0xFFFD" value="1"/>
- <attribute side="server" code="0x00" define="IDLE_MODE_INTERVAL" type="INT32U" min="500" max="86400000" default="500" writable="false" optional="false" isNullable="false">IdleModeInterval</attribute>
+ <attribute side="server" code="0x00" define="IDLE_MODE_INTERVAL" type="INT32U" min="500" max="64800000" default="500" writable="false" optional="false" isNullable="false">IdleModeInterval</attribute>
<attribute side="server" code="0x01" define="ACTIVE_MODE_INTERVAL" type="INT32U" min="300" default="300" writable="false" optional="false" isNullable="false">ActiveModeInterval</attribute>
<attribute side="server" code="0x02" define="ACTIVE_MODE_THRESHOLD" type="INT16U" min="300" default="300" writable="false" optional="false" isNullable="false">ActiveModeThreshold</attribute>
<attribute side="server" code="0x03" define="REGISTERED_CLIENTS" type="ARRAY" entryType="MonitoringRegistrationStruct" writable="false" optional="true" isNullable="false">
@@ -72,7 +72,7 @@
<command source="client" code="0x02" name="UnregisterClient" isFabricScoped="true" optional="true">
<description> Unregister a client from an end device </description>
<arg name="CheckInNodeID" type="node_id"/>
- <arg name="Key" type="OCTET_STRING" length="16" optional="true"/>
+ <arg name="VerificationKey" type="OCTET_STRING" length="16" optional="true"/>
<access op="invoke" privilege="manage"/>
</command>
diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter
index 0e4d351..543c6fe 100644
--- a/src/controller/data_model/controller-clusters.matter
+++ b/src/controller/data_model/controller-clusters.matter
@@ -2751,7 +2751,7 @@
request struct UnregisterClientRequest {
node_id checkInNodeID = 0;
- optional OCTET_STRING<16> key = 1;
+ optional OCTET_STRING<16> verificationKey = 1;
}
/** Register a client to the end device */
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
index 89e93ae..1d666b7 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
@@ -6043,7 +6043,7 @@
}
throw new NoSuchFieldError();
}
- }public enum UnregisterClientCommandField {CheckInNodeID(0),Key(1),;
+ }public enum UnregisterClientCommandField {CheckInNodeID(0),VerificationKey(1),;
private final int id;
UnregisterClientCommandField(int id) {
this.id = id;
diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java
index 17dcb06..3be313a 100644
--- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java
+++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java
@@ -13221,14 +13221,14 @@
}
public void unregisterClient(DefaultClusterCallback callback
- , Long checkInNodeID, Optional<byte[]> key) {
- unregisterClient(chipClusterPtr, callback, checkInNodeID, key, null);
+ , Long checkInNodeID, Optional<byte[]> verificationKey) {
+ unregisterClient(chipClusterPtr, callback, checkInNodeID, verificationKey, null);
}
public void unregisterClient(DefaultClusterCallback callback
- , Long checkInNodeID, Optional<byte[]> key
+ , Long checkInNodeID, Optional<byte[]> verificationKey
, int timedInvokeTimeoutMs) {
- unregisterClient(chipClusterPtr, callback, checkInNodeID, key, timedInvokeTimeoutMs);
+ unregisterClient(chipClusterPtr, callback, checkInNodeID, verificationKey, timedInvokeTimeoutMs);
}
public void stayActiveRequest(DefaultClusterCallback callback
@@ -13245,7 +13245,7 @@
, Long checkInNodeID, Long monitoredSubject, byte[] key, Optional<byte[]> verificationKey
, @Nullable Integer timedInvokeTimeoutMs);
private native void unregisterClient(long chipClusterPtr, DefaultClusterCallback Callback
- , Long checkInNodeID, Optional<byte[]> key
+ , Long checkInNodeID, Optional<byte[]> verificationKey
, @Nullable Integer timedInvokeTimeoutMs);
private native void stayActiveRequest(long chipClusterPtr, DefaultClusterCallback Callback
diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java
index ed16c1c..2f745f9 100644
--- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java
+++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java
@@ -17468,8 +17468,8 @@
CommandParameterInfo icdManagementunregisterClientcheckInNodeIDCommandParameterInfo = new CommandParameterInfo("checkInNodeID", Long.class, Long.class);
icdManagementunregisterClientCommandParams.put("checkInNodeID",icdManagementunregisterClientcheckInNodeIDCommandParameterInfo);
- CommandParameterInfo icdManagementunregisterClientkeyCommandParameterInfo = new CommandParameterInfo("key", Optional.class, byte[].class);
- icdManagementunregisterClientCommandParams.put("key",icdManagementunregisterClientkeyCommandParameterInfo);
+ CommandParameterInfo icdManagementunregisterClientverificationKeyCommandParameterInfo = new CommandParameterInfo("verificationKey", Optional.class, byte[].class);
+ icdManagementunregisterClientCommandParams.put("verificationKey",icdManagementunregisterClientverificationKeyCommandParameterInfo);
InteractionInfo icdManagementunregisterClientInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
@@ -17478,7 +17478,7 @@
, (Long)
commandArguments.get("checkInNodeID")
, (Optional<byte[]>)
- commandArguments.get("key")
+ commandArguments.get("verificationKey")
);
},
diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py
index 2002d1a..fb2c9b2 100644
--- a/src/controller/python/chip/clusters/CHIPClusters.py
+++ b/src/controller/python/chip/clusters/CHIPClusters.py
@@ -4189,7 +4189,7 @@
"commandName": "UnregisterClient",
"args": {
"checkInNodeID": "int",
- "key": "bytes",
+ "verificationKey": "bytes",
},
},
0x00000003: {
diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py
index 4b292be..4a987bb 100644
--- a/src/controller/python/chip/clusters/Objects.py
+++ b/src/controller/python/chip/clusters/Objects.py
@@ -14666,11 +14666,11 @@
return ClusterObjectDescriptor(
Fields=[
ClusterObjectFieldDescriptor(Label="checkInNodeID", Tag=0, Type=uint),
- ClusterObjectFieldDescriptor(Label="key", Tag=1, Type=typing.Optional[bytes]),
+ ClusterObjectFieldDescriptor(Label="verificationKey", Tag=1, Type=typing.Optional[bytes]),
])
checkInNodeID: 'uint' = 0
- key: 'typing.Optional[bytes]' = None
+ verificationKey: 'typing.Optional[bytes]' = None
@dataclass
class StayActiveRequest(ClusterCommand):
diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp
index f646cc4..5bafcc0 100644
--- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp
+++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp
@@ -11303,7 +11303,7 @@
TLV::TLVType outer;
ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer));
ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCheckInNodeID), checkInNodeID));
- ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kKey), key));
+ ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kVerificationKey), verificationKey));
ReturnErrorOnFailure(aWriter.EndContainer(outer));
return CHIP_NO_ERROR;
}
@@ -11325,8 +11325,8 @@
case to_underlying(Fields::kCheckInNodeID):
ReturnErrorOnFailure(DataModel::Decode(reader, checkInNodeID));
break;
- case to_underlying(Fields::kKey):
- ReturnErrorOnFailure(DataModel::Decode(reader, key));
+ case to_underlying(Fields::kVerificationKey):
+ ReturnErrorOnFailure(DataModel::Decode(reader, verificationKey));
break;
default:
break;
diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h
index 26c8dd1..d7d0095 100644
--- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h
+++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h
@@ -13885,8 +13885,8 @@
namespace UnregisterClient {
enum class Fields : uint8_t
{
- kCheckInNodeID = 0,
- kKey = 1,
+ kCheckInNodeID = 0,
+ kVerificationKey = 1,
};
struct Type
@@ -13897,7 +13897,7 @@
static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; }
chip::NodeId checkInNodeID = static_cast<chip::NodeId>(0);
- Optional<chip::ByteSpan> key;
+ Optional<chip::ByteSpan> verificationKey;
CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
@@ -13913,7 +13913,7 @@
static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; }
chip::NodeId checkInNodeID = static_cast<chip::NodeId>(0);
- Optional<chip::ByteSpan> key;
+ Optional<chip::ByteSpan> verificationKey;
CHIP_ERROR Decode(TLV::TLVReader & reader);
};
}; // namespace UnregisterClient
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
index a732fe1..30c2cdc 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
+++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
@@ -3944,7 +3944,7 @@
ClusterCommand("unregister-client", credsIssuerConfig)
{
AddArgument("CheckInNodeID", 0, UINT64_MAX, &mRequest.checkInNodeID);
- AddArgument("Key", &mRequest.key);
+ AddArgument("VerificationKey", &mRequest.verificationKey);
ClusterCommand::AddArguments();
}
diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h
index 8b7c61a..4a209ef 100644
--- a/zzz_generated/chip-tool/zap-generated/test/Commands.h
+++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h
@@ -32089,8 +32089,8 @@
ListFreer listFreer;
chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Type value;
value.checkInNodeID = 101ULL;
- value.key.Emplace();
- value.key.Value() = chip::ByteSpan(
+ value.verificationKey.Emplace();
+ value.verificationKey.Value() = chip::ByteSpan(
chip::Uint8::from_const_char("\001!!1AQaq\201\221\241\261\301\321\341\361garbage: not in length on purpose"), 16);
return SendCommand(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Commands::UnregisterClient::Id,
value, chip::NullOptional