From ba564c1c75fee3c806466f1a0b01df99b0bab7c5 Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Tue, 2 May 2023 22:45:10 -0400 Subject: [PATCH] [ICD] Initial Client Monitoring Cluster xml update (#26302) * update cm cluster xml * change hex to decimal representation * Apply suggestions from code review Co-authored-by: Boris Zbarsky * disable CM cluster generation and tests * generated files * disable cm cluster table * Disable java cm table * disable cm cluster in descriptor test * generated files * disable cm cluster for esp32 * restyler * comment out cm table sources * ifdef out cm table code for esp32 * restyle * disable cm cluster yaml for repl * removed acess modifier --------- Co-authored-by: Boris Zbarsky --- .../all-clusters-app.matter | 45 -- .../all-clusters-common/all-clusters-app.zap | 228 +--------- .../esp32/main/CMakeLists.txt | 4 +- .../light-switch-common/light-switch-app.zap | 222 ---------- scripts/tests/chiptest/__init__.py | 1 + src/app/chip_data_model.cmake | 4 +- src/app/chip_data_model.gni | 7 +- src/app/tests/BUILD.gn | 32 +- .../tests/suites/TestDescriptorCluster.yaml | 4 +- src/app/tests/suites/ciTests.json | 3 +- .../ClientMonitoringRegistrationTable.cpp | 4 + .../util/ClientMonitoringRegistrationTable.h | 4 + .../chip/client-monitoring-cluster.xml | 45 +- src/controller/data_model/BUILD.gn | 7 +- .../data_model/controller-clusters.matter | 38 -- .../data_model/controller-clusters.zap | 232 +---------- .../devicecontroller/ClusterReadMapping.java | 148 ------- .../devicecontroller/ClusterWriteMapping.java | 2 - .../CHIPAttributeTLVValueDecoder.cpp | 238 ----------- .../CHIPEventTLVValueDecoder.cpp | 10 - .../java/zap-generated/CHIPReadCallbacks.cpp | 390 ------------------ .../chip/devicecontroller/ChipClusters.java | 248 ----------- .../chip/devicecontroller/ChipIdLookup.java | 39 -- .../chip/devicecontroller/ChipStructs.java | 30 -- .../devicecontroller/ClusterInfoMapping.java | 182 -------- .../python/chip/clusters/CHIPClusters.py | 86 ---- .../python/chip/clusters/Objects.py | 72 +++- .../zap-generated/attributes/Accessors.cpp | 31 ++ .../zap-generated/attributes/Accessors.h | 5 + .../zap-generated/cluster-objects.cpp | 93 ++++- .../zap-generated/cluster-objects.h | 97 +++-- .../app-common/zap-generated/ids/Attributes.h | 4 + .../app-common/zap-generated/ids/Commands.h | 8 +- .../zap-generated/cluster/Commands.h | 34 +- .../cluster/ComplexArgumentParser.cpp | 32 +- .../cluster/ComplexArgumentParser.h | 5 +- .../cluster/logging/DataModelLogger.cpp | 68 +-- .../cluster/logging/DataModelLogger.h | 5 +- .../chip-tool/zap-generated/test/Commands.h | 199 +-------- .../zap-generated/test/Commands.h | 5 +- .../zap-generated/CHIPClientCallbacks.h | 12 - .../zap-generated/CHIPClusters.h | 9 - .../zap-generated/endpoint_config.h | 17 +- .../zap-generated/gen_config.h | 5 - 44 files changed, 383 insertions(+), 2571 deletions(-) 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 0cf14341ac4d1f..23ea23057166d5 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 @@ -4225,39 +4225,6 @@ server cluster ElectricalMeasurement = 2820 { readonly attribute int16u clusterRevision = 65533; } -/** Client Monitoring allows for ensuring that listed clients meet the required monitoring conditions on the server. */ -server cluster ClientMonitoring = 4166 { - fabric_scoped struct MonitoringRegistration { - node_id clientNodeId = 1; - int64u ICid = 2; - fabric_idx fabricIndex = 254; - } - - readonly attribute int32u idleModeInterval = 0; - readonly attribute int32u activeModeInterval = 1; - readonly attribute int16u activeModeThreshold = 2; - readonly attribute MonitoringRegistration expectedClients[] = 3; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct RegisterClientMonitoringRequest { - node_id clientNodeId = 0; - INT64U ICid = 1; - } - - request struct UnregisterClientMonitoringRequest { - node_id clientNodeId = 0; - INT64U ICid = 1; - } - - command access(invoke: manage) RegisterClientMonitoring(RegisterClientMonitoringRequest): DefaultSuccess = 0; - command access(invoke: manage) UnregisterClientMonitoring(UnregisterClientMonitoringRequest): DefaultSuccess = 1; -} - /** The Test Cluster is meant to validate the generated code */ server cluster UnitTesting = 4294048773 { enum SimpleEnum : ENUM8 { @@ -4951,18 +4918,6 @@ endpoint 0 { ram attribute clusterRevision default = 3; } - server cluster ClientMonitoring { - ram attribute idleModeInterval default = 0x12C; - ram attribute activeModeInterval default = 0x12C; - ram attribute activeModeThreshold default = 0xFA0; - callback attribute expectedClients; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster FaultInjection { callback attribute generatedCommandList; callback attribute acceptedCommandList; diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 8c645de17c904b..399ac119c1f433 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 92, + "featureLevel": 96, "creator": "zap", "keyValuePairs": [ { @@ -16,6 +16,12 @@ } ], "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" + }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl-with-test-extensions.json", @@ -23,12 +29,6 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data with some extensions" - }, - { - "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" } ], "endpointTypes": [ @@ -8194,220 +8194,6 @@ } ] }, - { - "name": "Client Monitoring", - "code": 4166, - "mfgCode": null, - "define": "CLIENT_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "RegisterClientMonitoring", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "UnregisterClientMonitoring", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Client Monitoring", - "code": 4166, - "mfgCode": null, - "define": "CLIENT_MONITORING_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "IdleModeInterval", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x12C", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveModeInterval", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x12C", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveModeThreshold", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xFA0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ExpectedClients", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "Unit Testing", "code": 4294048773, diff --git a/examples/all-clusters-app/esp32/main/CMakeLists.txt b/examples/all-clusters-app/esp32/main/CMakeLists.txt index 70f17774c00d77..c004e3f5dffb42 100644 --- a/examples/all-clusters-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/main/CMakeLists.txt @@ -77,7 +77,9 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/group-key-mgmt-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/basic-information" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/bindings" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/client-monitoring-server" + # Disable Client Monitoring cluster until update is done + # https://github.com/project-chip/connectedhomeip/issues/24425 + # "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/client-monitoring-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/diagnostic-logs-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/door-lock-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/occupancy-sensor-server" diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.zap b/examples/light-switch-app/light-switch-common/light-switch-app.zap index e38ff2637a6ad9..a5c77707454345 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.zap +++ b/examples/light-switch-app/light-switch-common/light-switch-app.zap @@ -5363,228 +5363,6 @@ "reportableChange": 0 } ] - }, - { - "name": "Client Monitoring", - "code": 4166, - "mfgCode": null, - "define": "CLIENT_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "RegisterClientMonitoring", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "UnregisterClientMonitoring", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "StayAwakeRequest", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Client Monitoring", - "code": 4166, - "mfgCode": null, - "define": "CLIENT_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "IdleModeInterval", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x12C", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveModeInterval", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x12C", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveModeThreshold", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xFA0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ExpectedClients", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] } ] }, diff --git a/scripts/tests/chiptest/__init__.py b/scripts/tests/chiptest/__init__.py index 9ddbc0ef8f2d21..b537f681091781 100644 --- a/scripts/tests/chiptest/__init__.py +++ b/scripts/tests/chiptest/__init__.py @@ -135,6 +135,7 @@ def _GetInDevelopmentTests() -> Set[str]: """ return { "Test_AddNewFabricFromExistingFabric.yaml", # chip-repl does not support GetCommissionerRootCertificate and IssueNocChain command + "TestClientMonitoringCluster.yaml" # Client Monitoring Tests need a rework after the XML update } diff --git a/src/app/chip_data_model.cmake b/src/app/chip_data_model.cmake index e5b19626f52710..e27e8509bfeddb 100644 --- a/src/app/chip_data_model.cmake +++ b/src/app/chip_data_model.cmake @@ -134,7 +134,9 @@ function(chip_configure_data_model APP_TARGET) ${CHIP_APP_BASE_DIR}/util/attribute-storage.cpp ${CHIP_APP_BASE_DIR}/util/attribute-table.cpp ${CHIP_APP_BASE_DIR}/util/binding-table.cpp - ${CHIP_APP_BASE_DIR}/util/ClientMonitoringRegistrationTable.cpp + # Disable CM cluster table tests until update is done + # https://github.com/project-chip/connectedhomeip/issues/24425 + # ${CHIP_APP_BASE_DIR}/util/ClientMonitoringRegistrationTable.cpp ${CHIP_APP_BASE_DIR}/util/DataModelHandler.cpp ${CHIP_APP_BASE_DIR}/util/ember-compatibility-functions.cpp ${CHIP_APP_BASE_DIR}/util/ember-print.cpp diff --git a/src/app/chip_data_model.gni b/src/app/chip_data_model.gni index 39b6f1869ae1dc..8b85c353ec7bc2 100644 --- a/src/app/chip_data_model.gni +++ b/src/app/chip_data_model.gni @@ -171,8 +171,11 @@ template("chip_data_model") { "${_app_root}/clusters/scenes/SceneTableImpl.h", "${_app_root}/clusters/scenes/scenes-tokens.h", "${_app_root}/clusters/scenes/scenes.h", - "${_app_root}/util/ClientMonitoringRegistrationTable.cpp", - "${_app_root}/util/ClientMonitoringRegistrationTable.h", + + # Disable CM cluster table tests until update is done + # https://github.com/project-chip/connectedhomeip/issues/24425 + # "${_app_root}/util/ClientMonitoringRegistrationTable.cpp", + # "${_app_root}/util/ClientMonitoringRegistrationTable.h", "${_app_root}/util/DataModelHandler.cpp", "${_app_root}/util/attribute-size-util.cpp", "${_app_root}/util/attribute-storage.cpp", diff --git a/src/app/tests/BUILD.gn b/src/app/tests/BUILD.gn index f64f0f58fe5154..b4da7f9f6af015 100644 --- a/src/app/tests/BUILD.gn +++ b/src/app/tests/BUILD.gn @@ -54,17 +54,17 @@ source_set("binding-test-srcs") { ] } -source_set("client-monitoring-test-srcs") { - sources = [ - "${chip_root}/src/app/util/ClientMonitoringRegistrationTable.cpp", - "${chip_root}/src/app/util/ClientMonitoringRegistrationTable.h", - ] - - public_deps = [ - "${chip_root}/src/app/common:cluster-objects", - "${chip_root}/src/lib/core", - ] -} +# source_set("client-monitoring-test-srcs") { +# sources = [ +# "${chip_root}/src/app/util/ClientMonitoringRegistrationTable.cpp", +# "${chip_root}/src/app/util/ClientMonitoringRegistrationTable.h", +# ] + +# public_deps = [ +# "${chip_root}/src/app/common:cluster-objects", +# "${chip_root}/src/lib/core", +# ] +# } source_set("ota-requestor-test-srcs") { sources = [ @@ -108,7 +108,10 @@ chip_test_suite("tests") { "TestAttributeValueEncoder.cpp", "TestBindingTable.cpp", "TestBuilderParser.cpp", - "TestClientMonitoringRegistrationTable.cpp", + + # Disable CM cluster table tests until update is done + # https://github.com/project-chip/connectedhomeip/issues/24425 + # "TestClientMonitoringRegistrationTable.cpp", "TestClusterInfo.cpp", "TestCommandInteraction.cpp", "TestCommandPathParams.cpp", @@ -159,7 +162,10 @@ chip_test_suite("tests") { public_deps = [ ":binding-test-srcs", - ":client-monitoring-test-srcs", + + # Disable CM cluster table tests until update is done + #https://github.com/project-chip/connectedhomeip/issues/24425 + # ":client-monitoring-test-srcs", ":ota-requestor-test-srcs", ":scenes-table-test-srcs", "${chip_root}/src/app", diff --git a/src/app/tests/suites/TestDescriptorCluster.yaml b/src/app/tests/suites/TestDescriptorCluster.yaml index a0ac7ee099d5c9..803f8507b92f1d 100644 --- a/src/app/tests/suites/TestDescriptorCluster.yaml +++ b/src/app/tests/suites/TestDescriptorCluster.yaml @@ -65,7 +65,9 @@ tests: 0x0040, # Fixed Label 0x0041, # User Label 0x0405, # Relative Humidity Measurement (why on EP0?) - 0x1046, # Client Monitoring + # Disable CM cluster table tests until update is done + # https://github.com/project-chip/connectedhomeip/issues/24425 + # 0x1046, # Client Monitoring 0xFFF1FC06, # Fault Injection ] diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json index deb6fce3dd5ba4..64bcf3908c2169 100644 --- a/src/app/tests/suites/ciTests.json +++ b/src/app/tests/suites/ciTests.json @@ -238,8 +238,7 @@ "TestAccessControlConstraints", "TestLevelControlWithOnOffDependency", "TestCommissioningWindow", - "TestCommissionerNodeId", - "TestClientMonitoringCluster" + "TestCommissionerNodeId" ], "MultiAdmin": ["TestMultiAdmin"], "SoftwareDiagnostics": ["Test_TC_DGSW_1_1"], diff --git a/src/app/util/ClientMonitoringRegistrationTable.cpp b/src/app/util/ClientMonitoringRegistrationTable.cpp index b996c925faab53..bfe81a7ddf77d9 100644 --- a/src/app/util/ClientMonitoringRegistrationTable.cpp +++ b/src/app/util/ClientMonitoringRegistrationTable.cpp @@ -15,6 +15,9 @@ * limitations under the License. */ +// Disable CM cluster table until update is done +// https://github.com/project-chip/connectedhomeip/issues/24425 +#if 0 #include "ClientMonitoringRegistrationTable.h" #include @@ -77,3 +80,4 @@ bool ClientMonitoringRegistrationTable::HasValueForFabric(FabricIndex fabric) } } // namespace chip +#endif diff --git a/src/app/util/ClientMonitoringRegistrationTable.h b/src/app/util/ClientMonitoringRegistrationTable.h index 18545ddad51fa2..51886e8527e34a 100644 --- a/src/app/util/ClientMonitoringRegistrationTable.h +++ b/src/app/util/ClientMonitoringRegistrationTable.h @@ -15,6 +15,9 @@ * limitations under the License. */ +// Disable CM cluster table until update is done +// https://github.com/project-chip/connectedhomeip/issues/24425 +#if 0 #pragma once #include @@ -96,3 +99,4 @@ class ClientMonitoringRegistrationTable }; } // namespace chip +#endif diff --git a/src/app/zap-templates/zcl/data-model/chip/client-monitoring-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/client-monitoring-cluster.xml index 7b7a5fbdcbe0b2..7b9fdae8a919cf 100644 --- a/src/app/zap-templates/zcl/data-model/chip/client-monitoring-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/client-monitoring-cluster.xml @@ -18,10 +18,10 @@ limitations under the License. - + - - + + @@ -29,29 +29,42 @@ limitations under the License. Client Monitoring 0x1046 CLIENT_MONITORING_CLUSTER - Client Monitoring allows for ensuring that listed clients meet the required monitoring conditions on the server. - IdleModeInterval - ActiveModeInterval - ActiveModeThreshold + Client Monitoring allows servers to ensure that listed clients are notified when a server is available for communication. + IdleModeInterval + ActiveModeInterval + ActiveModeThreshold - - ExpectedClients + + ExpectedClients + + - + + ICDCounter + + + + + Register a client to the end device - - + + - + + RegisterClientMonitoring response command + + + + + Unregister a client from an end device - - + - + Request the end device to stay in Active Mode for an additional ActiveModeThreshold diff --git a/src/controller/data_model/BUILD.gn b/src/controller/data_model/BUILD.gn index 1fd8d3e99f7f5c..3a2f40e4961e9d 100644 --- a/src/controller/data_model/BUILD.gn +++ b/src/controller/data_model/BUILD.gn @@ -174,8 +174,11 @@ if (current_os == "android" || build_java_matter_controller) { "jni/ElectricalMeasurementClient-InvokeSubscribeImpl.cpp", "jni/UnitTestingClient-ReadImpl.cpp", "jni/UnitTestingClient-InvokeSubscribeImpl.cpp", - "jni/ClientMonitoringClient-ReadImpl.cpp", - "jni/ClientMonitoringClient-InvokeSubscribeImpl.cpp", + + # Disable CM cluster table tests until update is done + # https://github.com/project-chip/connectedhomeip/issues/24425 + #"jni/ClientMonitoringClient-ReadImpl.cpp", + #"jni/ClientMonitoringClient-InvokeSubscribeImpl.cpp", ] deps = [ diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index cf47d784ff7407..bb426017d5b79d 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -4970,43 +4970,6 @@ client cluster ElectricalMeasurement = 2820 { command GetMeasurementProfileCommand(GetMeasurementProfileCommandRequest): DefaultSuccess = 1; } -/** Client Monitoring allows for ensuring that listed clients meet the required monitoring conditions on the server. */ -client cluster ClientMonitoring = 4166 { - fabric_scoped struct MonitoringRegistration { - node_id clientNodeId = 1; - int64u ICid = 2; - fabric_idx fabricIndex = 254; - } - - readonly attribute int32u idleModeInterval = 0; - readonly attribute int32u activeModeInterval = 1; - readonly attribute int16u activeModeThreshold = 2; - readonly attribute MonitoringRegistration expectedClients[] = 3; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct RegisterClientMonitoringRequest { - node_id clientNodeId = 0; - INT64U ICid = 1; - } - - request struct UnregisterClientMonitoringRequest { - node_id clientNodeId = 0; - INT64U ICid = 1; - } - - /** Register a client to the end device */ - command access(invoke: manage) RegisterClientMonitoring(RegisterClientMonitoringRequest): DefaultSuccess = 0; - /** Unregister a client from an end device */ - command access(invoke: manage) UnregisterClientMonitoring(UnregisterClientMonitoringRequest): DefaultSuccess = 1; - /** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */ - command access(invoke: manage) StayAwakeRequest(): DefaultSuccess = 2; -} - /** The Test Cluster is meant to validate the generated code */ client cluster UnitTesting = 4294048773 { enum SimpleEnum : ENUM8 { @@ -5519,7 +5482,6 @@ endpoint 1 { binding cluster ApplicationBasic; binding cluster AccountLogin; binding cluster ElectricalMeasurement; - binding cluster ClientMonitoring; binding cluster UnitTesting; } diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 841e8579296d87..baee7e2a4f6045 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -1,5 +1,5 @@ { - "featureLevel": 94, + "featureLevel": 96, "creator": "zap", "keyValuePairs": [ { @@ -19474,236 +19474,6 @@ } ] }, - { - "name": "Client Monitoring", - "code": 4166, - "mfgCode": null, - "define": "CLIENT_MONITORING_CLUSTER", - "side": "client", - "enabled": 1, - "commands": [ - { - "name": "RegisterClientMonitoring", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "UnregisterClientMonitoring", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Client Monitoring", - "code": 4166, - "mfgCode": null, - "define": "CLIENT_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "IdleModeInterval", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x12C", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveModeInterval", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x12C", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveModeThreshold", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xFA0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ExpectedClients", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "Unit Testing", "code": 4294048773, diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index 509b9168a976d7..7f6ec70bd29dc8 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -15312,154 +15312,6 @@ public Map> getReadAttributeMap() { "readClusterRevisionAttribute", readElectricalMeasurementClusterRevisionAttributeInteractionInfo); readAttributeMap.put("electricalMeasurement", readElectricalMeasurementInteractionInfo); - Map readClientMonitoringInteractionInfo = new LinkedHashMap<>(); - Map readClientMonitoringIdleModeIntervalCommandParams = - new LinkedHashMap(); - InteractionInfo readClientMonitoringIdleModeIntervalAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ClientMonitoringCluster) cluster) - .readIdleModeIntervalAttribute((ChipClusters.LongAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), - readClientMonitoringIdleModeIntervalCommandParams); - readClientMonitoringInteractionInfo.put( - "readIdleModeIntervalAttribute", - readClientMonitoringIdleModeIntervalAttributeInteractionInfo); - Map readClientMonitoringActiveModeIntervalCommandParams = - new LinkedHashMap(); - InteractionInfo readClientMonitoringActiveModeIntervalAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ClientMonitoringCluster) cluster) - .readActiveModeIntervalAttribute((ChipClusters.LongAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), - readClientMonitoringActiveModeIntervalCommandParams); - readClientMonitoringInteractionInfo.put( - "readActiveModeIntervalAttribute", - readClientMonitoringActiveModeIntervalAttributeInteractionInfo); - Map readClientMonitoringActiveModeThresholdCommandParams = - new LinkedHashMap(); - InteractionInfo readClientMonitoringActiveModeThresholdAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ClientMonitoringCluster) cluster) - .readActiveModeThresholdAttribute( - (ChipClusters.IntegerAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readClientMonitoringActiveModeThresholdCommandParams); - readClientMonitoringInteractionInfo.put( - "readActiveModeThresholdAttribute", - readClientMonitoringActiveModeThresholdAttributeInteractionInfo); - Map readClientMonitoringExpectedClientsCommandParams = - new LinkedHashMap(); - InteractionInfo readClientMonitoringExpectedClientsAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ClientMonitoringCluster) cluster) - .readExpectedClientsAttribute( - (ChipClusters.ClientMonitoringCluster.ExpectedClientsAttributeCallback) - callback); - }, - () -> - new ClusterInfoMapping - .DelegatedClientMonitoringClusterExpectedClientsAttributeCallback(), - readClientMonitoringExpectedClientsCommandParams); - readClientMonitoringInteractionInfo.put( - "readExpectedClientsAttribute", - readClientMonitoringExpectedClientsAttributeInteractionInfo); - Map readClientMonitoringGeneratedCommandListCommandParams = - new LinkedHashMap(); - InteractionInfo readClientMonitoringGeneratedCommandListAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ClientMonitoringCluster) cluster) - .readGeneratedCommandListAttribute( - (ChipClusters.ClientMonitoringCluster.GeneratedCommandListAttributeCallback) - callback); - }, - () -> - new ClusterInfoMapping - .DelegatedClientMonitoringClusterGeneratedCommandListAttributeCallback(), - readClientMonitoringGeneratedCommandListCommandParams); - readClientMonitoringInteractionInfo.put( - "readGeneratedCommandListAttribute", - readClientMonitoringGeneratedCommandListAttributeInteractionInfo); - Map readClientMonitoringAcceptedCommandListCommandParams = - new LinkedHashMap(); - InteractionInfo readClientMonitoringAcceptedCommandListAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ClientMonitoringCluster) cluster) - .readAcceptedCommandListAttribute( - (ChipClusters.ClientMonitoringCluster.AcceptedCommandListAttributeCallback) - callback); - }, - () -> - new ClusterInfoMapping - .DelegatedClientMonitoringClusterAcceptedCommandListAttributeCallback(), - readClientMonitoringAcceptedCommandListCommandParams); - readClientMonitoringInteractionInfo.put( - "readAcceptedCommandListAttribute", - readClientMonitoringAcceptedCommandListAttributeInteractionInfo); - Map readClientMonitoringEventListCommandParams = - new LinkedHashMap(); - InteractionInfo readClientMonitoringEventListAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ClientMonitoringCluster) cluster) - .readEventListAttribute( - (ChipClusters.ClientMonitoringCluster.EventListAttributeCallback) callback); - }, - () -> - new ClusterInfoMapping.DelegatedClientMonitoringClusterEventListAttributeCallback(), - readClientMonitoringEventListCommandParams); - readClientMonitoringInteractionInfo.put( - "readEventListAttribute", readClientMonitoringEventListAttributeInteractionInfo); - Map readClientMonitoringAttributeListCommandParams = - new LinkedHashMap(); - InteractionInfo readClientMonitoringAttributeListAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ClientMonitoringCluster) cluster) - .readAttributeListAttribute( - (ChipClusters.ClientMonitoringCluster.AttributeListAttributeCallback) - callback); - }, - () -> - new ClusterInfoMapping - .DelegatedClientMonitoringClusterAttributeListAttributeCallback(), - readClientMonitoringAttributeListCommandParams); - readClientMonitoringInteractionInfo.put( - "readAttributeListAttribute", readClientMonitoringAttributeListAttributeInteractionInfo); - Map readClientMonitoringFeatureMapCommandParams = - new LinkedHashMap(); - InteractionInfo readClientMonitoringFeatureMapAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ClientMonitoringCluster) cluster) - .readFeatureMapAttribute((ChipClusters.LongAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), - readClientMonitoringFeatureMapCommandParams); - readClientMonitoringInteractionInfo.put( - "readFeatureMapAttribute", readClientMonitoringFeatureMapAttributeInteractionInfo); - Map readClientMonitoringClusterRevisionCommandParams = - new LinkedHashMap(); - InteractionInfo readClientMonitoringClusterRevisionAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ClientMonitoringCluster) cluster) - .readClusterRevisionAttribute((ChipClusters.IntegerAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readClientMonitoringClusterRevisionCommandParams); - readClientMonitoringInteractionInfo.put( - "readClusterRevisionAttribute", - readClientMonitoringClusterRevisionAttributeInteractionInfo); - readAttributeMap.put("clientMonitoring", readClientMonitoringInteractionInfo); Map readUnitTestingInteractionInfo = new LinkedHashMap<>(); Map readUnitTestingBooleanCommandParams = new LinkedHashMap(); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java index 2dce6dab7f0433..e50aed4bfa0f08 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java @@ -2593,8 +2593,6 @@ public Map> getWriteAttributeMap() { "writeAcOverloadAlarmsMaskAttribute", writeElectricalMeasurementAcOverloadAlarmsMaskAttributeInteractionInfo); writeAttributeMap.put("electricalMeasurement", writeElectricalMeasurementInteractionInfo); - Map writeClientMonitoringInteractionInfo = new LinkedHashMap<>(); - writeAttributeMap.put("clientMonitoring", writeClientMonitoringInteractionInfo); Map writeUnitTestingInteractionInfo = new LinkedHashMap<>(); Map writeUnitTestingBooleanCommandParams = new LinkedHashMap(); diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index e4586c7b7a6a83..9790f0e75b3306 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -21909,244 +21909,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::ClientMonitoring::Id: { - using namespace app::Clusters::ClientMonitoring; - switch (aPath.mAttributeId) - { - case Attributes::IdleModeInterval::Id: { - using TypeInfo = Attributes::IdleModeInterval::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); - return value; - } - case Attributes::ActiveModeInterval::Id: { - using TypeInfo = Attributes::ActiveModeInterval::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); - return value; - } - case Attributes::ActiveModeThreshold::Id: { - using TypeInfo = Attributes::ActiveModeThreshold::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); - return value; - } - case Attributes::ExpectedClients::Id: { - using TypeInfo = Attributes::ExpectedClients::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - jobject newElement_0_clientNodeId; - std::string newElement_0_clientNodeIdClassName = "java/lang/Long"; - std::string newElement_0_clientNodeIdCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_clientNodeIdClassName.c_str(), - newElement_0_clientNodeIdCtorSignature.c_str(), - entry_0.clientNodeId, newElement_0_clientNodeId); - jobject newElement_0_ICid; - std::string newElement_0_ICidClassName = "java/lang/Long"; - std::string newElement_0_ICidCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_ICidClassName.c_str(), newElement_0_ICidCtorSignature.c_str(), entry_0.ICid, newElement_0_ICid); - jobject newElement_0_fabricIndex; - std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; - std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - entry_0.fabricIndex, newElement_0_fabricIndex); - - jclass monitoringRegistrationStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ClientMonitoringClusterMonitoringRegistration", - monitoringRegistrationStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ClientMonitoringClusterMonitoringRegistration"); - return nullptr; - } - jmethodID monitoringRegistrationStructCtor_1 = env->GetMethodID( - monitoringRegistrationStructClass_1, "", "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Integer;)V"); - if (monitoringRegistrationStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ClientMonitoringClusterMonitoringRegistration constructor"); - return nullptr; - } - - newElement_0 = env->NewObject(monitoringRegistrationStructClass_1, monitoringRegistrationStructCtor_1, - newElement_0_clientNodeId, newElement_0_ICid, newElement_0_fabricIndex); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); - return value; - } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - break; - } - break; - } case app::Clusters::UnitTesting::Id: { using namespace app::Clusters::UnitTesting; switch (aPath.mAttributeId) diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp index 066d36bdd1f4d2..71c20ae30036fe 100644 --- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp @@ -3436,16 +3436,6 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & } break; } - case app::Clusters::ClientMonitoring::Id: { - using namespace app::Clusters::ClientMonitoring; - switch (aPath.mEventId) - { - default: - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - break; - } - break; - } case app::Clusters::UnitTesting::Id: { using namespace app::Clusters::UnitTesting; switch (aPath.mEventId) diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index caf86b14ed9214..198aa3b31806bc 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -31913,396 +31913,6 @@ void CHIPElectricalMeasurementAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPClientMonitoringExpectedClientsAttributeCallback::CHIPClientMonitoringExpectedClientsAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPClientMonitoringExpectedClientsAttributeCallback::~CHIPClientMonitoringExpectedClientsAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPClientMonitoringExpectedClientsAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistration::DecodableType> & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_clientNodeId; - std::string newElement_0_clientNodeIdClassName = "java/lang/Long"; - std::string newElement_0_clientNodeIdCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_clientNodeIdClassName.c_str(), - newElement_0_clientNodeIdCtorSignature.c_str(), - entry_0.clientNodeId, newElement_0_clientNodeId); - jobject newElement_0_ICid; - std::string newElement_0_ICidClassName = "java/lang/Long"; - std::string newElement_0_ICidCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_ICidClassName.c_str(), newElement_0_ICidCtorSignature.c_str(), entry_0.ICid, newElement_0_ICid); - jobject newElement_0_fabricIndex; - std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; - std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - entry_0.fabricIndex, newElement_0_fabricIndex); - - jclass monitoringRegistrationStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ClientMonitoringClusterMonitoringRegistration", - monitoringRegistrationStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ClientMonitoringClusterMonitoringRegistration"); - return; - } - jmethodID monitoringRegistrationStructCtor_1 = env->GetMethodID(monitoringRegistrationStructClass_1, "", - "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Integer;)V"); - if (monitoringRegistrationStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ClientMonitoringClusterMonitoringRegistration constructor"); - return; - } - - newElement_0 = env->NewObject(monitoringRegistrationStructClass_1, monitoringRegistrationStructCtor_1, - newElement_0_clientNodeId, newElement_0_ICid, newElement_0_fabricIndex); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPClientMonitoringGeneratedCommandListAttributeCallback::CHIPClientMonitoringGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPClientMonitoringGeneratedCommandListAttributeCallback::~CHIPClientMonitoringGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPClientMonitoringGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPClientMonitoringAcceptedCommandListAttributeCallback::CHIPClientMonitoringAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPClientMonitoringAcceptedCommandListAttributeCallback::~CHIPClientMonitoringAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPClientMonitoringAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPClientMonitoringEventListAttributeCallback::CHIPClientMonitoringEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPClientMonitoringEventListAttributeCallback::~CHIPClientMonitoringEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPClientMonitoringEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPClientMonitoringAttributeListAttributeCallback::CHIPClientMonitoringAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPClientMonitoringAttributeListAttributeCallback::~CHIPClientMonitoringAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPClientMonitoringAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - CHIPUnitTestingListInt8uAttributeCallback::CHIPUnitTestingListInt8uAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 68cadaf318e3e4..9bf694f16f5f5a 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -27560,254 +27560,6 @@ private native void subscribeClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); } - public static class ClientMonitoringCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 4166L; - - public ClientMonitoringCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void registerClientMonitoring( - DefaultClusterCallback callback, Long clientNodeId, Long ICid) { - registerClientMonitoring(chipClusterPtr, callback, clientNodeId, ICid, null); - } - - public void registerClientMonitoring( - DefaultClusterCallback callback, Long clientNodeId, Long ICid, int timedInvokeTimeoutMs) { - registerClientMonitoring(chipClusterPtr, callback, clientNodeId, ICid, timedInvokeTimeoutMs); - } - - public void unregisterClientMonitoring( - DefaultClusterCallback callback, Long clientNodeId, Long ICid) { - unregisterClientMonitoring(chipClusterPtr, callback, clientNodeId, ICid, null); - } - - public void unregisterClientMonitoring( - DefaultClusterCallback callback, Long clientNodeId, Long ICid, int timedInvokeTimeoutMs) { - unregisterClientMonitoring( - chipClusterPtr, callback, clientNodeId, ICid, timedInvokeTimeoutMs); - } - - private native void registerClientMonitoring( - long chipClusterPtr, - DefaultClusterCallback Callback, - Long clientNodeId, - Long ICid, - @Nullable Integer timedInvokeTimeoutMs); - - private native void unregisterClientMonitoring( - long chipClusterPtr, - DefaultClusterCallback Callback, - Long clientNodeId, - Long ICid, - @Nullable Integer timedInvokeTimeoutMs); - - public interface ExpectedClientsAttributeCallback { - void onSuccess(List valueList); - - void onError(Exception ex); - - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public interface GeneratedCommandListAttributeCallback { - void onSuccess(List valueList); - - void onError(Exception ex); - - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public interface AcceptedCommandListAttributeCallback { - void onSuccess(List valueList); - - void onError(Exception ex); - - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public interface EventListAttributeCallback { - void onSuccess(List valueList); - - void onError(Exception ex); - - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public interface AttributeListAttributeCallback { - void onSuccess(List valueList); - - void onError(Exception ex); - - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readIdleModeIntervalAttribute(LongAttributeCallback callback) { - readIdleModeIntervalAttribute(chipClusterPtr, callback); - } - - public void subscribeIdleModeIntervalAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - subscribeIdleModeIntervalAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readActiveModeIntervalAttribute(LongAttributeCallback callback) { - readActiveModeIntervalAttribute(chipClusterPtr, callback); - } - - public void subscribeActiveModeIntervalAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - subscribeActiveModeIntervalAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readActiveModeThresholdAttribute(IntegerAttributeCallback callback) { - readActiveModeThresholdAttribute(chipClusterPtr, callback); - } - - public void subscribeActiveModeThresholdAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - subscribeActiveModeThresholdAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readExpectedClientsAttribute(ExpectedClientsAttributeCallback callback) { - readExpectedClientsAttribute(chipClusterPtr, callback); - } - - public void subscribeExpectedClientsAttribute( - ExpectedClientsAttributeCallback callback, int minInterval, int maxInterval) { - subscribeExpectedClientsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute(GeneratedCommandListAttributeCallback callback) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute(AcceptedCommandListAttributeCallback callback) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute(EventListAttributeCallback callback) { - readEventListAttribute(chipClusterPtr, callback); - } - - public void subscribeEventListAttribute( - EventListAttributeCallback callback, int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute(AttributeListAttributeCallback callback) { - readAttributeListAttribute(chipClusterPtr, callback); - } - - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback, int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute(LongAttributeCallback callback) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readIdleModeIntervalAttribute( - long chipClusterPtr, LongAttributeCallback callback); - - private native void subscribeIdleModeIntervalAttribute( - long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); - - private native void readActiveModeIntervalAttribute( - long chipClusterPtr, LongAttributeCallback callback); - - private native void subscribeActiveModeIntervalAttribute( - long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); - - private native void readActiveModeThresholdAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); - - private native void subscribeActiveModeThresholdAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); - - private native void readExpectedClientsAttribute( - long chipClusterPtr, ExpectedClientsAttributeCallback callback); - - private native void subscribeExpectedClientsAttribute( - long chipClusterPtr, - ExpectedClientsAttributeCallback callback, - int minInterval, - int maxInterval); - - private native void readGeneratedCommandListAttribute( - long chipClusterPtr, GeneratedCommandListAttributeCallback callback); - - private native void subscribeGeneratedCommandListAttribute( - long chipClusterPtr, - GeneratedCommandListAttributeCallback callback, - int minInterval, - int maxInterval); - - private native void readAcceptedCommandListAttribute( - long chipClusterPtr, AcceptedCommandListAttributeCallback callback); - - private native void subscribeAcceptedCommandListAttribute( - long chipClusterPtr, - AcceptedCommandListAttributeCallback callback, - int minInterval, - int maxInterval); - - private native void readEventListAttribute( - long chipClusterPtr, EventListAttributeCallback callback); - - private native void subscribeEventListAttribute( - long chipClusterPtr, EventListAttributeCallback callback, int minInterval, int maxInterval); - - private native void readAttributeListAttribute( - long chipClusterPtr, AttributeListAttributeCallback callback); - - private native void subscribeAttributeListAttribute( - long chipClusterPtr, - AttributeListAttributeCallback callback, - int minInterval, - int maxInterval); - - private native void readFeatureMapAttribute( - long chipClusterPtr, LongAttributeCallback callback); - - private native void subscribeFeatureMapAttribute( - long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); - - private native void subscribeClusterRevisionAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); - } - public static class UnitTestingCluster extends BaseChipCluster { public static final long CLUSTER_ID = 4294048773L; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java index 3a707bb8a5bad4..b50c4ff62cc48e 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java @@ -217,9 +217,6 @@ public static String clusterIdToName(long clusterId) { if (clusterId == 2820L) { return "ElectricalMeasurement"; } - if (clusterId == 4166L) { - return "ClientMonitoring"; - } if (clusterId == 4294048773L) { return "UnitTesting"; } @@ -3621,39 +3618,6 @@ public static String attributeIdToName(long clusterId, long attributeId) { } return ""; } - if (clusterId == 4166L) { - if (attributeId == 0L) { - return "IdleModeInterval"; - } - if (attributeId == 1L) { - return "ActiveModeInterval"; - } - if (attributeId == 2L) { - return "ActiveModeThreshold"; - } - if (attributeId == 3L) { - return "ExpectedClients"; - } - if (attributeId == 65528L) { - return "GeneratedCommandList"; - } - if (attributeId == 65529L) { - return "AcceptedCommandList"; - } - if (attributeId == 65530L) { - return "EventList"; - } - if (attributeId == 65531L) { - return "AttributeList"; - } - if (attributeId == 65532L) { - return "FeatureMap"; - } - if (attributeId == 65533L) { - return "ClusterRevision"; - } - return ""; - } if (clusterId == 4294048773L) { if (attributeId == 0L) { return "Boolean"; @@ -4295,9 +4259,6 @@ public static String eventIdToName(long clusterId, long eventId) { if (clusterId == 2820L) { return ""; } - if (clusterId == 4166L) { - return ""; - } if (clusterId == 4294048773L) { if (eventId == 1L) { return "TestEvent"; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java index e78e5c00913076..18d55b362c7b68 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java @@ -1880,36 +1880,6 @@ public String toString() { } } - public static class ClientMonitoringClusterMonitoringRegistration { - public Long clientNodeId; - public Long ICid; - public Integer fabricIndex; - - public ClientMonitoringClusterMonitoringRegistration( - Long clientNodeId, Long ICid, Integer fabricIndex) { - this.clientNodeId = clientNodeId; - this.ICid = ICid; - this.fabricIndex = fabricIndex; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(); - output.append("ClientMonitoringClusterMonitoringRegistration {\n"); - output.append("\tclientNodeId: "); - output.append(clientNodeId); - output.append("\n"); - output.append("\tICid: "); - output.append(ICid); - output.append("\n"); - output.append("\tfabricIndex: "); - output.append(fabricIndex); - output.append("\n"); - output.append("}\n"); - return output.toString(); - } - } - public static class UnitTestingClusterSimpleStruct { public Integer a; public Boolean b; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index 68c919e25bb999..8a8a431885d0f2 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -11897,129 +11897,6 @@ public void onError(Exception ex) { } } - public static class DelegatedClientMonitoringClusterExpectedClientsAttributeCallback - implements ChipClusters.ClientMonitoringCluster.ExpectedClientsAttributeCallback, - DelegatedClusterCallback { - private ClusterCommandCallback callback; - - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess( - List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = - new CommandResponseInfo( - "valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedClientMonitoringClusterGeneratedCommandListAttributeCallback - implements ChipClusters.ClientMonitoringCluster.GeneratedCommandListAttributeCallback, - DelegatedClusterCallback { - private ClusterCommandCallback callback; - - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedClientMonitoringClusterAcceptedCommandListAttributeCallback - implements ChipClusters.ClientMonitoringCluster.AcceptedCommandListAttributeCallback, - DelegatedClusterCallback { - private ClusterCommandCallback callback; - - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedClientMonitoringClusterEventListAttributeCallback - implements ChipClusters.ClientMonitoringCluster.EventListAttributeCallback, - DelegatedClusterCallback { - private ClusterCommandCallback callback; - - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedClientMonitoringClusterAttributeListAttributeCallback - implements ChipClusters.ClientMonitoringCluster.AttributeListAttributeCallback, - DelegatedClusterCallback { - private ClusterCommandCallback callback; - - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - public static class DelegatedUnitTestingClusterTestSpecificResponseCallback implements ChipClusters.UnitTestingCluster.TestSpecificResponseCallback, DelegatedClusterCallback { @@ -13583,11 +13460,6 @@ public Map initializeClusterMap() { (ptr, endpointId) -> new ChipClusters.ElectricalMeasurementCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("electricalMeasurement", electricalMeasurementClusterInfo); - ClusterInfo clientMonitoringClusterInfo = - new ClusterInfo( - (ptr, endpointId) -> new ChipClusters.ClientMonitoringCluster(ptr, endpointId), - new HashMap<>()); - clusterMap.put("clientMonitoring", clientMonitoringClusterInfo); ClusterInfo unitTestingClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.UnitTestingCluster(ptr, endpointId), @@ -13686,7 +13558,6 @@ public void combineCommand( destination.get("applicationBasic").combineCommands(source.get("applicationBasic")); destination.get("accountLogin").combineCommands(source.get("accountLogin")); destination.get("electricalMeasurement").combineCommands(source.get("electricalMeasurement")); - destination.get("clientMonitoring").combineCommands(source.get("clientMonitoring")); destination.get("unitTesting").combineCommands(source.get("unitTesting")); } @@ -17820,59 +17691,6 @@ public Map> getCommandMap() { Map electricalMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); commandMap.put("electricalMeasurement", electricalMeasurementClusterInteractionInfoMap); - Map clientMonitoringClusterInteractionInfoMap = new LinkedHashMap<>(); - Map clientMonitoringregisterClientMonitoringCommandParams = - new LinkedHashMap(); - CommandParameterInfo clientMonitoringregisterClientMonitoringclientNodeIdCommandParameterInfo = - new CommandParameterInfo("clientNodeId", Long.class, Long.class); - clientMonitoringregisterClientMonitoringCommandParams.put( - "clientNodeId", clientMonitoringregisterClientMonitoringclientNodeIdCommandParameterInfo); - - CommandParameterInfo clientMonitoringregisterClientMonitoringICidCommandParameterInfo = - new CommandParameterInfo("ICid", Long.class, Long.class); - clientMonitoringregisterClientMonitoringCommandParams.put( - "ICid", clientMonitoringregisterClientMonitoringICidCommandParameterInfo); - - InteractionInfo clientMonitoringregisterClientMonitoringInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ClientMonitoringCluster) cluster) - .registerClientMonitoring( - (DefaultClusterCallback) callback, - (Long) commandArguments.get("clientNodeId"), - (Long) commandArguments.get("ICid")); - }, - () -> new DelegatedDefaultClusterCallback(), - clientMonitoringregisterClientMonitoringCommandParams); - clientMonitoringClusterInteractionInfoMap.put( - "registerClientMonitoring", clientMonitoringregisterClientMonitoringInteractionInfo); - Map clientMonitoringunregisterClientMonitoringCommandParams = - new LinkedHashMap(); - CommandParameterInfo - clientMonitoringunregisterClientMonitoringclientNodeIdCommandParameterInfo = - new CommandParameterInfo("clientNodeId", Long.class, Long.class); - clientMonitoringunregisterClientMonitoringCommandParams.put( - "clientNodeId", clientMonitoringunregisterClientMonitoringclientNodeIdCommandParameterInfo); - - CommandParameterInfo clientMonitoringunregisterClientMonitoringICidCommandParameterInfo = - new CommandParameterInfo("ICid", Long.class, Long.class); - clientMonitoringunregisterClientMonitoringCommandParams.put( - "ICid", clientMonitoringunregisterClientMonitoringICidCommandParameterInfo); - - InteractionInfo clientMonitoringunregisterClientMonitoringInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ClientMonitoringCluster) cluster) - .unregisterClientMonitoring( - (DefaultClusterCallback) callback, - (Long) commandArguments.get("clientNodeId"), - (Long) commandArguments.get("ICid")); - }, - () -> new DelegatedDefaultClusterCallback(), - clientMonitoringunregisterClientMonitoringCommandParams); - clientMonitoringClusterInteractionInfoMap.put( - "unregisterClientMonitoring", clientMonitoringunregisterClientMonitoringInteractionInfo); - commandMap.put("clientMonitoring", clientMonitoringClusterInteractionInfoMap); Map unitTestingClusterInteractionInfoMap = new LinkedHashMap<>(); Map unitTestingtestCommandParams = new LinkedHashMap(); diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 647fa2721d6ebb..ed20a2b7b89283 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -8379,90 +8379,6 @@ class ChipClusters: }, }, } - _CLIENT_MONITORING_CLUSTER_INFO = { - "clusterName": "ClientMonitoring", - "clusterId": 0x00001046, - "commands": { - 0x00000000: { - "commandId": 0x00000000, - "commandName": "RegisterClientMonitoring", - "args": { - "clientNodeId": "int", - "ICid": "int", - }, - }, - 0x00000001: { - "commandId": 0x00000001, - "commandName": "UnregisterClientMonitoring", - "args": { - "clientNodeId": "int", - "ICid": "int", - }, - }, - }, - "attributes": { - 0x00000000: { - "attributeName": "IdleModeInterval", - "attributeId": 0x00000000, - "type": "int", - "reportable": True, - }, - 0x00000001: { - "attributeName": "ActiveModeInterval", - "attributeId": 0x00000001, - "type": "int", - "reportable": True, - }, - 0x00000002: { - "attributeName": "ActiveModeThreshold", - "attributeId": 0x00000002, - "type": "int", - "reportable": True, - }, - 0x00000003: { - "attributeName": "ExpectedClients", - "attributeId": 0x00000003, - "type": "", - "reportable": True, - }, - 0x0000FFF8: { - "attributeName": "GeneratedCommandList", - "attributeId": 0x0000FFF8, - "type": "int", - "reportable": True, - }, - 0x0000FFF9: { - "attributeName": "AcceptedCommandList", - "attributeId": 0x0000FFF9, - "type": "int", - "reportable": True, - }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, - 0x0000FFFB: { - "attributeName": "AttributeList", - "attributeId": 0x0000FFFB, - "type": "int", - "reportable": True, - }, - 0x0000FFFC: { - "attributeName": "FeatureMap", - "attributeId": 0x0000FFFC, - "type": "int", - "reportable": True, - }, - 0x0000FFFD: { - "attributeName": "ClusterRevision", - "attributeId": 0x0000FFFD, - "type": "int", - "reportable": True, - }, - }, - } _UNIT_TESTING_CLUSTER_INFO = { "clusterName": "UnitTesting", "clusterId": 0xFFF1FC05, @@ -9307,7 +9223,6 @@ class ChipClusters: 0x0000050D: _APPLICATION_BASIC_CLUSTER_INFO, 0x0000050E: _ACCOUNT_LOGIN_CLUSTER_INFO, 0x00000B04: _ELECTRICAL_MEASUREMENT_CLUSTER_INFO, - 0x00001046: _CLIENT_MONITORING_CLUSTER_INFO, 0xFFF1FC05: _UNIT_TESTING_CLUSTER_INFO, } @@ -9376,7 +9291,6 @@ class ChipClusters: "ApplicationBasic": _APPLICATION_BASIC_CLUSTER_INFO, "AccountLogin": _ACCOUNT_LOGIN_CLUSTER_INFO, "ElectricalMeasurement": _ELECTRICAL_MEASUREMENT_CLUSTER_INFO, - "ClientMonitoring": _CLIENT_MONITORING_CLUSTER_INFO, "UnitTesting": _UNIT_TESTING_CLUSTER_INFO, } diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 224ef39d7564eb..fba181de8c0289 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -29036,7 +29036,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="idleModeInterval", Tag=0x00000000, Type=uint), ClusterObjectFieldDescriptor(Label="activeModeInterval", Tag=0x00000001, Type=uint), ClusterObjectFieldDescriptor(Label="activeModeThreshold", Tag=0x00000002, Type=uint), - ClusterObjectFieldDescriptor(Label="expectedClients", Tag=0x00000003, Type=typing.List[ClientMonitoring.Structs.MonitoringRegistration]), + ClusterObjectFieldDescriptor(Label="expectedClients", Tag=0x00000003, Type=typing.List[ClientMonitoring.Structs.MonitoringRegistrationStruct]), + ClusterObjectFieldDescriptor(Label="ICDCounter", Tag=0x00000004, Type=uint), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -29048,7 +29049,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: idleModeInterval: 'uint' = None activeModeInterval: 'uint' = None activeModeThreshold: 'uint' = None - expectedClients: 'typing.List[ClientMonitoring.Structs.MonitoringRegistration]' = None + expectedClients: 'typing.List[ClientMonitoring.Structs.MonitoringRegistrationStruct]' = None + ICDCounter: 'uint' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -29058,18 +29060,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Structs: @dataclass - class MonitoringRegistration(ClusterObject): + class MonitoringRegistrationStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="clientNodeId", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="ICid", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="clientNodeID", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="key", Tag=2, Type=bytes), ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), ]) - clientNodeId: 'uint' = 0 - ICid: 'uint' = 0 + clientNodeID: 'uint' = 0 + key: 'bytes' = b"" fabricIndex: 'uint' = 0 class Commands: @@ -29078,23 +29080,41 @@ class RegisterClientMonitoring(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x1046 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'RegisterClientMonitoringResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="clientNodeID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="key", Tag=1, Type=bytes), + ]) + + clientNodeID: 'uint' = 0 + key: 'bytes' = b"" + + @dataclass + class RegisterClientMonitoringResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x1046 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="clientNodeId", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="ICid", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="ICDCounter", Tag=1, Type=typing.Union[Nullable, uint]), ]) - clientNodeId: 'uint' = 0 - ICid: 'uint' = 0 + status: 'uint' = 0 + ICDCounter: 'typing.Union[Nullable, uint]' = NullValue @dataclass class UnregisterClientMonitoring(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x1046 - command_id: typing.ClassVar[int] = 0x00000001 + command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -29102,17 +29122,15 @@ class UnregisterClientMonitoring(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="clientNodeId", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="ICid", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="clientNodeID", Tag=0, Type=uint), ]) - clientNodeId: 'uint' = 0 - ICid: 'uint' = 0 + clientNodeID: 'uint' = 0 @dataclass class StayAwakeRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x1046 - command_id: typing.ClassVar[int] = 0x00000002 + command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -29183,9 +29201,25 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[ClientMonitoring.Structs.MonitoringRegistration]) + return ClusterObjectFieldDescriptor(Type=typing.List[ClientMonitoring.Structs.MonitoringRegistrationStruct]) + + value: 'typing.List[ClientMonitoring.Structs.MonitoringRegistrationStruct]' = field(default_factory=lambda: []) + + @dataclass + class ICDCounter(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x1046 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000004 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.List[ClientMonitoring.Structs.MonitoringRegistration]' = field(default_factory=lambda: []) + value: 'uint' = 0 @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index 6dd1d09dfa0a55..603fa9be0d4fab 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -23383,6 +23383,37 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) } // namespace ActiveModeThreshold +namespace ICDCounter { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); +} + +} // namespace ICDCounter + namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index 2d919d595c757b..d897fd29993f61 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -4019,6 +4019,11 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace ActiveModeThreshold +namespace ICDCounter { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // int32u +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace ICDCounter + namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); 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 d7d8ea5bb57a79..1e9a9aa8a52728 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 @@ -18798,7 +18798,7 @@ namespace Events {} // namespace Events } // namespace ElectricalMeasurement namespace ClientMonitoring { namespace Structs { -namespace MonitoringRegistration { +namespace MonitoringRegistrationStruct { CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & writer, TLV::Tag tag) const { return DoEncode(writer, tag, NullOptional); @@ -18811,10 +18811,17 @@ CHIP_ERROR Type::EncodeForRead(TLV::TLVWriter & writer, TLV::Tag tag, FabricInde CHIP_ERROR Type::DoEncode(TLV::TLVWriter & writer, TLV::Tag tag, const Optional & accessingFabricIndex) const { + bool includeSensitive = !accessingFabricIndex.HasValue() || (accessingFabricIndex.Value() == fabricIndex); TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kClientNodeId), clientNodeId)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kICid), ICid)); + if (includeSensitive) + { + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kClientNodeID), clientNodeID)); + } + if (includeSensitive) + { + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kKey), key)); + } if (accessingFabricIndex.HasValue()) { ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); @@ -18838,11 +18845,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kClientNodeId): - ReturnErrorOnFailure(DataModel::Decode(reader, clientNodeId)); + case to_underlying(Fields::kClientNodeID): + ReturnErrorOnFailure(DataModel::Decode(reader, clientNodeID)); break; - case to_underlying(Fields::kICid): - ReturnErrorOnFailure(DataModel::Decode(reader, ICid)); + case to_underlying(Fields::kKey): + ReturnErrorOnFailure(DataModel::Decode(reader, key)); break; case to_underlying(Fields::kFabricIndex): ReturnErrorOnFailure(DataModel::Decode(reader, fabricIndex)); @@ -18858,7 +18865,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) return CHIP_NO_ERROR; } -} // namespace MonitoringRegistration +} // namespace MonitoringRegistrationStruct } // namespace Structs namespace Commands { @@ -18867,8 +18874,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kClientNodeId), clientNodeId)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kICid), ICid)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kClientNodeID), clientNodeID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kKey), key)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -18887,11 +18894,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kClientNodeId): - ReturnErrorOnFailure(DataModel::Decode(reader, clientNodeId)); + case to_underlying(Fields::kClientNodeID): + ReturnErrorOnFailure(DataModel::Decode(reader, clientNodeID)); break; - case to_underlying(Fields::kICid): - ReturnErrorOnFailure(DataModel::Decode(reader, ICid)); + case to_underlying(Fields::kKey): + ReturnErrorOnFailure(DataModel::Decode(reader, key)); break; default: break; @@ -18903,13 +18910,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) return CHIP_NO_ERROR; } } // namespace RegisterClientMonitoring. -namespace UnregisterClientMonitoring { +namespace RegisterClientMonitoringResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kClientNodeId), clientNodeId)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kICid), ICid)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kICDCounter), ICDCounter)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -18928,11 +18935,48 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kClientNodeId): - ReturnErrorOnFailure(DataModel::Decode(reader, clientNodeId)); + case to_underlying(Fields::kStatus): + ReturnErrorOnFailure(DataModel::Decode(reader, status)); break; - case to_underlying(Fields::kICid): - ReturnErrorOnFailure(DataModel::Decode(reader, ICid)); + case to_underlying(Fields::kICDCounter): + ReturnErrorOnFailure(DataModel::Decode(reader, ICDCounter)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace RegisterClientMonitoringResponse. +namespace UnregisterClientMonitoring { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kClientNodeID), clientNodeID)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kClientNodeID): + ReturnErrorOnFailure(DataModel::Decode(reader, clientNodeID)); break; default: break; @@ -18996,6 +19040,9 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre case Attributes::ExpectedClients::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, expectedClients)); break; + case Attributes::ICDCounter::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, ICDCounter)); + break; case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, generatedCommandList)); break; @@ -21855,6 +21902,10 @@ bool CommandIsFabricScoped(ClusterId aCluster, CommandId aCommand) case Clusters::ClientMonitoring::Id: { switch (aCommand) { + case Clusters::ClientMonitoring::Commands::RegisterClientMonitoring::Id: + return true; + case Clusters::ClientMonitoring::Commands::UnregisterClientMonitoring::Id: + return true; default: return false; } 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 68ee013cd179aa..c8b474f334ba13 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 @@ -25859,19 +25859,19 @@ struct TypeInfo } // namespace ElectricalMeasurement namespace ClientMonitoring { namespace Structs { -namespace MonitoringRegistration { +namespace MonitoringRegistrationStruct { enum class Fields : uint8_t { - kClientNodeId = 1, - kICid = 2, + kClientNodeID = 1, + kKey = 2, kFabricIndex = 254, }; struct Type { public: - chip::NodeId clientNodeId = static_cast(0); - uint64_t ICid = static_cast(0); + chip::NodeId clientNodeID = static_cast(0); + chip::ByteSpan key; chip::FabricIndex fabricIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -25891,7 +25891,7 @@ struct Type using DecodableType = Type; -} // namespace MonitoringRegistration +} // namespace MonitoringRegistrationStruct } // namespace Structs namespace Commands { @@ -25902,6 +25902,11 @@ struct Type; struct DecodableType; } // namespace RegisterClientMonitoring +namespace RegisterClientMonitoringResponse { +struct Type; +struct DecodableType; +} // namespace RegisterClientMonitoringResponse + namespace UnregisterClientMonitoring { struct Type; struct DecodableType; @@ -25918,8 +25923,8 @@ namespace Commands { namespace RegisterClientMonitoring { enum class Fields : uint8_t { - kClientNodeId = 0, - kICid = 1, + kClientNodeID = 0, + kKey = 1, }; struct Type @@ -25929,12 +25934,12 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::RegisterClientMonitoring::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } - chip::NodeId clientNodeId = static_cast(0); - uint64_t ICid = static_cast(0); + chip::NodeId clientNodeID = static_cast(0); + chip::ByteSpan key; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; - using ResponseType = DataModel::NullObjectType; + using ResponseType = Clusters::ClientMonitoring::Commands::RegisterClientMonitoringResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -25945,16 +25950,50 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::RegisterClientMonitoring::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } - chip::NodeId clientNodeId = static_cast(0); - uint64_t ICid = static_cast(0); + chip::NodeId clientNodeID = static_cast(0); + chip::ByteSpan key; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace RegisterClientMonitoring +namespace RegisterClientMonitoringResponse { +enum class Fields : uint8_t +{ + kStatus = 0, + kICDCounter = 1, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::RegisterClientMonitoringResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } + + uint8_t status = static_cast(0); + DataModel::Nullable ICDCounter; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::RegisterClientMonitoringResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } + + uint8_t status = static_cast(0); + DataModel::Nullable ICDCounter; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace RegisterClientMonitoringResponse namespace UnregisterClientMonitoring { enum class Fields : uint8_t { - kClientNodeId = 0, - kICid = 1, + kClientNodeID = 0, }; struct Type @@ -25964,8 +26003,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::UnregisterClientMonitoring::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } - chip::NodeId clientNodeId = static_cast(0); - uint64_t ICid = static_cast(0); + chip::NodeId clientNodeID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -25980,8 +26018,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::UnregisterClientMonitoring::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } - chip::NodeId clientNodeId = static_cast(0); - uint64_t ICid = static_cast(0); + chip::NodeId clientNodeID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace UnregisterClientMonitoring @@ -26056,17 +26093,30 @@ struct TypeInfo namespace ExpectedClients { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = - chip::app::DataModel::DecodableList; + using Type = + chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList< + chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistrationStruct::DecodableType>; using DecodableArgType = const chip::app::DataModel::DecodableList< - chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistration::DecodableType> &; + chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistrationStruct::DecodableType> &; static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ExpectedClients::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace ExpectedClients +namespace ICDCounter { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ICDCounter::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ICDCounter namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { @@ -26116,6 +26166,7 @@ struct TypeInfo Attributes::ActiveModeInterval::TypeInfo::DecodableType activeModeInterval = static_cast(0); Attributes::ActiveModeThreshold::TypeInfo::DecodableType activeModeThreshold = static_cast(0); Attributes::ExpectedClients::TypeInfo::DecodableType expectedClients; + Attributes::ICDCounter::TypeInfo::DecodableType ICDCounter = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index d141f4e3d8fedf..e658adbe832a81 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -4912,6 +4912,10 @@ namespace ExpectedClients { static constexpr AttributeId Id = 0x00000003; } // namespace ExpectedClients +namespace ICDCounter { +static constexpr AttributeId Id = 0x00000004; +} // namespace ICDCounter + namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; } // namespace GeneratedCommandList diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h index 4bf91f56d5eab0..6699a225a48b1f 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h @@ -1098,12 +1098,16 @@ namespace RegisterClientMonitoring { static constexpr CommandId Id = 0x00000000; } // namespace RegisterClientMonitoring -namespace UnregisterClientMonitoring { +namespace RegisterClientMonitoringResponse { static constexpr CommandId Id = 0x00000001; +} // namespace RegisterClientMonitoringResponse + +namespace UnregisterClientMonitoring { +static constexpr CommandId Id = 0x00000002; } // namespace UnregisterClientMonitoring namespace StayAwakeRequest { -static constexpr CommandId Id = 0x00000002; +static constexpr CommandId Id = 0x00000003; } // namespace StayAwakeRequest } // namespace Commands diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 8a0226fa4c76bb..81be7ed1082963 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -7380,14 +7380,15 @@ class ElectricalMeasurementGetMeasurementProfileCommand : public ClusterCommand |------------------------------------------------------------------------------| | Commands: | | | * RegisterClientMonitoring | 0x00 | -| * UnregisterClientMonitoring | 0x01 | -| * StayAwakeRequest | 0x02 | +| * UnregisterClientMonitoring | 0x02 | +| * StayAwakeRequest | 0x03 | |------------------------------------------------------------------------------| | Attributes: | | | * IdleModeInterval | 0x0000 | | * ActiveModeInterval | 0x0001 | | * ActiveModeThreshold | 0x0002 | | * ExpectedClients | 0x0003 | +| * ICDCounter | 0x0004 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -7407,8 +7408,8 @@ class ClientMonitoringRegisterClientMonitoring : public ClusterCommand ClientMonitoringRegisterClientMonitoring(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("register-client-monitoring", credsIssuerConfig) { - AddArgument("ClientNodeId", 0, UINT64_MAX, &mRequest.clientNodeId); - AddArgument("ICid", 0, UINT64_MAX, &mRequest.ICid); + AddArgument("ClientNodeID", 0, UINT64_MAX, &mRequest.clientNodeID); + AddArgument("Key", &mRequest.key); ClusterCommand::AddArguments(); } @@ -7439,23 +7440,22 @@ class ClientMonitoringUnregisterClientMonitoring : public ClusterCommand ClientMonitoringUnregisterClientMonitoring(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("unregister-client-monitoring", credsIssuerConfig) { - AddArgument("ClientNodeId", 0, UINT64_MAX, &mRequest.clientNodeId); - AddArgument("ICid", 0, UINT64_MAX, &mRequest.ICid); + AddArgument("ClientNodeID", 0, UINT64_MAX, &mRequest.clientNodeID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00001046) command (0x00000001) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00001046) command (0x00000002) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00001046, 0x00000001, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00001046, 0x00000002, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00001046) command (0x00000001) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00001046) command (0x00000002) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00001046, 0x00000001, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00001046, 0x00000002, mRequest); } private: @@ -7476,16 +7476,16 @@ class ClientMonitoringStayAwakeRequest : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00001046) command (0x00000002) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00001046) command (0x00000003) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00001046, 0x00000002, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00001046, 0x00000003, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00001046) command (0x00000002) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00001046) command (0x00000003) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00001046, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00001046, 0x00000003, mRequest); } private: @@ -15554,6 +15554,7 @@ void registerClusterClientMonitoring(Commands & commands, CredentialIssuerComman make_unique(Id, "active-mode-interval", Attributes::ActiveModeInterval::Id, credsIssuerConfig), // make_unique(Id, "active-mode-threshold", Attributes::ActiveModeThreshold::Id, credsIssuerConfig), // make_unique(Id, "expected-clients", Attributes::ExpectedClients::Id, credsIssuerConfig), // + make_unique(Id, "icdcounter", Attributes::ICDCounter::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -15568,8 +15569,10 @@ void registerClusterClientMonitoring(Commands & commands, CredentialIssuerComman make_unique>(Id, "active-mode-threshold", 0, UINT16_MAX, Attributes::ActiveModeThreshold::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( + chip::app::DataModel::List>>( Id, "expected-clients", Attributes::ExpectedClients::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "icdcounter", 0, UINT32_MAX, Attributes::ICDCounter::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -15588,6 +15591,7 @@ void registerClusterClientMonitoring(Commands & commands, CredentialIssuerComman make_unique(Id, "active-mode-interval", Attributes::ActiveModeInterval::Id, credsIssuerConfig), // make_unique(Id, "active-mode-threshold", Attributes::ActiveModeThreshold::Id, credsIssuerConfig), // make_unique(Id, "expected-clients", Attributes::ExpectedClients::Id, credsIssuerConfig), // + make_unique(Id, "icdcounter", Attributes::ICDCounter::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index 5594ef89c48bf2..e4aa5a34e4b89d 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -2347,27 +2347,29 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::ApplicationLauncher::S ComplexArgumentParser::Finalize(request.endpoint); } -CHIP_ERROR ComplexArgumentParser::Setup(const char * label, - chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistration::Type & request, - Json::Value & value) +CHIP_ERROR +ComplexArgumentParser::Setup(const char * label, + chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistrationStruct::Type & request, + Json::Value & value) { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); // Copy to track which members we already processed. Json::Value valueCopy(value); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("MonitoringRegistration.clientNodeId", "clientNodeId", - value.isMember("clientNodeId"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("MonitoringRegistration.ICid", "ICid", value.isMember("ICid"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("MonitoringRegistrationStruct.clientNodeID", "clientNodeID", + value.isMember("clientNodeID"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("MonitoringRegistrationStruct.key", "key", value.isMember("key"))); char labelWithMember[kMaxLabelLength]; - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "clientNodeId"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.clientNodeId, value["clientNodeId"])); - valueCopy.removeMember("clientNodeId"); + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "clientNodeID"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.clientNodeID, value["clientNodeID"])); + valueCopy.removeMember("clientNodeID"); - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "ICid"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.ICid, value["ICid"])); - valueCopy.removeMember("ICid"); + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "key"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.key, value["key"])); + valueCopy.removeMember("key"); if (value.isMember("fabricIndex")) { @@ -2379,10 +2381,10 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); } -void ComplexArgumentParser::Finalize(chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistration::Type & request) +void ComplexArgumentParser::Finalize(chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistrationStruct::Type & request) { - ComplexArgumentParser::Finalize(request.clientNodeId); - ComplexArgumentParser::Finalize(request.ICid); + ComplexArgumentParser::Finalize(request.clientNodeID); + ComplexArgumentParser::Finalize(request.key); ComplexArgumentParser::Finalize(request.fabricIndex); } diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h index 1827e5cbb930fa..fb84db01015080 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h @@ -290,10 +290,11 @@ static CHIP_ERROR Setup(const char * label, chip::app::Clusters::ApplicationLaun static void Finalize(chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEPStruct::Type & request); -static CHIP_ERROR Setup(const char * label, chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistration::Type & request, +static CHIP_ERROR Setup(const char * label, + chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistrationStruct::Type & request, Json::Value & value); -static void Finalize(chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistration::Type & request); +static void Finalize(chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistrationStruct::Type & request); static CHIP_ERROR Setup(const char * label, chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type & request, Json::Value & value); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index 210e152050a010..46ccdd27881a2b 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -2111,22 +2111,22 @@ DataModelLogger::LogValue(const char * label, size_t indent, CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistration::DecodableType & value) + const chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistrationStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("ClientNodeId", indent + 1, value.clientNodeId); + CHIP_ERROR err = LogValue("ClientNodeID", indent + 1, value.clientNodeID); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ClientNodeId'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ClientNodeID'"); return err; } } { - CHIP_ERROR err = LogValue("ICid", indent + 1, value.ICid); + CHIP_ERROR err = LogValue("Key", indent + 1, value.key); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ICid'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Key'"); return err; } } @@ -10101,64 +10101,6 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case ClientMonitoring::Id: { - switch (path.mAttributeId) - { - case ClientMonitoring::Attributes::IdleModeInterval::Id: { - uint32_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("IdleModeInterval", 1, value); - } - case ClientMonitoring::Attributes::ActiveModeInterval::Id: { - uint32_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ActiveModeInterval", 1, value); - } - case ClientMonitoring::Attributes::ActiveModeThreshold::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ActiveModeThreshold", 1, value); - } - case ClientMonitoring::Attributes::ExpectedClients::Id: { - chip::app::DataModel::DecodableList< - chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistration::DecodableType> - value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ExpectedClients", 1, value); - } - case ClientMonitoring::Attributes::GeneratedCommandList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("GeneratedCommandList", 1, value); - } - case ClientMonitoring::Attributes::AcceptedCommandList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("AcceptedCommandList", 1, value); - } - case ClientMonitoring::Attributes::EventList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("EventList", 1, value); - } - case ClientMonitoring::Attributes::AttributeList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("AttributeList", 1, value); - } - case ClientMonitoring::Attributes::FeatureMap::Id: { - uint32_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("FeatureMap", 1, value); - } - case ClientMonitoring::Attributes::ClusterRevision::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ClusterRevision", 1, value); - } - } - break; - } case UnitTesting::Id: { switch (path.mAttributeId) { diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h index 459c2c13f31cb7..81d723c231777c 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -181,8 +181,9 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEPStruct::DecodableType & value); -static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistration::DecodableType & value); +static CHIP_ERROR +LogValue(const char * label, size_t indent, + const chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistrationStruct::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType & value); diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index a0ab20c57b930e..919fac2e092fd3 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -247,7 +247,6 @@ class TestList : public Command printf("TestLevelControlWithOnOffDependency\n"); printf("TestCommissioningWindow\n"); printf("TestCommissionerNodeId\n"); - printf("TestClientMonitoringCluster\n"); printf("TestMultiAdmin\n"); printf("Test_TC_DGSW_1_1\n"); printf("TestSubscribe_OnOff\n"); @@ -68755,10 +68754,8 @@ class TestDescriptorClusterSuite : public TestCommand VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 25)); VerifyOrReturn(CheckValue("serverList[25]", iter_0.GetValue(), 1029UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 26)); - VerifyOrReturn(CheckValue("serverList[26]", iter_0.GetValue(), 4166UL)); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 27)); - VerifyOrReturn(CheckValue("serverList[27]", iter_0.GetValue(), 4294048774UL)); - VerifyOrReturn(CheckNoMoreListItems("serverList", iter_0, 28)); + VerifyOrReturn(CheckValue("serverList[26]", iter_0.GetValue(), 4294048774UL)); + VerifyOrReturn(CheckNoMoreListItems("serverList", iter_0, 27)); } } break; @@ -74309,197 +74306,6 @@ class TestCommissionerNodeIdSuite : public TestCommand } }; -class TestClientMonitoringClusterSuite : public TestCommand -{ -public: - TestClientMonitoringClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestClientMonitoringCluster", 9, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestClientMonitoringClusterSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistration::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("expectedClients", iter_0, 0)); - VerifyOrReturn(CheckValue("expectedClients[0].clientNodeId", iter_0.GetValue().clientNodeId, 10ULL)); - VerifyOrReturn(CheckValue("expectedClients[0].ICid", iter_0.GetValue().ICid, 20ULL)); - VerifyOrReturn(CheckNoMoreListItems("expectedClients", iter_0, 1)); - } - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistration::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("expectedClients", iter_0, 0)); - } - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Register Client 2 - Invalid"); - ListFreer listFreer; - chip::app::Clusters::ClientMonitoring::Commands::RegisterClientMonitoring::Type value; - value.clientNodeId = 0ULL; - value.ICid = 0ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), ClientMonitoring::Id, - ClientMonitoring::Commands::RegisterClientMonitoring::Id, value, chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Register Client 1"); - ListFreer listFreer; - chip::app::Clusters::ClientMonitoring::Commands::RegisterClientMonitoring::Type value; - value.clientNodeId = 10ULL; - value.ICid = 20ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), ClientMonitoring::Id, - ClientMonitoring::Commands::RegisterClientMonitoring::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Register Client 2 - Invalid"); - ListFreer listFreer; - chip::app::Clusters::ClientMonitoring::Commands::RegisterClientMonitoring::Type value; - value.clientNodeId = 11ULL; - value.ICid = 21ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), ClientMonitoring::Id, - ClientMonitoring::Commands::RegisterClientMonitoring::Id, value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Verify Register Client"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ClientMonitoring::Id, - ClientMonitoring::Attributes::ExpectedClients::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Unregister Client - Invalid Client NodeId"); - ListFreer listFreer; - chip::app::Clusters::ClientMonitoring::Commands::UnregisterClientMonitoring::Type value; - value.clientNodeId = 30ULL; - value.ICid = 20ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), ClientMonitoring::Id, - ClientMonitoring::Commands::UnregisterClientMonitoring::Id, value, chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Unregister Client - Invalid ICid"); - ListFreer listFreer; - chip::app::Clusters::ClientMonitoring::Commands::UnregisterClientMonitoring::Type value; - value.clientNodeId = 10ULL; - value.ICid = 30ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), ClientMonitoring::Id, - ClientMonitoring::Commands::UnregisterClientMonitoring::Id, value, chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Unregister Client - Valid"); - ListFreer listFreer; - chip::app::Clusters::ClientMonitoring::Commands::UnregisterClientMonitoring::Type value; - value.clientNodeId = 10ULL; - value.ICid = 20ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), ClientMonitoring::Id, - ClientMonitoring::Commands::UnregisterClientMonitoring::Id, value, chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Verify Register Client - Empty"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ClientMonitoring::Id, - ClientMonitoring::Attributes::ExpectedClients::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - class TestMultiAdminSuite : public TestCommand { public: @@ -114401,7 +114207,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 2ac0dea95d5047..c1486e778f3489 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -100836,7 +100836,7 @@ class TestDescriptorCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("ServerList", [actualValue count], static_cast(28))); + VerifyOrReturn(CheckValue("ServerList", [actualValue count], static_cast(27))); VerifyOrReturn(CheckValue("", actualValue[0], 3UL)); VerifyOrReturn(CheckValue("", actualValue[1], 4UL)); VerifyOrReturn(CheckValue("", actualValue[2], 29UL)); @@ -100863,8 +100863,7 @@ class TestDescriptorCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("", actualValue[23], 64UL)); VerifyOrReturn(CheckValue("", actualValue[24], 65UL)); VerifyOrReturn(CheckValue("", actualValue[25], 1029UL)); - VerifyOrReturn(CheckValue("", actualValue[26], 4166UL)); - VerifyOrReturn(CheckValue("", actualValue[27], 4294048774UL)); + VerifyOrReturn(CheckValue("", actualValue[26], 4294048774UL)); } NextTest(); diff --git a/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClientCallbacks.h b/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClientCallbacks.h index ef6cbd56ee6145..4c52eb1bf23c89 100644 --- a/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClientCallbacks.h @@ -658,18 +658,6 @@ typedef void (*ElectricalMeasurementEventListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ElectricalMeasurementAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ClientMonitoringExpectedClientsListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistration::DecodableType> & data); -typedef void (*ClientMonitoringGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ClientMonitoringAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ClientMonitoringEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ClientMonitoringAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); typedef void (*UnitTestingListInt8uListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*UnitTestingListOctetStringListAttributeCallback)(void * context, diff --git a/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClusters.h b/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClusters.h index bc03b37dc2ac4a..b08f6b47236de9 100644 --- a/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClusters.h +++ b/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClusters.h @@ -623,15 +623,6 @@ class DLL_EXPORT ElectricalMeasurementCluster : public ClusterBase ~ElectricalMeasurementCluster() {} }; -class DLL_EXPORT ClientMonitoringCluster : public ClusterBase -{ -public: - ClientMonitoringCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : - ClusterBase(exchangeManager, session, endpoint) - {} - ~ClientMonitoringCluster() {} -}; - class DLL_EXPORT UnitTestingCluster : public ClusterBase { public: diff --git a/zzz_generated/darwin/controller-clusters/zap-generated/endpoint_config.h b/zzz_generated/darwin/controller-clusters/zap-generated/endpoint_config.h index 3d74200cb77c4f..7e8e00618681b5 100644 --- a/zzz_generated/darwin/controller-clusters/zap-generated/endpoint_config.h +++ b/zzz_generated/darwin/controller-clusters/zap-generated/endpoint_config.h @@ -59,7 +59,7 @@ #define GENERATED_FUNCTION_ARRAYS // This is an array of EmberAfCluster structures. -#define GENERATED_CLUSTER_COUNT 66 +#define GENERATED_CLUSTER_COUNT 65 // clang-format off #define GENERATED_CLUSTERS { \ { \ @@ -894,19 +894,6 @@ .eventList = nullptr, \ .eventCount = 0, \ },\ - { \ - /* Endpoint: 1, Cluster: Client Monitoring (client) */ \ - .clusterId = 0x00001046, \ - .attributes = ZAP_ATTRIBUTE_INDEX(0), \ - .attributeCount = 0, \ - .clusterSize = 0, \ - .mask = ZAP_CLUSTER_MASK(CLIENT), \ - .functions = NULL, \ - .acceptedCommandList = nullptr, \ - .generatedCommandList = nullptr, \ - .eventList = nullptr, \ - .eventCount = 0, \ - },\ { \ /* Endpoint: 1, Cluster: Unit Testing (client) */ \ .clusterId = 0xFFF1FC05, \ @@ -929,7 +916,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 66, 0 }, \ + { ZAP_CLUSTER_INDEX(0), 65, 0 }, \ } // Largest attribute size is needed for various buffers diff --git a/zzz_generated/darwin/controller-clusters/zap-generated/gen_config.h b/zzz_generated/darwin/controller-clusters/zap-generated/gen_config.h index 9652d781baf6e5..1800d8c39bb740 100644 --- a/zzz_generated/darwin/controller-clusters/zap-generated/gen_config.h +++ b/zzz_generated/darwin/controller-clusters/zap-generated/gen_config.h @@ -85,7 +85,6 @@ #define EMBER_AF_APPLICATION_BASIC_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_ACCOUNT_LOGIN_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_ELECTRICAL_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) -#define EMBER_AF_CLIENT_MONITORING_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_UNIT_TESTING_CLUSTER_CLIENT_ENDPOINT_COUNT (1) /**** Cluster Plugins ****/ @@ -346,10 +345,6 @@ #define ZCL_USING_ELECTRICAL_MEASUREMENT_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_ELECTRICAL_MEASUREMENT_CLIENT -// Use this macro to check if the client side of the Client Monitoring cluster is included -#define ZCL_USING_CLIENT_MONITORING_CLUSTER_CLIENT -#define EMBER_AF_PLUGIN_CLIENT_MONITORING_CLIENT - // Use this macro to check if the client side of the Unit Testing cluster is included #define ZCL_USING_UNIT_TESTING_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_UNIT_TESTING_CLIENT