From 201790886ef7f50cc38ea1fb56170acb1a5c7bdc Mon Sep 17 00:00:00 2001 From: fesseha-eve <88329315+fessehaeve@users.noreply.github.com> Date: Fri, 3 Dec 2021 20:42:09 +0100 Subject: [PATCH] Pull request/power source configuration cluster (#12209) * Implemented Power source configuration cluster * Add power source configuration in all-clusters-app and controller-clusters * Autogenerate all * Clean up zap errors trickled down from ToT * Added power source configuration implementation - A read on Sources attribute searches for all power source server clusters and decodes it in the response * Enabled Power source configuration and Power source clusters in lock-app * Regenerate all Regenerate all after rebasing on ToT * Changed Sources attribute to external since lists can not be defined in ZAP right now * Add power source configuration source file for mbed and esp32 compilation + regenerate all * Regenerate after rebase. Not sure why this on off related code always toggles on autogen. * Improved read implementation * Corrected INVALID_PATH logic * Add missing source for Power source configuration cluster * Updated descriptor cluster server tests to include Power source configuration cluster * Regenerate all after rebase on ToT Regenerate after changing descriptor cluster tests * Use endpoint 0 for Power source configuration cluster test * Regenerate after rebase on ToT Rebase and regenerate Rebase and regenerate * Renamed confusing variable name * Rebase and regen --- .../all-clusters-common/all-clusters-app.zap | 296 +- .../esp32/main/CMakeLists.txt | 1 + examples/all-clusters-app/mbed/CMakeLists.txt | 1 + examples/lock-app/esp32/main/CMakeLists.txt | 2 + examples/lock-app/lock-common/lock-app.zap | 333 + examples/lock-app/mbed/CMakeLists.txt | 1 + .../power-source-configuration-server.cpp | 97 + .../tests/suites/TestDescriptorCluster.yaml | 1 + .../power-source-configuration-cluster.xml | 16 +- src/app/zap-templates/zcl/zcl.json | 1 - src/app/zap_cluster_list.py | 4 +- .../data_model/controller-clusters.zap | 312 +- .../java/zap-generated/CHIPCallbackTypes.h | 33 +- .../java/zap-generated/CHIPClusters-JNI.cpp | 816 +- .../zap-generated/CHIPClustersRead-JNI.cpp | 585 +- .../java/zap-generated/CHIPReadCallbacks.cpp | 89 + .../java/zap-generated/CHIPReadCallbacks.h | 24 + .../chip/devicecontroller/ChipClusters.java | 348 +- .../devicecontroller/ClusterInfoMapping.java | 37 + .../devicecontroller/ClusterReadMapping.java | 206 +- .../devicecontroller/ClusterWriteMapping.java | 20 +- .../python/chip/clusters/CHIPClusters.cpp | 11344 ++++++++++++++++ .../python/chip/clusters/CHIPClusters.py | 105 +- .../python/chip/clusters/Objects.py | 16 + src/darwin/Framework/CHIP/templates/helper.js | 1 + .../CHIP/zap-generated/CHIPCallbackBridge.mm | 20 + .../CHIPCallbackBridge_internal.h | 11 + .../CHIP/zap-generated/CHIPClustersObjc.h | 125 +- .../CHIP/zap-generated/CHIPClustersObjc.mm | 601 +- .../zap-generated/CHIPClustersObjc_internal.h | 4 + .../CHIP/zap-generated/CHIPTestClustersObjc.h | 26 +- .../zap-generated/CHIPTestClustersObjc.mm | 306 +- .../Framework/CHIPTests/CHIPClustersTests.m | 454 +- .../PluginApplicationCallbacks.h | 1 + .../zap-generated/attribute-size.cpp | 29 + .../zap-generated/callback-stub.cpp | 8 + .../zap-generated/endpoint_config.h | 538 +- .../zap-generated/gen_config.h | 6 + .../app-common/zap-generated/attribute-id.h | 1 + .../zap-generated/attributes/Accessors.cpp | 6 + .../zap-generated/attributes/Accessors.h | 6 + .../zap-generated/cluster-objects.h | 12 + .../app-common/zap-generated/ids/Attributes.h | 4 + .../zap-generated/cluster/Commands.h | 2152 +-- .../zap-generated/reporting/Commands.h | 78 - .../chip-tool/zap-generated/test/Commands.h | 30 +- .../zap-generated/CHIPClientCallbacks.cpp | 21 + .../zap-generated/CHIPClientCallbacks.h | 5 + .../zap-generated/CHIPClusters.cpp | 427 +- .../zap-generated/CHIPClusters.h | 74 +- .../PluginApplicationCallbacks.h | 1 + .../zap-generated/callback-stub.cpp | 8 + .../zap-generated/endpoint_config.h | 104 +- .../zap-generated/gen_config.h | 5 + .../zap-generated/tests/CHIPClustersTest.cpp | 145 +- .../zap-generated/tests/CHIPClustersTest.h | 36 +- .../PluginApplicationCallbacks.h | 2 + .../lock-app/zap-generated/attribute-size.cpp | 29 + .../lock-app/zap-generated/callback-stub.cpp | 16 + .../lock-app/zap-generated/endpoint_config.h | 524 +- .../lock-app/zap-generated/gen_config.h | 12 + 61 files changed, 13825 insertions(+), 6691 deletions(-) create mode 100644 src/app/clusters/power-source-configuration-server/power-source-configuration-server.cpp create mode 100644 src/controller/python/chip/clusters/CHIPClusters.cpp 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 65df1f07560b01..840a3846316938 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 @@ -1417,6 +1417,57 @@ } ] }, + { + "name": "Power Source Configuration", + "code": 46, + "mfgCode": null, + "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Power Source Configuration", + "code": 46, + "mfgCode": null, + "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "Sources", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "General Commissioning", "code": 48, @@ -9139,251 +9190,8 @@ "define": "BRIDGED_DEVICE_BASIC_CLUSTER", "side": "server", "enabled": 1, - "commands": [ - { - "name": "StartUp", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "ShutDown", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "Leave", - "code": 2, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "ReachableChanged", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - } - ], + "commands": [], "attributes": [ - { - "name": "VendorName", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "VendorID", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductName", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "NodeLabel", - "code": 5, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "HardwareVersion", - "code": 7, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "HardwareVersionString", - "code": 8, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SoftwareVersion", - "code": 9, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SoftwareVersionString", - "code": 10, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ManufacturingDate", - "code": 11, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "PartNumber", - "code": 12, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductURL", - "code": 13, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductLabel", - "code": 14, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SerialNumber", - "code": 15, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "Reachable", - "code": 17, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, { "name": "ClusterRevision", "code": 65533, diff --git a/examples/all-clusters-app/esp32/main/CMakeLists.txt b/examples/all-clusters-app/esp32/main/CMakeLists.txt index 804eb4c365185b..78a2a7b8661456 100644 --- a/examples/all-clusters-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/main/CMakeLists.txt @@ -73,6 +73,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ethernet_network_diagnostics_server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/wifi_network_diagnostics_server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/pump-configuration-and-control-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/power-source-configuration-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common/src" #${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ias-zone-client ) diff --git a/examples/all-clusters-app/mbed/CMakeLists.txt b/examples/all-clusters-app/mbed/CMakeLists.txt index 2357c24ea3017f..c6b1eb1fd336a9 100644 --- a/examples/all-clusters-app/mbed/CMakeLists.txt +++ b/examples/all-clusters-app/mbed/CMakeLists.txt @@ -137,6 +137,7 @@ target_sources(${APP_TARGET} PRIVATE ${APP_CLUSTERS}/identify-server/identify-server.cpp ${APP_CLUSTERS}/window-covering-server/window-covering-server.cpp ${APP_CLUSTERS}/general_diagnostics_server/general_diagnostics_server.cpp + ${APP_CLUSTERS}/power-source-configuration-server/power-source-configuration-server.cpp ) target_link_libraries(${APP_TARGET} mbed-os-posix-socket mbed-os mbed-ble mbed-events mbed-netsocket mbed-storage mbed-storage-kv-global-api mbed-mbedtls mbed-emac chip) diff --git a/examples/lock-app/esp32/main/CMakeLists.txt b/examples/lock-app/esp32/main/CMakeLists.txt index ce2c2116ca6e59..a0f804c93478aa 100644 --- a/examples/lock-app/esp32/main/CMakeLists.txt +++ b/examples/lock-app/esp32/main/CMakeLists.txt @@ -53,6 +53,7 @@ idf_component_register(INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/wifi_network_diagnostics_server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/software_diagnostics_server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general_diagnostics_server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/power-source-configuration-server" PRIV_REQUIRES bt chip QRCode) get_filename_component(CHIP_ROOT ../third_party/connectedhomeip REALPATH) @@ -142,6 +143,7 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/on-off-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/operational-credentials-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general-commissioning-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/power-source-configuration-server" PRIV_REQUIRES chip QRCode bt) set_property(TARGET ${COMPONENT_LIB} PROPERTY CXX_STANDARD 17) diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index 70b95007c712d5..58ed740597e982 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -1184,6 +1184,168 @@ } ] }, + { + "name": "Power Source Configuration", + "code": 46, + "mfgCode": null, + "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Power Source Configuration", + "code": 46, + "mfgCode": null, + "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "Sources", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Power Source", + "code": 47, + "mfgCode": null, + "define": "POWER_SOURCE_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Power Source", + "code": 47, + "mfgCode": null, + "define": "POWER_SOURCE_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "Status", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Order", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Description", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "USB", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WiredAssessedCurrent", + "code": 6, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "General Commissioning", "code": 48, @@ -5090,6 +5252,177 @@ } ] }, + { + "name": "Power Source", + "code": 47, + "mfgCode": null, + "define": "POWER_SOURCE_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Power Source", + "code": 47, + "mfgCode": null, + "define": "POWER_SOURCE_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "Status", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Order", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Description", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "Battery", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WiredAssessedCurrent", + "code": 6, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatteryChargeLevel", + "code": 14, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatteryReplacementNeeded", + "code": 15, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatteryReplaceability", + "code": 16, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatteryReplacementDescription", + "code": 19, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0A", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Occupancy Sensing", "code": 1030, diff --git a/examples/lock-app/mbed/CMakeLists.txt b/examples/lock-app/mbed/CMakeLists.txt index d6ca61db3ac0d2..1fc39a643cc919 100644 --- a/examples/lock-app/mbed/CMakeLists.txt +++ b/examples/lock-app/mbed/CMakeLists.txt @@ -89,6 +89,7 @@ target_sources(${APP_TARGET} PRIVATE ${CHIP_ROOT}/src/app/clusters/network-commissioning/network-commissioning.cpp ${CHIP_ROOT}/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp ${CHIP_ROOT}/src/app/clusters/on-off-server/on-off-server.cpp + ${CHIP_ROOT}/src/app/clusters/power-source-configuration-server/power-source-configuration-server.cpp ) target_link_libraries(${APP_TARGET} mbed-os-posix-socket mbed-os mbed-ble mbed-events mbed-netsocket mbed-storage mbed-storage-kv-global-api mbed-mbedtls mbed-emac chip) diff --git a/src/app/clusters/power-source-configuration-server/power-source-configuration-server.cpp b/src/app/clusters/power-source-configuration-server/power-source-configuration-server.cpp new file mode 100644 index 00000000000000..9f17ee23590589 --- /dev/null +++ b/src/app/clusters/power-source-configuration-server/power-source-configuration-server.cpp @@ -0,0 +1,97 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/**************************************************************************** + * @file + * @brief Implementation for the Descriptor Server Cluster + ***************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::PowerSourceConfiguration::Attributes; + +namespace { + +class PowerSourceConfigurationAttrAccess : public AttributeAccessInterface +{ +public: + // Register on all endpoints. + PowerSourceConfigurationAttrAccess() : AttributeAccessInterface(Optional::Missing(), PowerSourceConfiguration::Id) + {} + + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; +}; + +PowerSourceConfigurationAttrAccess gAttrAccess; + +CHIP_ERROR PowerSourceConfigurationAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + if (aPath.mClusterId != PowerSourceConfiguration::Id || aPath.mEndpointId != 0x00) + { + return CHIP_ERROR_INVALID_PATH_LIST; + } + + switch (aPath.mAttributeId) + { + case Sources::Id: + err = aEncoder.EncodeList([](const TagBoundEncoder & encoder) -> CHIP_ERROR { + uint16_t clusterCount = 0; + + for (uint16_t endpointIndex = 0; endpointIndex < emberAfEndpointCount(); endpointIndex++) + { + clusterCount = emberAfClusterCount(endpointIndex, true); + + for (uint8_t clusterIndex = 0; clusterIndex < clusterCount; clusterIndex++) + { + EmberAfCluster * cluster = emberAfGetNthCluster(endpointIndex, clusterIndex, true); + + if (cluster->clusterId == PowerSource::Id) + { + ReturnErrorOnFailure(encoder.Encode(endpointIndex)); + break; // There is only 1 server cluster per endpoint + } + } + } + + return CHIP_NO_ERROR; + }); + break; + default: + break; + } + + return err; +} + +} // anonymous namespace + +void MatterPowerSourceConfigurationPluginServerInitCallback(void) +{ + registerAttributeAccessOverride(&gAttrAccess); +} diff --git a/src/app/tests/suites/TestDescriptorCluster.yaml b/src/app/tests/suites/TestDescriptorCluster.yaml index ec787d928d6802..41ee3a11fd0955 100644 --- a/src/app/tests/suites/TestDescriptorCluster.yaml +++ b/src/app/tests/suites/TestDescriptorCluster.yaml @@ -39,6 +39,7 @@ tests: 0x0028, # Basic Information 0x0029, # OTA Software Update Provider 0x002A, # OTA Software Update Requestor + 0x002E, # Power Source Configuration 0x0030, # General Commissioning 0x0031, # Network Commissioning 0x0032, # Diagnostic Logs diff --git a/src/app/zap-templates/zcl/data-model/chip/power-source-configuration-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/power-source-configuration-cluster.xml index 0660a40963ed99..23d802ac115043 100644 --- a/src/app/zap-templates/zcl/data-model/chip/power-source-configuration-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/power-source-configuration-cluster.xml @@ -17,21 +17,15 @@ limitations under the License. - - General Power Source Configuration - 0x002e + CHIP + This cluster is used to describe the configuration and capabilities of a Device's power system. + 0x002E POWER_SOURCE_CONFIGURATION_CLUSTER true true - This cluster is used to describe the configuration and capabilities of a Device’s power system. It is -among the clusters referenced by the Root Node device type, and provides an ordering overview as -well as linking to the one or more endpoints each carrying a Power device type and Power Source -cluster. - - - - + + Sources diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index 2f67b24b5124b0..2ffebaae0cebed 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -12,7 +12,6 @@ "boolean-state-cluster.xml", "bridged-actions-cluster.xml", "bridged-device-basic.xml", - "bridged-device-basic-information-cluster.xml", "chip-ota.xml", "chip-types.xml", "clusters-extensions.xml", diff --git a/src/app/zap_cluster_list.py b/src/app/zap_cluster_list.py index ff0d53a307a099..18a0a70f89f547 100755 --- a/src/app/zap_cluster_list.py +++ b/src/app/zap_cluster_list.py @@ -53,8 +53,8 @@ 'OTA_BOOTLOAD_CLUSTER': [], 'OTA_PROVIDER_CLUSTER': ['ota-provider'], 'OTA_REQUESTOR_CLUSTER': [], - 'POWER_CONFIG_CLUSTER': [], 'POWER_SOURCE_CLUSTER': [], + 'POWER_SOURCE_CONFIGURATION_CLUSTER': ['power-source-configuration-server'], 'PRESSURE_MEASUREMENT_CLUSTER': [], 'PUMP_CONFIG_CONTROL_CLUSTER': ['pump-configuration-and-control-server'], 'RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER': [], @@ -121,8 +121,8 @@ 'OTA_BOOTLOAD_CLUSTER': [], 'OTA_PROVIDER_CLUSTER': [], 'OTA_REQUESTOR_CLUSTER': [], - 'POWER_CONFIG_CLUSTER': [], 'POWER_SOURCE_CLUSTER': [], + 'POWER_SOURCE_CONFIGURATION_CLUSTER': [], 'PRESSURE_MEASUREMENT_CLUSTER': [], 'PUMP_CONFIG_CONTROL_CLUSTER': ['pump-configuration-and-control-client'], 'RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER': [], diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index b6b1149c19bb2b..db8ab8eda2853f 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -2093,6 +2093,73 @@ } ] }, + { + "name": "Power Source Configuration", + "code": 46, + "mfgCode": null, + "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Power Source Configuration", + "code": 46, + "mfgCode": null, + "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [], + "attributes": [ + { + "name": "Sources", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Power Source", "code": 47, @@ -4941,251 +5008,8 @@ "define": "BRIDGED_DEVICE_BASIC_CLUSTER", "side": "server", "enabled": 0, - "commands": [ - { - "name": "StartUp", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 0 - }, - { - "name": "ShutDown", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 0 - }, - { - "name": "Leave", - "code": 2, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 0 - }, - { - "name": "ReachableChanged", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 0 - } - ], + "commands": [], "attributes": [ - { - "name": "VendorName", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "VendorID", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductName", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "NodeLabel", - "code": 5, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "HardwareVersion", - "code": 7, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "HardwareVersionString", - "code": 8, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SoftwareVersion", - "code": 9, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SoftwareVersionString", - "code": 10, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ManufacturingDate", - "code": 11, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "PartNumber", - "code": 12, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductURL", - "code": 13, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductLabel", - "code": 14, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SerialNumber", - "code": 15, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "Reachable", - "code": 17, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, { "name": "ClusterRevision", "code": 65533, diff --git a/src/controller/java/zap-generated/CHIPCallbackTypes.h b/src/controller/java/zap-generated/CHIPCallbackTypes.h index 40dbc7f5b9d083..426ebe3e0174e9 100644 --- a/src/controller/java/zap-generated/CHIPCallbackTypes.h +++ b/src/controller/java/zap-generated/CHIPCallbackTypes.h @@ -145,34 +145,6 @@ typedef void (*CHIPBridgedActionsClusterSetupUrlAttributeCallbackType)( typedef void (*CHIPBridgedActionsClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::BridgedActions::Attributes::ClusterRevision::TypeInfo::DecodableArgType); -typedef void (*CHIPBridgedDeviceBasicClusterVendorNameAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::VendorName::TypeInfo::DecodableArgType); -typedef void (*CHIPBridgedDeviceBasicClusterVendorIDAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::VendorID::TypeInfo::DecodableArgType); -typedef void (*CHIPBridgedDeviceBasicClusterProductNameAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::ProductName::TypeInfo::DecodableArgType); -typedef void (*CHIPBridgedDeviceBasicClusterNodeLabelAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo::DecodableArgType); -typedef void (*CHIPBridgedDeviceBasicClusterHardwareVersionAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::HardwareVersion::TypeInfo::DecodableArgType); -typedef void (*CHIPBridgedDeviceBasicClusterHardwareVersionStringAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::HardwareVersionString::TypeInfo::DecodableArgType); -typedef void (*CHIPBridgedDeviceBasicClusterSoftwareVersionAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::SoftwareVersion::TypeInfo::DecodableArgType); -typedef void (*CHIPBridgedDeviceBasicClusterSoftwareVersionStringAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::SoftwareVersionString::TypeInfo::DecodableArgType); -typedef void (*CHIPBridgedDeviceBasicClusterManufacturingDateAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::ManufacturingDate::TypeInfo::DecodableArgType); -typedef void (*CHIPBridgedDeviceBasicClusterPartNumberAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::PartNumber::TypeInfo::DecodableArgType); -typedef void (*CHIPBridgedDeviceBasicClusterProductURLAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::ProductURL::TypeInfo::DecodableArgType); -typedef void (*CHIPBridgedDeviceBasicClusterProductLabelAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::ProductLabel::TypeInfo::DecodableArgType); -typedef void (*CHIPBridgedDeviceBasicClusterSerialNumberAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::SerialNumber::TypeInfo::DecodableArgType); -typedef void (*CHIPBridgedDeviceBasicClusterReachableAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::Reachable::TypeInfo::DecodableArgType); typedef void (*CHIPBridgedDeviceBasicClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::ClusterRevision::TypeInfo::DecodableArgType); @@ -683,6 +655,11 @@ typedef void (*CHIPPowerSourceClusterFeatureMapAttributeCallbackType)( typedef void (*CHIPPowerSourceClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::PowerSource::Attributes::ClusterRevision::TypeInfo::DecodableArgType); +typedef void (*CHIPPowerSourceConfigurationClusterSourcesAttributeCallbackType)( + void *, const chip::app::Clusters::PowerSourceConfiguration::Attributes::Sources::TypeInfo::DecodableType &); +typedef void (*CHIPPowerSourceConfigurationClusterClusterRevisionAttributeCallbackType)( + void *, chip::app::Clusters::PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo::DecodableArgType); + typedef void (*CHIPPressureMeasurementClusterMeasuredValueAttributeCallbackType)( void *, chip::app::Clusters::PressureMeasurement::Attributes::MeasuredValue::TypeInfo::DecodableArgType); typedef void (*CHIPPressureMeasurementClusterMinMeasuredValueAttributeCallbackType)( diff --git a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp index ea3e97921619a3..e08dea3c1cc44f 100644 --- a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp @@ -4014,813 +4014,6 @@ JNI_METHOD(jlong, BridgedDeviceBasicCluster, initWithDevice)(JNIEnv * env, jobje return reinterpret_cast(cppCluster); } -JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeVendorNameAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->SubscribeAttributeVendorName(onSuccess->Cancel(), onFailure->Cancel(), static_cast(minInterval), - static_cast(maxInterval)); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BridgedDeviceBasicCluster, reportVendorNameAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onReport( - Platform::New(callback, true), Platform::Delete); - VerifyOrReturn(onReport.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->ReportAttributeVendorName(onReport->Cancel()); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error registering for attribute reporting", err)); - - onReport.release(); -} -JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeVendorIDAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->SubscribeAttributeVendorID(onSuccess->Cancel(), onFailure->Cancel(), static_cast(minInterval), - static_cast(maxInterval)); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BridgedDeviceBasicCluster, reportVendorIDAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onReport( - Platform::New(callback, true), Platform::Delete); - VerifyOrReturn(onReport.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->ReportAttributeVendorID(onReport->Cancel()); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error registering for attribute reporting", err)); - - onReport.release(); -} -JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeProductNameAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->SubscribeAttributeProductName(onSuccess->Cancel(), onFailure->Cancel(), static_cast(minInterval), - static_cast(maxInterval)); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BridgedDeviceBasicCluster, reportProductNameAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onReport( - Platform::New(callback, true), Platform::Delete); - VerifyOrReturn(onReport.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->ReportAttributeProductName(onReport->Cancel()); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error registering for attribute reporting", err)); - - onReport.release(); -} - -JNI_METHOD(void, BridgedDeviceBasicCluster, writeNodeLabelAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = chip::JniUtfString(env, static_cast(value)).charSpan(); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} -JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeNodeLabelAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->SubscribeAttributeNodeLabel(onSuccess->Cancel(), onFailure->Cancel(), static_cast(minInterval), - static_cast(maxInterval)); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BridgedDeviceBasicCluster, reportNodeLabelAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onReport( - Platform::New(callback, true), Platform::Delete); - VerifyOrReturn(onReport.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->ReportAttributeNodeLabel(onReport->Cancel()); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error registering for attribute reporting", err)); - - onReport.release(); -} -JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeHardwareVersionAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->SubscribeAttributeHardwareVersion(onSuccess->Cancel(), onFailure->Cancel(), - static_cast(minInterval), static_cast(maxInterval)); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BridgedDeviceBasicCluster, reportHardwareVersionAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onReport( - Platform::New(callback, true), Platform::Delete); - VerifyOrReturn(onReport.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->ReportAttributeHardwareVersion(onReport->Cancel()); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error registering for attribute reporting", err)); - - onReport.release(); -} -JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeHardwareVersionStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->SubscribeAttributeHardwareVersionString( - onSuccess->Cancel(), onFailure->Cancel(), static_cast(minInterval), static_cast(maxInterval)); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BridgedDeviceBasicCluster, reportHardwareVersionStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onReport( - Platform::New(callback, true), Platform::Delete); - VerifyOrReturn(onReport.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->ReportAttributeHardwareVersionString(onReport->Cancel()); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error registering for attribute reporting", err)); - - onReport.release(); -} -JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeSoftwareVersionAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->SubscribeAttributeSoftwareVersion(onSuccess->Cancel(), onFailure->Cancel(), - static_cast(minInterval), static_cast(maxInterval)); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BridgedDeviceBasicCluster, reportSoftwareVersionAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onReport( - Platform::New(callback, true), Platform::Delete); - VerifyOrReturn(onReport.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->ReportAttributeSoftwareVersion(onReport->Cancel()); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error registering for attribute reporting", err)); - - onReport.release(); -} -JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeSoftwareVersionStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->SubscribeAttributeSoftwareVersionString( - onSuccess->Cancel(), onFailure->Cancel(), static_cast(minInterval), static_cast(maxInterval)); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BridgedDeviceBasicCluster, reportSoftwareVersionStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onReport( - Platform::New(callback, true), Platform::Delete); - VerifyOrReturn(onReport.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->ReportAttributeSoftwareVersionString(onReport->Cancel()); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error registering for attribute reporting", err)); - - onReport.release(); -} -JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeManufacturingDateAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->SubscribeAttributeManufacturingDate(onSuccess->Cancel(), onFailure->Cancel(), - static_cast(minInterval), static_cast(maxInterval)); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BridgedDeviceBasicCluster, reportManufacturingDateAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onReport( - Platform::New(callback, true), Platform::Delete); - VerifyOrReturn(onReport.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->ReportAttributeManufacturingDate(onReport->Cancel()); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error registering for attribute reporting", err)); - - onReport.release(); -} -JNI_METHOD(void, BridgedDeviceBasicCluster, subscribePartNumberAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->SubscribeAttributePartNumber(onSuccess->Cancel(), onFailure->Cancel(), static_cast(minInterval), - static_cast(maxInterval)); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BridgedDeviceBasicCluster, reportPartNumberAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onReport( - Platform::New(callback, true), Platform::Delete); - VerifyOrReturn(onReport.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->ReportAttributePartNumber(onReport->Cancel()); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error registering for attribute reporting", err)); - - onReport.release(); -} -JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeProductURLAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->SubscribeAttributeProductURL(onSuccess->Cancel(), onFailure->Cancel(), static_cast(minInterval), - static_cast(maxInterval)); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BridgedDeviceBasicCluster, reportProductURLAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onReport( - Platform::New(callback, true), Platform::Delete); - VerifyOrReturn(onReport.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->ReportAttributeProductURL(onReport->Cancel()); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error registering for attribute reporting", err)); - - onReport.release(); -} -JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeProductLabelAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->SubscribeAttributeProductLabel(onSuccess->Cancel(), onFailure->Cancel(), static_cast(minInterval), - static_cast(maxInterval)); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BridgedDeviceBasicCluster, reportProductLabelAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onReport( - Platform::New(callback, true), Platform::Delete); - VerifyOrReturn(onReport.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->ReportAttributeProductLabel(onReport->Cancel()); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error registering for attribute reporting", err)); - - onReport.release(); -} -JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeSerialNumberAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->SubscribeAttributeSerialNumber(onSuccess->Cancel(), onFailure->Cancel(), static_cast(minInterval), - static_cast(maxInterval)); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BridgedDeviceBasicCluster, reportSerialNumberAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onReport( - Platform::New(callback, true), Platform::Delete); - VerifyOrReturn(onReport.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->ReportAttributeSerialNumber(onReport->Cancel()); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error registering for attribute reporting", err)); - - onReport.release(); -} -JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeReachableAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->SubscribeAttributeReachable(onSuccess->Cancel(), onFailure->Cancel(), static_cast(minInterval), - static_cast(maxInterval)); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BridgedDeviceBasicCluster, reportReachableAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onReport( - Platform::New(callback, true), Platform::Delete); - VerifyOrReturn(onReport.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->ReportAttributeReachable(onReport->Cancel()); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error registering for attribute reporting", err)); - - onReport.release(); -} JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -20147,6 +19340,15 @@ JNI_METHOD(void, PowerSourceCluster, reportClusterRevisionAttribute)(JNIEnv * en onReport.release(); } +JNI_METHOD(jlong, PowerSourceConfigurationCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +{ + chip::DeviceLayer::StackLock lock; + PowerSourceConfigurationCluster * cppCluster = new PowerSourceConfigurationCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} + JNI_METHOD(jlong, PressureMeasurementCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; diff --git a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp index f5415b29ebd1ae..ac2ee3c2795e04 100644 --- a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp @@ -1881,516 +1881,6 @@ JNI_METHOD(void, BridgedActionsCluster, readClusterRevisionAttribute) onFailure.release(); } -JNI_METHOD(void, BridgedDeviceBasicCluster, readVendorNameAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::BridgedDeviceBasic::Attributes::VendorName::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), - chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::BridgedDeviceBasicCluster * cppCluster = - reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BridgedDeviceBasicCluster, readVendorIDAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::BridgedDeviceBasic::Attributes::VendorID::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::BridgedDeviceBasicCluster * cppCluster = - reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BridgedDeviceBasicCluster, readProductNameAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::BridgedDeviceBasic::Attributes::ProductName::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), - chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::BridgedDeviceBasicCluster * cppCluster = - reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BridgedDeviceBasicCluster, readNodeLabelAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), - chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::BridgedDeviceBasicCluster * cppCluster = - reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BridgedDeviceBasicCluster, readHardwareVersionAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::BridgedDeviceBasic::Attributes::HardwareVersion::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::BridgedDeviceBasicCluster * cppCluster = - reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BridgedDeviceBasicCluster, readHardwareVersionStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::BridgedDeviceBasic::Attributes::HardwareVersionString::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), - chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::BridgedDeviceBasicCluster * cppCluster = - reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BridgedDeviceBasicCluster, readSoftwareVersionAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::BridgedDeviceBasic::Attributes::SoftwareVersion::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::BridgedDeviceBasicCluster * cppCluster = - reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BridgedDeviceBasicCluster, readSoftwareVersionStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::BridgedDeviceBasic::Attributes::SoftwareVersionString::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), - chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::BridgedDeviceBasicCluster * cppCluster = - reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BridgedDeviceBasicCluster, readManufacturingDateAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::BridgedDeviceBasic::Attributes::ManufacturingDate::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), - chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::BridgedDeviceBasicCluster * cppCluster = - reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BridgedDeviceBasicCluster, readPartNumberAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::BridgedDeviceBasic::Attributes::PartNumber::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), - chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::BridgedDeviceBasicCluster * cppCluster = - reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BridgedDeviceBasicCluster, readProductURLAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::BridgedDeviceBasic::Attributes::ProductURL::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), - chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::BridgedDeviceBasicCluster * cppCluster = - reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BridgedDeviceBasicCluster, readProductLabelAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::BridgedDeviceBasic::Attributes::ProductLabel::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), - chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::BridgedDeviceBasicCluster * cppCluster = - reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BridgedDeviceBasicCluster, readSerialNumberAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::BridgedDeviceBasic::Attributes::SerialNumber::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), - chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::BridgedDeviceBasicCluster * cppCluster = - reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BridgedDeviceBasicCluster, readReachableAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::BridgedDeviceBasic::Attributes::Reachable::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::BridgedDeviceBasicCluster * cppCluster = - reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - JNI_METHOD(void, BridgedDeviceBasicCluster, readClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { @@ -9237,6 +8727,81 @@ JNI_METHOD(void, PowerSourceCluster, readClusterRevisionAttribute)(JNIEnv * env, onFailure.release(); } +JNI_METHOD(void, PowerSourceConfigurationCluster, readSourcesAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::PowerSourceConfiguration::Attributes::Sources::TypeInfo; + std::unique_ptr + onSuccess(chip::Platform::New(callback, false), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::PowerSourceConfigurationCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, PowerSourceConfigurationCluster, readClusterRevisionAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; + std::unique_ptr onSuccess( + chip::Platform::New(callback, false), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::PowerSourceConfigurationCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, PressureMeasurementCluster, readMeasuredValueAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 82cf4da1419695..43e4db1f0d0117 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -3756,6 +3756,95 @@ void CHIPPowerSourceActiveBatteryFaultsAttributeCallback::CallbackFn(void * cont env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } +CHIPPowerSourceConfigurationSourcesAttributeCallback::CHIPPowerSourceConfigurationSourcesAttributeCallback(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"); + } +} + +CHIPPowerSourceConfigurationSourcesAttributeCallback::~CHIPPowerSourceConfigurationSourcesAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPowerSourceConfigurationSourcesAttributeCallback::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")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + 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")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + uint8_t entryValue = entry; + + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding SourcesAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback:: CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index b497adff751538..215a7c4bd239f0 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -1037,6 +1037,30 @@ class CHIPPowerSourceActiveBatteryFaultsAttributeCallback bool keepAlive; }; +class CHIPPowerSourceConfigurationSourcesAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPPowerSourceConfigurationSourcesAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPPowerSourceConfigurationSourcesAttributeCallback(); + + static void maybeDestroy(CHIPPowerSourceConfigurationSourcesAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + class CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback : public chip::Callback::Callback { diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 6bd507ad9ba6cd..d769c8f70a0fae 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -1820,192 +1820,6 @@ public static long clusterId() { @Override public native long initWithDevice(long devicePtr, int endpointId); - public void readVendorNameAttribute(CharStringAttributeCallback callback) { - readVendorNameAttribute(chipClusterPtr, callback); - } - - public void subscribeVendorNameAttribute( - DefaultClusterCallback callback, int minInterval, int maxInterval) { - subscribeVendorNameAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void reportVendorNameAttribute(CharStringAttributeCallback callback) { - reportVendorNameAttribute(chipClusterPtr, callback); - } - - public void readVendorIDAttribute(IntegerAttributeCallback callback) { - readVendorIDAttribute(chipClusterPtr, callback); - } - - public void subscribeVendorIDAttribute( - DefaultClusterCallback callback, int minInterval, int maxInterval) { - subscribeVendorIDAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void reportVendorIDAttribute(IntegerAttributeCallback callback) { - reportVendorIDAttribute(chipClusterPtr, callback); - } - - public void readProductNameAttribute(CharStringAttributeCallback callback) { - readProductNameAttribute(chipClusterPtr, callback); - } - - public void subscribeProductNameAttribute( - DefaultClusterCallback callback, int minInterval, int maxInterval) { - subscribeProductNameAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void reportProductNameAttribute(CharStringAttributeCallback callback) { - reportProductNameAttribute(chipClusterPtr, callback); - } - - public void readNodeLabelAttribute(CharStringAttributeCallback callback) { - readNodeLabelAttribute(chipClusterPtr, callback); - } - - public void writeNodeLabelAttribute(DefaultClusterCallback callback, String value) { - writeNodeLabelAttribute(chipClusterPtr, callback, value); - } - - public void subscribeNodeLabelAttribute( - DefaultClusterCallback callback, int minInterval, int maxInterval) { - subscribeNodeLabelAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void reportNodeLabelAttribute(CharStringAttributeCallback callback) { - reportNodeLabelAttribute(chipClusterPtr, callback); - } - - public void readHardwareVersionAttribute(IntegerAttributeCallback callback) { - readHardwareVersionAttribute(chipClusterPtr, callback); - } - - public void subscribeHardwareVersionAttribute( - DefaultClusterCallback callback, int minInterval, int maxInterval) { - subscribeHardwareVersionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void reportHardwareVersionAttribute(IntegerAttributeCallback callback) { - reportHardwareVersionAttribute(chipClusterPtr, callback); - } - - public void readHardwareVersionStringAttribute(CharStringAttributeCallback callback) { - readHardwareVersionStringAttribute(chipClusterPtr, callback); - } - - public void subscribeHardwareVersionStringAttribute( - DefaultClusterCallback callback, int minInterval, int maxInterval) { - subscribeHardwareVersionStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void reportHardwareVersionStringAttribute(CharStringAttributeCallback callback) { - reportHardwareVersionStringAttribute(chipClusterPtr, callback); - } - - public void readSoftwareVersionAttribute(LongAttributeCallback callback) { - readSoftwareVersionAttribute(chipClusterPtr, callback); - } - - public void subscribeSoftwareVersionAttribute( - DefaultClusterCallback callback, int minInterval, int maxInterval) { - subscribeSoftwareVersionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void reportSoftwareVersionAttribute(LongAttributeCallback callback) { - reportSoftwareVersionAttribute(chipClusterPtr, callback); - } - - public void readSoftwareVersionStringAttribute(CharStringAttributeCallback callback) { - readSoftwareVersionStringAttribute(chipClusterPtr, callback); - } - - public void subscribeSoftwareVersionStringAttribute( - DefaultClusterCallback callback, int minInterval, int maxInterval) { - subscribeSoftwareVersionStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void reportSoftwareVersionStringAttribute(CharStringAttributeCallback callback) { - reportSoftwareVersionStringAttribute(chipClusterPtr, callback); - } - - public void readManufacturingDateAttribute(CharStringAttributeCallback callback) { - readManufacturingDateAttribute(chipClusterPtr, callback); - } - - public void subscribeManufacturingDateAttribute( - DefaultClusterCallback callback, int minInterval, int maxInterval) { - subscribeManufacturingDateAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void reportManufacturingDateAttribute(CharStringAttributeCallback callback) { - reportManufacturingDateAttribute(chipClusterPtr, callback); - } - - public void readPartNumberAttribute(CharStringAttributeCallback callback) { - readPartNumberAttribute(chipClusterPtr, callback); - } - - public void subscribePartNumberAttribute( - DefaultClusterCallback callback, int minInterval, int maxInterval) { - subscribePartNumberAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void reportPartNumberAttribute(CharStringAttributeCallback callback) { - reportPartNumberAttribute(chipClusterPtr, callback); - } - - public void readProductURLAttribute(CharStringAttributeCallback callback) { - readProductURLAttribute(chipClusterPtr, callback); - } - - public void subscribeProductURLAttribute( - DefaultClusterCallback callback, int minInterval, int maxInterval) { - subscribeProductURLAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void reportProductURLAttribute(CharStringAttributeCallback callback) { - reportProductURLAttribute(chipClusterPtr, callback); - } - - public void readProductLabelAttribute(CharStringAttributeCallback callback) { - readProductLabelAttribute(chipClusterPtr, callback); - } - - public void subscribeProductLabelAttribute( - DefaultClusterCallback callback, int minInterval, int maxInterval) { - subscribeProductLabelAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void reportProductLabelAttribute(CharStringAttributeCallback callback) { - reportProductLabelAttribute(chipClusterPtr, callback); - } - - public void readSerialNumberAttribute(CharStringAttributeCallback callback) { - readSerialNumberAttribute(chipClusterPtr, callback); - } - - public void subscribeSerialNumberAttribute( - DefaultClusterCallback callback, int minInterval, int maxInterval) { - subscribeSerialNumberAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void reportSerialNumberAttribute(CharStringAttributeCallback callback) { - reportSerialNumberAttribute(chipClusterPtr, callback); - } - - public void readReachableAttribute(BooleanAttributeCallback callback) { - readReachableAttribute(chipClusterPtr, callback); - } - - public void subscribeReachableAttribute( - DefaultClusterCallback callback, int minInterval, int maxInterval) { - subscribeReachableAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void reportReachableAttribute(BooleanAttributeCallback callback) { - reportReachableAttribute(chipClusterPtr, callback); - } - public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -2019,135 +1833,6 @@ public void reportClusterRevisionAttribute(IntegerAttributeCallback callback) { reportClusterRevisionAttribute(chipClusterPtr, callback); } - private native void readVendorNameAttribute( - long chipClusterPtr, CharStringAttributeCallback callback); - - private native void subscribeVendorNameAttribute( - long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); - - private native void reportVendorNameAttribute( - long chipClusterPtr, CharStringAttributeCallback callback); - - private native void readVendorIDAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); - - private native void subscribeVendorIDAttribute( - long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); - - private native void reportVendorIDAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); - - private native void readProductNameAttribute( - long chipClusterPtr, CharStringAttributeCallback callback); - - private native void subscribeProductNameAttribute( - long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); - - private native void reportProductNameAttribute( - long chipClusterPtr, CharStringAttributeCallback callback); - - private native void readNodeLabelAttribute( - long chipClusterPtr, CharStringAttributeCallback callback); - - private native void writeNodeLabelAttribute( - long chipClusterPtr, DefaultClusterCallback callback, String value); - - private native void subscribeNodeLabelAttribute( - long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); - - private native void reportNodeLabelAttribute( - long chipClusterPtr, CharStringAttributeCallback callback); - - private native void readHardwareVersionAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); - - private native void subscribeHardwareVersionAttribute( - long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); - - private native void reportHardwareVersionAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); - - private native void readHardwareVersionStringAttribute( - long chipClusterPtr, CharStringAttributeCallback callback); - - private native void subscribeHardwareVersionStringAttribute( - long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); - - private native void reportHardwareVersionStringAttribute( - long chipClusterPtr, CharStringAttributeCallback callback); - - private native void readSoftwareVersionAttribute( - long chipClusterPtr, LongAttributeCallback callback); - - private native void subscribeSoftwareVersionAttribute( - long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); - - private native void reportSoftwareVersionAttribute( - long chipClusterPtr, LongAttributeCallback callback); - - private native void readSoftwareVersionStringAttribute( - long chipClusterPtr, CharStringAttributeCallback callback); - - private native void subscribeSoftwareVersionStringAttribute( - long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); - - private native void reportSoftwareVersionStringAttribute( - long chipClusterPtr, CharStringAttributeCallback callback); - - private native void readManufacturingDateAttribute( - long chipClusterPtr, CharStringAttributeCallback callback); - - private native void subscribeManufacturingDateAttribute( - long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); - - private native void reportManufacturingDateAttribute( - long chipClusterPtr, CharStringAttributeCallback callback); - - private native void readPartNumberAttribute( - long chipClusterPtr, CharStringAttributeCallback callback); - - private native void subscribePartNumberAttribute( - long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); - - private native void reportPartNumberAttribute( - long chipClusterPtr, CharStringAttributeCallback callback); - - private native void readProductURLAttribute( - long chipClusterPtr, CharStringAttributeCallback callback); - - private native void subscribeProductURLAttribute( - long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); - - private native void reportProductURLAttribute( - long chipClusterPtr, CharStringAttributeCallback callback); - - private native void readProductLabelAttribute( - long chipClusterPtr, CharStringAttributeCallback callback); - - private native void subscribeProductLabelAttribute( - long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); - - private native void reportProductLabelAttribute( - long chipClusterPtr, CharStringAttributeCallback callback); - - private native void readSerialNumberAttribute( - long chipClusterPtr, CharStringAttributeCallback callback); - - private native void subscribeSerialNumberAttribute( - long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); - - private native void reportSerialNumberAttribute( - long chipClusterPtr, CharStringAttributeCallback callback); - - private native void readReachableAttribute( - long chipClusterPtr, BooleanAttributeCallback callback); - - private native void subscribeReachableAttribute( - long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); - - private native void reportReachableAttribute( - long chipClusterPtr, BooleanAttributeCallback callback); - private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -8793,6 +8478,39 @@ private native void reportClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); } + public static class PowerSourceConfigurationCluster extends BaseChipCluster { + public PowerSourceConfigurationCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + public static long clusterId() { + return Long.parseUnsignedLong("46"); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface SourcesAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + + public void readSourcesAttribute(SourcesAttributeCallback callback) { + readSourcesAttribute(chipClusterPtr, callback); + } + + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + + private native void readSourcesAttribute( + long chipClusterPtr, SourcesAttributeCallback callback); + + private native void readClusterRevisionAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + } + public static class PressureMeasurementCluster extends BaseChipCluster { public PressureMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index c1e5fb23ffc458..e018fc5f6dd8fd 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -2150,6 +2150,32 @@ public void onError(Exception ex) { } } + public static class DelegatedSourcesAttributeCallback + implements ChipClusters.PowerSourceConfigurationCluster.SourcesAttributeCallback, + 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 DelegatedAddSceneResponseCallback implements ChipClusters.ScenesCluster.AddSceneResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -3126,6 +3152,11 @@ public Map initializeClusterMap() { (ptr, endpointId) -> new ChipClusters.PowerSourceCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("powerSource", powerSourceClusterInfo); + ClusterInfo powerSourceConfigurationClusterInfo = + new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.PowerSourceConfigurationCluster(ptr, endpointId), + new HashMap<>()); + clusterMap.put("powerSourceConfiguration", powerSourceConfigurationClusterInfo); ClusterInfo pressureMeasurementClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.PressureMeasurementCluster(ptr, endpointId), @@ -3264,6 +3295,9 @@ public void combineCommand( .combineCommands(source.get("onOffSwitchConfiguration")); destination.get("operationalCredentials").combineCommands(source.get("operationalCredentials")); destination.get("powerSource").combineCommands(source.get("powerSource")); + destination + .get("powerSourceConfiguration") + .combineCommands(source.get("powerSourceConfiguration")); destination.get("pressureMeasurement").combineCommands(source.get("pressureMeasurement")); destination .get("pumpConfigurationAndControl") @@ -7124,6 +7158,9 @@ public Map> getCommandMap() { commandMap.put("operationalCredentials", operationalCredentialsClusterInteractionInfoMap); Map powerSourceClusterInteractionInfoMap = new LinkedHashMap<>(); commandMap.put("powerSource", powerSourceClusterInteractionInfoMap); + Map powerSourceConfigurationClusterInteractionInfoMap = + new LinkedHashMap<>(); + commandMap.put("powerSourceConfiguration", powerSourceConfigurationClusterInteractionInfoMap); Map pressureMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); commandMap.put("pressureMeasurement", pressureMeasurementClusterInteractionInfoMap); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java index 12df6a1498dec6..92e31f9978fccb 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java @@ -722,182 +722,6 @@ public Map> getReadAttributeMap() { "readClusterRevisionAttribute", readBridgedActionsClusterRevisionAttributeInteractionInfo); readAttributeMap.put("bridgedActions", readBridgedActionsInteractionInfo); Map readBridgedDeviceBasicInteractionInfo = new LinkedHashMap<>(); - Map readBridgedDeviceBasicVendorNameCommandParams = - new LinkedHashMap(); - InteractionInfo readBridgedDeviceBasicVendorNameAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BridgedDeviceBasicCluster) cluster) - .readVendorNameAttribute((ChipClusters.CharStringAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedCharStringAttributeCallback(), - readBridgedDeviceBasicVendorNameCommandParams); - readBridgedDeviceBasicInteractionInfo.put( - "readVendorNameAttribute", readBridgedDeviceBasicVendorNameAttributeInteractionInfo); - Map readBridgedDeviceBasicVendorIDCommandParams = - new LinkedHashMap(); - InteractionInfo readBridgedDeviceBasicVendorIDAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BridgedDeviceBasicCluster) cluster) - .readVendorIDAttribute((ChipClusters.IntegerAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readBridgedDeviceBasicVendorIDCommandParams); - readBridgedDeviceBasicInteractionInfo.put( - "readVendorIDAttribute", readBridgedDeviceBasicVendorIDAttributeInteractionInfo); - Map readBridgedDeviceBasicProductNameCommandParams = - new LinkedHashMap(); - InteractionInfo readBridgedDeviceBasicProductNameAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BridgedDeviceBasicCluster) cluster) - .readProductNameAttribute((ChipClusters.CharStringAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedCharStringAttributeCallback(), - readBridgedDeviceBasicProductNameCommandParams); - readBridgedDeviceBasicInteractionInfo.put( - "readProductNameAttribute", readBridgedDeviceBasicProductNameAttributeInteractionInfo); - Map readBridgedDeviceBasicNodeLabelCommandParams = - new LinkedHashMap(); - InteractionInfo readBridgedDeviceBasicNodeLabelAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BridgedDeviceBasicCluster) cluster) - .readNodeLabelAttribute((ChipClusters.CharStringAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedCharStringAttributeCallback(), - readBridgedDeviceBasicNodeLabelCommandParams); - readBridgedDeviceBasicInteractionInfo.put( - "readNodeLabelAttribute", readBridgedDeviceBasicNodeLabelAttributeInteractionInfo); - Map readBridgedDeviceBasicHardwareVersionCommandParams = - new LinkedHashMap(); - InteractionInfo readBridgedDeviceBasicHardwareVersionAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BridgedDeviceBasicCluster) cluster) - .readHardwareVersionAttribute((ChipClusters.IntegerAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readBridgedDeviceBasicHardwareVersionCommandParams); - readBridgedDeviceBasicInteractionInfo.put( - "readHardwareVersionAttribute", - readBridgedDeviceBasicHardwareVersionAttributeInteractionInfo); - Map readBridgedDeviceBasicHardwareVersionStringCommandParams = - new LinkedHashMap(); - InteractionInfo readBridgedDeviceBasicHardwareVersionStringAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BridgedDeviceBasicCluster) cluster) - .readHardwareVersionStringAttribute( - (ChipClusters.CharStringAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedCharStringAttributeCallback(), - readBridgedDeviceBasicHardwareVersionStringCommandParams); - readBridgedDeviceBasicInteractionInfo.put( - "readHardwareVersionStringAttribute", - readBridgedDeviceBasicHardwareVersionStringAttributeInteractionInfo); - Map readBridgedDeviceBasicSoftwareVersionCommandParams = - new LinkedHashMap(); - InteractionInfo readBridgedDeviceBasicSoftwareVersionAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BridgedDeviceBasicCluster) cluster) - .readSoftwareVersionAttribute((ChipClusters.LongAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), - readBridgedDeviceBasicSoftwareVersionCommandParams); - readBridgedDeviceBasicInteractionInfo.put( - "readSoftwareVersionAttribute", - readBridgedDeviceBasicSoftwareVersionAttributeInteractionInfo); - Map readBridgedDeviceBasicSoftwareVersionStringCommandParams = - new LinkedHashMap(); - InteractionInfo readBridgedDeviceBasicSoftwareVersionStringAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BridgedDeviceBasicCluster) cluster) - .readSoftwareVersionStringAttribute( - (ChipClusters.CharStringAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedCharStringAttributeCallback(), - readBridgedDeviceBasicSoftwareVersionStringCommandParams); - readBridgedDeviceBasicInteractionInfo.put( - "readSoftwareVersionStringAttribute", - readBridgedDeviceBasicSoftwareVersionStringAttributeInteractionInfo); - Map readBridgedDeviceBasicManufacturingDateCommandParams = - new LinkedHashMap(); - InteractionInfo readBridgedDeviceBasicManufacturingDateAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BridgedDeviceBasicCluster) cluster) - .readManufacturingDateAttribute( - (ChipClusters.CharStringAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedCharStringAttributeCallback(), - readBridgedDeviceBasicManufacturingDateCommandParams); - readBridgedDeviceBasicInteractionInfo.put( - "readManufacturingDateAttribute", - readBridgedDeviceBasicManufacturingDateAttributeInteractionInfo); - Map readBridgedDeviceBasicPartNumberCommandParams = - new LinkedHashMap(); - InteractionInfo readBridgedDeviceBasicPartNumberAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BridgedDeviceBasicCluster) cluster) - .readPartNumberAttribute((ChipClusters.CharStringAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedCharStringAttributeCallback(), - readBridgedDeviceBasicPartNumberCommandParams); - readBridgedDeviceBasicInteractionInfo.put( - "readPartNumberAttribute", readBridgedDeviceBasicPartNumberAttributeInteractionInfo); - Map readBridgedDeviceBasicProductURLCommandParams = - new LinkedHashMap(); - InteractionInfo readBridgedDeviceBasicProductURLAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BridgedDeviceBasicCluster) cluster) - .readProductURLAttribute((ChipClusters.CharStringAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedCharStringAttributeCallback(), - readBridgedDeviceBasicProductURLCommandParams); - readBridgedDeviceBasicInteractionInfo.put( - "readProductURLAttribute", readBridgedDeviceBasicProductURLAttributeInteractionInfo); - Map readBridgedDeviceBasicProductLabelCommandParams = - new LinkedHashMap(); - InteractionInfo readBridgedDeviceBasicProductLabelAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BridgedDeviceBasicCluster) cluster) - .readProductLabelAttribute((ChipClusters.CharStringAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedCharStringAttributeCallback(), - readBridgedDeviceBasicProductLabelCommandParams); - readBridgedDeviceBasicInteractionInfo.put( - "readProductLabelAttribute", readBridgedDeviceBasicProductLabelAttributeInteractionInfo); - Map readBridgedDeviceBasicSerialNumberCommandParams = - new LinkedHashMap(); - InteractionInfo readBridgedDeviceBasicSerialNumberAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BridgedDeviceBasicCluster) cluster) - .readSerialNumberAttribute((ChipClusters.CharStringAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedCharStringAttributeCallback(), - readBridgedDeviceBasicSerialNumberCommandParams); - readBridgedDeviceBasicInteractionInfo.put( - "readSerialNumberAttribute", readBridgedDeviceBasicSerialNumberAttributeInteractionInfo); - Map readBridgedDeviceBasicReachableCommandParams = - new LinkedHashMap(); - InteractionInfo readBridgedDeviceBasicReachableAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BridgedDeviceBasicCluster) cluster) - .readReachableAttribute((ChipClusters.BooleanAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), - readBridgedDeviceBasicReachableCommandParams); - readBridgedDeviceBasicInteractionInfo.put( - "readReachableAttribute", readBridgedDeviceBasicReachableAttributeInteractionInfo); Map readBridgedDeviceBasicClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readBridgedDeviceBasicClusterRevisionAttributeInteractionInfo = @@ -3448,6 +3272,36 @@ public Map> getReadAttributeMap() { readPowerSourceInteractionInfo.put( "readClusterRevisionAttribute", readPowerSourceClusterRevisionAttributeInteractionInfo); readAttributeMap.put("powerSource", readPowerSourceInteractionInfo); + Map readPowerSourceConfigurationInteractionInfo = + new LinkedHashMap<>(); + Map readPowerSourceConfigurationSourcesCommandParams = + new LinkedHashMap(); + InteractionInfo readPowerSourceConfigurationSourcesAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.PowerSourceConfigurationCluster) cluster) + .readSourcesAttribute( + (ChipClusters.PowerSourceConfigurationCluster.SourcesAttributeCallback) + callback); + }, + () -> new ClusterInfoMapping.DelegatedSourcesAttributeCallback(), + readPowerSourceConfigurationSourcesCommandParams); + readPowerSourceConfigurationInteractionInfo.put( + "readSourcesAttribute", readPowerSourceConfigurationSourcesAttributeInteractionInfo); + Map readPowerSourceConfigurationClusterRevisionCommandParams = + new LinkedHashMap(); + InteractionInfo readPowerSourceConfigurationClusterRevisionAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.PowerSourceConfigurationCluster) cluster) + .readClusterRevisionAttribute((ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readPowerSourceConfigurationClusterRevisionCommandParams); + readPowerSourceConfigurationInteractionInfo.put( + "readClusterRevisionAttribute", + readPowerSourceConfigurationClusterRevisionAttributeInteractionInfo); + readAttributeMap.put("powerSourceConfiguration", readPowerSourceConfigurationInteractionInfo); Map readPressureMeasurementInteractionInfo = new LinkedHashMap<>(); Map readPressureMeasurementMeasuredValueCommandParams = new LinkedHashMap(); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java index d535b15affa632..2ade2a6dd15e0e 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java @@ -137,23 +137,6 @@ public Map> getWriteAttributeMap() { Map writeBridgedActionsInteractionInfo = new LinkedHashMap<>(); writeAttributeMap.put("bridgedActions", writeBridgedActionsInteractionInfo); Map writeBridgedDeviceBasicInteractionInfo = new LinkedHashMap<>(); - Map writeBridgedDeviceBasicNodeLabelCommandParams = - new LinkedHashMap(); - CommandParameterInfo bridgedDeviceBasicnodeLabelCommandParameterInfo = - new CommandParameterInfo("value", String.class); - writeBridgedDeviceBasicNodeLabelCommandParams.put( - "value", bridgedDeviceBasicnodeLabelCommandParameterInfo); - InteractionInfo writeBridgedDeviceBasicNodeLabelAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BridgedDeviceBasicCluster) cluster) - .writeNodeLabelAttribute( - (DefaultClusterCallback) callback, (String) commandArguments.get("value")); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeBridgedDeviceBasicNodeLabelCommandParams); - writeBridgedDeviceBasicInteractionInfo.put( - "writeNodeLabelAttribute", writeBridgedDeviceBasicNodeLabelAttributeInteractionInfo); writeAttributeMap.put("bridgedDeviceBasic", writeBridgedDeviceBasicInteractionInfo); Map writeColorControlInteractionInfo = new LinkedHashMap<>(); Map writeColorControlColorControlOptionsCommandParams = @@ -700,6 +683,9 @@ public Map> getWriteAttributeMap() { writeAttributeMap.put("operationalCredentials", writeOperationalCredentialsInteractionInfo); Map writePowerSourceInteractionInfo = new LinkedHashMap<>(); writeAttributeMap.put("powerSource", writePowerSourceInteractionInfo); + Map writePowerSourceConfigurationInteractionInfo = + new LinkedHashMap<>(); + writeAttributeMap.put("powerSourceConfiguration", writePowerSourceConfigurationInteractionInfo); Map writePressureMeasurementInteractionInfo = new LinkedHashMap<>(); writeAttributeMap.put("pressureMeasurement", writePressureMeasurementInteractionInfo); Map writePumpConfigurationAndControlInteractionInfo = diff --git a/src/controller/python/chip/clusters/CHIPClusters.cpp b/src/controller/python/chip/clusters/CHIPClusters.cpp new file mode 100644 index 00000000000000..4cfc3488498eff --- /dev/null +++ b/src/controller/python/chip/clusters/CHIPClusters.cpp @@ -0,0 +1,11344 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// THIS FILE IS GENERATED BY ZAP + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +using namespace chip; +using namespace chip::app; + +namespace { + +// Define pointers for external ZCL response delegates. + +using SuccessResponseDelegate = void (*)(); +using FailureResponseDelegate = void (*)(uint8_t); +SuccessResponseDelegate gSuccessResponseDelegate; +FailureResponseDelegate gFailureResponseDelegate; + +// Define callbacks for ZCL commands and attribute requests. + +#if CHIP_PROGRESS_LOGGING +std::string ByteSpanToString(chip::ByteSpan value) +{ + std::string strValue = ""; + for (size_t i = 0; i < value.size(); i++) + { + strValue += ' '; + strValue += std::to_string(value.data()[i]); + } + return strValue; +} +#endif + +void OnDefaultSuccessResponse(void * /* context */) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} + +void OnDefaultFailureResponse(void * /* context */, uint8_t status) +{ + if (gFailureResponseDelegate != nullptr) + gFailureResponseDelegate(status); +} + +template +void OnAttributeResponse(void * /* context */, AttributeType value) +{ + std::string strValue = std::to_string(value); + ChipLogProgress(Zcl, " attributeValue: %s", strValue.c_str()); + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} + +template <> +void OnAttributeResponse(void * /* context */, chip::ByteSpan value) +{ + ChipLogProgress(Zcl, " attributeValue: (span of length %zd) %s", value.size(), ByteSpanToString(value).c_str()); + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} + +template <> +void OnAttributeResponse(void * /* context */, chip::CharSpan value) +{ + ChipLogProgress(Zcl, " attributeValue: '%.*s'", static_cast(value.size()), value.data()); + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} + +template <> +void OnAttributeResponse(void * /* context */, bool value) +{ + ChipLogProgress(Zcl, " attributeValue: %s", value ? "true" : "false"); + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} + +static void +OnApplicationLauncherApplicationLauncherListListAttributeResponse(void * context, + const chip::app::DataModel::DecodableList & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback + gApplicationLauncherApplicationLauncherListListAttributeCallback{ + OnApplicationLauncherApplicationLauncherListListAttributeResponse, nullptr + }; +static void OnAudioOutputAudioOutputListListAttributeResponse( + void * context, + const chip::app::DataModel::DecodableList & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback gAudioOutputAudioOutputListListAttributeCallback{ + OnAudioOutputAudioOutputListListAttributeResponse, nullptr +}; +static void OnBridgedActionsActionListListAttributeResponse( + void * context, + const chip::app::DataModel::DecodableList & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback gBridgedActionsActionListListAttributeCallback{ + OnBridgedActionsActionListListAttributeResponse, nullptr +}; +static void OnBridgedActionsEndpointListListAttributeResponse( + void * context, + const chip::app::DataModel::DecodableList & + list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback gBridgedActionsEndpointListListAttributeCallback{ + OnBridgedActionsEndpointListListAttributeResponse, nullptr +}; +static void +OnContentLauncherAcceptsHeaderListListAttributeResponse(void * context, + const chip::app::DataModel::DecodableList & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback + gContentLauncherAcceptsHeaderListListAttributeCallback{ OnContentLauncherAcceptsHeaderListListAttributeResponse, nullptr }; +static void OnContentLauncherSupportedStreamingTypesListAttributeResponse( + void * context, + const chip::app::DataModel::DecodableList & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback + gContentLauncherSupportedStreamingTypesListAttributeCallback{ OnContentLauncherSupportedStreamingTypesListAttributeResponse, + nullptr }; +static void OnDescriptorDeviceListListAttributeResponse( + void * context, + const chip::app::DataModel::DecodableList & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback gDescriptorDeviceListListAttributeCallback{ + OnDescriptorDeviceListListAttributeResponse, nullptr +}; +static void OnDescriptorServerListListAttributeResponse(void * context, + const chip::app::DataModel::DecodableList & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback gDescriptorServerListListAttributeCallback{ + OnDescriptorServerListListAttributeResponse, nullptr +}; +static void OnDescriptorClientListListAttributeResponse(void * context, + const chip::app::DataModel::DecodableList & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback gDescriptorClientListListAttributeCallback{ + OnDescriptorClientListListAttributeResponse, nullptr +}; +static void OnDescriptorPartsListListAttributeResponse(void * context, + const chip::app::DataModel::DecodableList & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback gDescriptorPartsListListAttributeCallback{ + OnDescriptorPartsListListAttributeResponse, nullptr +}; +static void OnFixedLabelLabelListListAttributeResponse( + void * context, + const chip::app::DataModel::DecodableList & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback gFixedLabelLabelListListAttributeCallback{ + OnFixedLabelLabelListListAttributeResponse, nullptr +}; +static void OnGeneralCommissioningBasicCommissioningInfoListListAttributeResponse( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfoType::DecodableType> & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback + gGeneralCommissioningBasicCommissioningInfoListListAttributeCallback{ + OnGeneralCommissioningBasicCommissioningInfoListListAttributeResponse, nullptr + }; +static void OnGeneralDiagnosticsNetworkInterfacesListAttributeResponse( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::GeneralDiagnostics::Structs::NetworkInterfaceType::DecodableType> & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback + gGeneralDiagnosticsNetworkInterfacesListAttributeCallback{ OnGeneralDiagnosticsNetworkInterfacesListAttributeResponse, + nullptr }; +static void OnGeneralDiagnosticsActiveHardwareFaultsListAttributeResponse(void * context, + const chip::app::DataModel::DecodableList & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback + gGeneralDiagnosticsActiveHardwareFaultsListAttributeCallback{ OnGeneralDiagnosticsActiveHardwareFaultsListAttributeResponse, + nullptr }; +static void OnGeneralDiagnosticsActiveRadioFaultsListAttributeResponse(void * context, + const chip::app::DataModel::DecodableList & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback + gGeneralDiagnosticsActiveRadioFaultsListAttributeCallback{ OnGeneralDiagnosticsActiveRadioFaultsListAttributeResponse, + nullptr }; +static void OnGeneralDiagnosticsActiveNetworkFaultsListAttributeResponse(void * context, + const chip::app::DataModel::DecodableList & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback + gGeneralDiagnosticsActiveNetworkFaultsListAttributeCallback{ OnGeneralDiagnosticsActiveNetworkFaultsListAttributeResponse, + nullptr }; +static void OnGroupKeyManagementGroupsListAttributeResponse( + void * context, + const chip::app::DataModel::DecodableList & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback gGroupKeyManagementGroupsListAttributeCallback{ + OnGroupKeyManagementGroupsListAttributeResponse, nullptr +}; +static void OnGroupKeyManagementGroupKeysListAttributeResponse( + void * context, + const chip::app::DataModel::DecodableList & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback gGroupKeyManagementGroupKeysListAttributeCallback{ + OnGroupKeyManagementGroupKeysListAttributeResponse, nullptr +}; +static void OnMediaInputMediaInputListListAttributeResponse( + void * context, + const chip::app::DataModel::DecodableList & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback gMediaInputMediaInputListListAttributeCallback{ + OnMediaInputMediaInputListListAttributeResponse, nullptr +}; +static void OnModeSelectSupportedModesListAttributeResponse( + void * context, + const chip::app::DataModel::DecodableList & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback gModeSelectSupportedModesListAttributeCallback{ + OnModeSelectSupportedModesListAttributeResponse, nullptr +}; +static void OnOperationalCredentialsFabricsListListAttributeResponse( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback + gOperationalCredentialsFabricsListListAttributeCallback{ OnOperationalCredentialsFabricsListListAttributeResponse, nullptr }; +static void OnOperationalCredentialsTrustedRootCertificatesListAttributeResponse( + void * context, const chip::app::DataModel::DecodableList & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback + gOperationalCredentialsTrustedRootCertificatesListAttributeCallback{ + OnOperationalCredentialsTrustedRootCertificatesListAttributeResponse, nullptr + }; +static void OnPowerSourceActiveBatteryFaultsListAttributeResponse(void * context, + const chip::app::DataModel::DecodableList & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback gPowerSourceActiveBatteryFaultsListAttributeCallback{ + OnPowerSourceActiveBatteryFaultsListAttributeResponse, nullptr +}; +static void OnPowerSourceConfigurationSourcesListAttributeResponse(void * context, + const chip::app::DataModel::DecodableList & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback + gPowerSourceConfigurationSourcesListAttributeCallback{ OnPowerSourceConfigurationSourcesListAttributeResponse, nullptr }; +static void OnSoftwareDiagnosticsThreadMetricsListAttributeResponse( + void * context, + const chip::app::DataModel::DecodableList & + list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback + gSoftwareDiagnosticsThreadMetricsListAttributeCallback{ OnSoftwareDiagnosticsThreadMetricsListAttributeResponse, nullptr }; +static void OnTvChannelTvChannelListListAttributeResponse( + void * context, + const chip::app::DataModel::DecodableList & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback gTvChannelTvChannelListListAttributeCallback{ + OnTvChannelTvChannelListListAttributeResponse, nullptr +}; +static void OnTargetNavigatorTargetNavigatorListListAttributeResponse( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::TargetNavigator::Structs::NavigateTargetTargetInfo::DecodableType> & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback + gTargetNavigatorTargetNavigatorListListAttributeCallback{ OnTargetNavigatorTargetNavigatorListListAttributeResponse, nullptr }; +static void OnTestClusterListInt8uListAttributeResponse(void * context, const chip::app::DataModel::DecodableList & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback gTestClusterListInt8uListAttributeCallback{ + OnTestClusterListInt8uListAttributeResponse, nullptr +}; +static void OnTestClusterListOctetStringListAttributeResponse(void * context, + const chip::app::DataModel::DecodableList & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback gTestClusterListOctetStringListAttributeCallback{ + OnTestClusterListOctetStringListAttributeResponse, nullptr +}; +static void OnTestClusterListStructOctetStringListAttributeResponse( + void * context, + const chip::app::DataModel::DecodableList & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback + gTestClusterListStructOctetStringListAttributeCallback{ OnTestClusterListStructOctetStringListAttributeResponse, nullptr }; +static void OnTestClusterListNullablesAndOptionalsStructListAttributeResponse( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::DecodableType> & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback + gTestClusterListNullablesAndOptionalsStructListAttributeCallback{ + OnTestClusterListNullablesAndOptionalsStructListAttributeResponse, nullptr + }; +static void OnThreadNetworkDiagnosticsNeighborTableListListAttributeResponse( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::NeighborTable::DecodableType> & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback + gThreadNetworkDiagnosticsNeighborTableListListAttributeCallback{ + OnThreadNetworkDiagnosticsNeighborTableListListAttributeResponse, nullptr + }; +static void OnThreadNetworkDiagnosticsRouteTableListListAttributeResponse( + void * context, + const chip::app::DataModel::DecodableList & + list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback + gThreadNetworkDiagnosticsRouteTableListListAttributeCallback{ OnThreadNetworkDiagnosticsRouteTableListListAttributeResponse, + nullptr }; +static void OnThreadNetworkDiagnosticsSecurityPolicyListAttributeResponse( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::SecurityPolicy::DecodableType> & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback + gThreadNetworkDiagnosticsSecurityPolicyListAttributeCallback{ OnThreadNetworkDiagnosticsSecurityPolicyListAttributeResponse, + nullptr }; +static void OnThreadNetworkDiagnosticsOperationalDatasetComponentsListAttributeResponse( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::OperationalDatasetComponents::DecodableType> & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback + gThreadNetworkDiagnosticsOperationalDatasetComponentsListAttributeCallback{ + OnThreadNetworkDiagnosticsOperationalDatasetComponentsListAttributeResponse, nullptr + }; +static void OnThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeResponse( + void * context, const chip::app::DataModel::DecodableList & list) +{ + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback + gThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallback{ + OnThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeResponse, nullptr + }; + +chip::Callback::Callback gDefaultSuccessCallback{ OnDefaultSuccessResponse, nullptr }; +chip::Callback::Callback gDefaultFailureCallback{ OnDefaultFailureResponse, nullptr }; +chip::Callback::Callback gBooleanAttributeCallback{ OnAttributeResponse, nullptr }; +chip::Callback::Callback gInt8uAttributeCallback{ OnAttributeResponse, nullptr }; +chip::Callback::Callback gInt8sAttributeCallback{ OnAttributeResponse, nullptr }; +chip::Callback::Callback gInt16uAttributeCallback{ OnAttributeResponse, nullptr }; +chip::Callback::Callback gInt16sAttributeCallback{ OnAttributeResponse, nullptr }; +chip::Callback::Callback gInt32uAttributeCallback{ OnAttributeResponse, nullptr }; +chip::Callback::Callback gInt32sAttributeCallback{ OnAttributeResponse, nullptr }; +chip::Callback::Callback gInt64uAttributeCallback{ OnAttributeResponse, nullptr }; +chip::Callback::Callback gInt64sAttributeCallback{ OnAttributeResponse, nullptr }; +chip::Callback::Callback gOctetStringAttributeCallback{ OnAttributeResponse, nullptr }; +chip::Callback::Callback gCharStringAttributeCallback{ OnAttributeResponse, nullptr }; + +} // namespace + +extern "C" { + +void chip_ime_SetSuccessResponseDelegate(SuccessResponseDelegate delegate) +{ + gSuccessResponseDelegate = delegate; +} + +void chip_ime_SetFailureResponseDelegate(FailureResponseDelegate delegate) +{ + gFailureResponseDelegate = delegate; +} + +// Cluster AccountLogin + +chip::ChipError::StorageType chip_ime_ReadAttribute_AccountLogin_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::AccountLoginCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_AccountLogin_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::AccountLoginCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster AccountLogin +// Cluster AdministratorCommissioning + +chip::ChipError::StorageType chip_ime_ReadAttribute_AdministratorCommissioning_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::AdministratorCommissioningCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_AdministratorCommissioning_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::AdministratorCommissioningCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster AdministratorCommissioning +// Cluster ApplicationBasic + +chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_VendorName(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ApplicationBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeVendorName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ApplicationBasic_VendorName(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ApplicationBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeVendorName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_VendorId(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ApplicationBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeVendorId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ApplicationBasic_VendorId(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ApplicationBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeVendorId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_ApplicationName(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ApplicationBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeApplicationName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ApplicationBasic_ApplicationName(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ApplicationBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeApplicationName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_ProductId(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ApplicationBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeProductId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ApplicationBasic_ProductId(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ApplicationBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeProductId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_ApplicationId(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ApplicationBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeApplicationId(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ApplicationBasic_ApplicationId(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ApplicationBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeApplicationId(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_CatalogVendorId(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ApplicationBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCatalogVendorId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ApplicationBasic_CatalogVendorId(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ApplicationBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCatalogVendorId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_ApplicationStatus(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ApplicationBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeApplicationStatus(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ApplicationBasic_ApplicationStatus(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ApplicationBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeApplicationStatus(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ApplicationBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ApplicationBasic_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ApplicationBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster ApplicationBasic +// Cluster ApplicationLauncher + +chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationLauncher_ApplicationLauncherList(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ApplicationLauncherCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeApplicationLauncherList(gApplicationLauncherApplicationLauncherListListAttributeCallback.Cancel(), + gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationLauncher_CatalogVendorId(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ApplicationLauncherCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCatalogVendorId(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ApplicationLauncher_CatalogVendorId(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ApplicationLauncherCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCatalogVendorId(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationLauncher_ApplicationId(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ApplicationLauncherCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeApplicationId(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ApplicationLauncher_ApplicationId(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ApplicationLauncherCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeApplicationId(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationLauncher_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ApplicationLauncherCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ApplicationLauncher_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ApplicationLauncherCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster ApplicationLauncher +// Cluster AudioOutput + +chip::ChipError::StorageType chip_ime_ReadAttribute_AudioOutput_AudioOutputList(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::AudioOutputCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeAudioOutputList(gAudioOutputAudioOutputListListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_AudioOutput_CurrentAudioOutput(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::AudioOutputCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCurrentAudioOutput(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_AudioOutput_CurrentAudioOutput(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::AudioOutputCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCurrentAudioOutput(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_AudioOutput_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::AudioOutputCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_AudioOutput_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::AudioOutputCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster AudioOutput +// Cluster BarrierControl + +chip::ChipError::StorageType chip_ime_ReadAttribute_BarrierControl_BarrierMovingState(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BarrierControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeBarrierMovingState(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_BarrierControl_BarrierMovingState(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BarrierControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeBarrierMovingState(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_BarrierControl_BarrierSafetyStatus(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BarrierControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeBarrierSafetyStatus(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_BarrierControl_BarrierSafetyStatus(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BarrierControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeBarrierSafetyStatus(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_BarrierControl_BarrierCapabilities(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BarrierControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeBarrierCapabilities(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_BarrierControl_BarrierCapabilities(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BarrierControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeBarrierCapabilities(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_BarrierControl_BarrierPosition(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BarrierControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeBarrierPosition(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_BarrierControl_BarrierPosition(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BarrierControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeBarrierPosition(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_BarrierControl_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BarrierControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_BarrierControl_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BarrierControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster BarrierControl +// Cluster Basic + +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_InteractionModelVersion(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeInteractionModelVersion(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_InteractionModelVersion(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeInteractionModelVersion(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_VendorName(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeVendorName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_VendorName(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeVendorName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_VendorID(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeVendorID(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_VendorID(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeVendorID(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ProductName(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeProductName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_ProductName(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeProductName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ProductID(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeProductID(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_ProductID(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeProductID(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_NodeLabel(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNodeLabel(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_NodeLabel(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeNodeLabel(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_Location(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeLocation(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_Location(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeLocation(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_HardwareVersion(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeHardwareVersion(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_HardwareVersion(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeHardwareVersion(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_HardwareVersionString(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeHardwareVersionString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_HardwareVersionString(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeHardwareVersionString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), + minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_SoftwareVersion(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeSoftwareVersion(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_SoftwareVersion(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeSoftwareVersion(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_SoftwareVersionString(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeSoftwareVersionString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_SoftwareVersionString(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeSoftwareVersionString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), + minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ManufacturingDate(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeManufacturingDate(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_ManufacturingDate(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeManufacturingDate(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_PartNumber(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePartNumber(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_PartNumber(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePartNumber(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ProductURL(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeProductURL(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_ProductURL(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeProductURL(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ProductLabel(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeProductLabel(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_ProductLabel(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeProductLabel(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_SerialNumber(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeSerialNumber(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_SerialNumber(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeSerialNumber(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_LocalConfigDisabled(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeLocalConfigDisabled(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_LocalConfigDisabled(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeLocalConfigDisabled(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_Reachable(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeReachable(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_Reachable(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeReachable(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_UniqueID(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeUniqueID(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster Basic +// Cluster BinaryInputBasic + +chip::ChipError::StorageType chip_ime_ReadAttribute_BinaryInputBasic_OutOfService(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BinaryInputBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeOutOfService(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_BinaryInputBasic_OutOfService(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BinaryInputBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeOutOfService(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_BinaryInputBasic_PresentValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BinaryInputBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePresentValue(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_BinaryInputBasic_PresentValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BinaryInputBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePresentValue(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_BinaryInputBasic_StatusFlags(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BinaryInputBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeStatusFlags(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_BinaryInputBasic_StatusFlags(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BinaryInputBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeStatusFlags(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_BinaryInputBasic_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BinaryInputBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_BinaryInputBasic_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BinaryInputBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster BinaryInputBasic +// Cluster Binding + +chip::ChipError::StorageType chip_ime_ReadAttribute_Binding_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BindingCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Binding_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BindingCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster Binding +// Cluster BooleanState + +chip::ChipError::StorageType chip_ime_ReadAttribute_BooleanState_StateValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BooleanStateCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeStateValue(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_BooleanState_StateValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BooleanStateCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeStateValue(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_BooleanState_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BooleanStateCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_BooleanState_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BooleanStateCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster BooleanState +// Cluster BridgedActions + +chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedActions_ActionList(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeActionList(gBridgedActionsActionListListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedActions_EndpointList(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeEndpointList(gBridgedActionsEndpointListListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedActions_SetupUrl(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeSetupUrl(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_BridgedActions_SetupUrl(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeSetupUrl(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedActions_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_BridgedActions_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster BridgedActions +// Cluster BridgedDeviceBasic + +chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BridgedDeviceBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_BridgedDeviceBasic_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BridgedDeviceBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster BridgedDeviceBasic +// Cluster ColorControl + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CurrentHue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCurrentHue(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_CurrentHue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCurrentHue(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CurrentSaturation(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCurrentSaturation(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_CurrentSaturation(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCurrentSaturation(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_RemainingTime(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeRemainingTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_RemainingTime(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeRemainingTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CurrentX(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCurrentX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_CurrentX(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCurrentX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CurrentY(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCurrentY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_CurrentY(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCurrentY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_DriftCompensation(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeDriftCompensation(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_DriftCompensation(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeDriftCompensation(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CompensationText(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCompensationText(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_CompensationText(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCompensationText(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorTemperature(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeColorTemperature(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorTemperature(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeColorTemperature(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorMode(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeColorMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorMode(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeColorMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorControlOptions(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeColorControlOptions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorControlOptions(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeColorControlOptions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_NumberOfPrimaries(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNumberOfPrimaries(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_NumberOfPrimaries(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeNumberOfPrimaries(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary1X(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePrimary1X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary1X(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePrimary1X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary1Y(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePrimary1Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary1Y(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePrimary1Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary1Intensity(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePrimary1Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary1Intensity(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePrimary1Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary2X(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePrimary2X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary2X(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePrimary2X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary2Y(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePrimary2Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary2Y(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePrimary2Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary2Intensity(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePrimary2Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary2Intensity(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePrimary2Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary3X(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePrimary3X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary3X(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePrimary3X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary3Y(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePrimary3Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary3Y(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePrimary3Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary3Intensity(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePrimary3Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary3Intensity(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePrimary3Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary4X(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePrimary4X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary4X(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePrimary4X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary4Y(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePrimary4Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary4Y(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePrimary4Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary4Intensity(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePrimary4Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary4Intensity(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePrimary4Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary5X(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePrimary5X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary5X(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePrimary5X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary5Y(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePrimary5Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary5Y(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePrimary5Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary5Intensity(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePrimary5Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary5Intensity(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePrimary5Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary6X(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePrimary6X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary6X(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePrimary6X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary6Y(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePrimary6Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary6Y(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePrimary6Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary6Intensity(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePrimary6Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary6Intensity(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePrimary6Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_WhitePointX(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeWhitePointX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_WhitePointX(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeWhitePointX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_WhitePointY(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeWhitePointY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_WhitePointY(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeWhitePointY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointRX(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeColorPointRX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorPointRX(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeColorPointRX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointRY(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeColorPointRY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorPointRY(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeColorPointRY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointRIntensity(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeColorPointRIntensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorPointRIntensity(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeColorPointRIntensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointGX(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeColorPointGX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorPointGX(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeColorPointGX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointGY(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeColorPointGY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorPointGY(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeColorPointGY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointGIntensity(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeColorPointGIntensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorPointGIntensity(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeColorPointGIntensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointBX(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeColorPointBX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorPointBX(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeColorPointBX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointBY(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeColorPointBY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorPointBY(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeColorPointBY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointBIntensity(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeColorPointBIntensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorPointBIntensity(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeColorPointBIntensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_EnhancedCurrentHue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeEnhancedCurrentHue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_EnhancedCurrentHue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeEnhancedCurrentHue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_EnhancedColorMode(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeEnhancedColorMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_EnhancedColorMode(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeEnhancedColorMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorLoopActive(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeColorLoopActive(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorLoopActive(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeColorLoopActive(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorLoopDirection(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeColorLoopDirection(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorLoopDirection(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeColorLoopDirection(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorLoopTime(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeColorLoopTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorLoopTime(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeColorLoopTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorLoopStartEnhancedHue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeColorLoopStartEnhancedHue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorLoopStartEnhancedHue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeColorLoopStartEnhancedHue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), + minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorLoopStoredEnhancedHue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeColorLoopStoredEnhancedHue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorLoopStoredEnhancedHue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeColorLoopStoredEnhancedHue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), + minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorCapabilities(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeColorCapabilities(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorCapabilities(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeColorCapabilities(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorTempPhysicalMin(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeColorTempPhysicalMin(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorTempPhysicalMin(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeColorTempPhysicalMin(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorTempPhysicalMax(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeColorTempPhysicalMax(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorTempPhysicalMax(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeColorTempPhysicalMax(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CoupleColorTempToLevelMinMireds(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCoupleColorTempToLevelMinMireds(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType +chip_ime_SubscribeAttribute_ColorControl_CoupleColorTempToLevelMinMireds(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCoupleColorTempToLevelMinMireds(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), + minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_StartUpColorTemperatureMireds(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeStartUpColorTemperatureMireds(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_StartUpColorTemperatureMireds(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeStartUpColorTemperatureMireds(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), + minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster ColorControl +// Cluster ContentLauncher + +chip::ChipError::StorageType chip_ime_ReadAttribute_ContentLauncher_AcceptsHeaderList(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ContentLauncherCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeAcceptsHeaderList(gContentLauncherAcceptsHeaderListListAttributeCallback.Cancel(), + gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ContentLauncher_SupportedStreamingTypes(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ContentLauncherCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeSupportedStreamingTypes(gContentLauncherSupportedStreamingTypesListAttributeCallback.Cancel(), + gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ContentLauncher_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ContentLauncherCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ContentLauncher_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ContentLauncherCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster ContentLauncher +// Cluster Descriptor + +chip::ChipError::StorageType chip_ime_ReadAttribute_Descriptor_DeviceList(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::DescriptorCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeDeviceList(gDescriptorDeviceListListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Descriptor_ServerList(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::DescriptorCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeServerList(gDescriptorServerListListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Descriptor_ClientList(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::DescriptorCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClientList(gDescriptorClientListListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Descriptor_PartsList(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::DescriptorCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePartsList(gDescriptorPartsListListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Descriptor_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::DescriptorCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Descriptor_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::DescriptorCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster Descriptor +// Cluster DiagnosticLogs + +// End of Cluster DiagnosticLogs +// Cluster DoorLock + +chip::ChipError::StorageType chip_ime_ReadAttribute_DoorLock_LockState(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::DoorLockCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeLockState(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_DoorLock_LockState(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::DoorLockCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeLockState(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_DoorLock_LockType(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::DoorLockCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeLockType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_DoorLock_LockType(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::DoorLockCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeLockType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_DoorLock_ActuatorEnabled(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::DoorLockCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeActuatorEnabled(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_DoorLock_ActuatorEnabled(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::DoorLockCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeActuatorEnabled(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_DoorLock_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::DoorLockCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_DoorLock_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::DoorLockCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster DoorLock +// Cluster ElectricalMeasurement + +chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_MeasurementType(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ElectricalMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMeasurementType(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ElectricalMeasurement_MeasurementType(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ElectricalMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMeasurementType(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_TotalActivePower(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ElectricalMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeTotalActivePower(gInt32sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ElectricalMeasurement_TotalActivePower(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ElectricalMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeTotalActivePower(gInt32sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltage(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ElectricalMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeRmsVoltage(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ElectricalMeasurement_RmsVoltage(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ElectricalMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeRmsVoltage(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltageMin(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ElectricalMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeRmsVoltageMin(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ElectricalMeasurement_RmsVoltageMin(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ElectricalMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeRmsVoltageMin(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltageMax(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ElectricalMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeRmsVoltageMax(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ElectricalMeasurement_RmsVoltageMax(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ElectricalMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeRmsVoltageMax(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrent(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ElectricalMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeRmsCurrent(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ElectricalMeasurement_RmsCurrent(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ElectricalMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeRmsCurrent(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrentMin(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ElectricalMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeRmsCurrentMin(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ElectricalMeasurement_RmsCurrentMin(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ElectricalMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeRmsCurrentMin(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrentMax(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ElectricalMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeRmsCurrentMax(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ElectricalMeasurement_RmsCurrentMax(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ElectricalMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeRmsCurrentMax(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_ActivePower(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ElectricalMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeActivePower(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ElectricalMeasurement_ActivePower(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ElectricalMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeActivePower(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_ActivePowerMin(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ElectricalMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeActivePowerMin(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ElectricalMeasurement_ActivePowerMin(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ElectricalMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeActivePowerMin(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_ActivePowerMax(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ElectricalMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeActivePowerMax(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ElectricalMeasurement_ActivePowerMax(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ElectricalMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeActivePowerMax(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ElectricalMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ElectricalMeasurement_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ElectricalMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster ElectricalMeasurement +// Cluster EthernetNetworkDiagnostics + +chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PHYRate(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::EthernetNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePHYRate(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_PHYRate(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::EthernetNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePHYRate(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_FullDuplex(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::EthernetNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeFullDuplex(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_FullDuplex(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::EthernetNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeFullDuplex(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PacketRxCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::EthernetNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePacketRxCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_PacketRxCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::EthernetNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePacketRxCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PacketTxCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::EthernetNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePacketTxCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_PacketTxCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::EthernetNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePacketTxCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_TxErrCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::EthernetNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeTxErrCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_TxErrCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::EthernetNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeTxErrCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_CollisionCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::EthernetNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCollisionCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_CollisionCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::EthernetNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCollisionCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_OverrunCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::EthernetNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeOverrunCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_OverrunCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::EthernetNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeOverrunCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_CarrierDetect(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::EthernetNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCarrierDetect(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_CarrierDetect(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::EthernetNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCarrierDetect(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_TimeSinceReset(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::EthernetNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeTimeSinceReset(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_TimeSinceReset(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::EthernetNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeTimeSinceReset(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_FeatureMap(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::EthernetNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::EthernetNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::EthernetNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster EthernetNetworkDiagnostics +// Cluster FixedLabel + +chip::ChipError::StorageType chip_ime_ReadAttribute_FixedLabel_LabelList(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::FixedLabelCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeLabelList(gFixedLabelLabelListListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_FixedLabel_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::FixedLabelCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_FixedLabel_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::FixedLabelCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster FixedLabel +// Cluster FlowMeasurement + +chip::ChipError::StorageType chip_ime_ReadAttribute_FlowMeasurement_MeasuredValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::FlowMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_FlowMeasurement_MeasuredValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::FlowMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_FlowMeasurement_MinMeasuredValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::FlowMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMinMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_FlowMeasurement_MinMeasuredValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::FlowMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMinMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_FlowMeasurement_MaxMeasuredValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::FlowMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMaxMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_FlowMeasurement_MaxMeasuredValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::FlowMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMaxMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_FlowMeasurement_Tolerance(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::FlowMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeTolerance(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_FlowMeasurement_Tolerance(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::FlowMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeTolerance(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_FlowMeasurement_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::FlowMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_FlowMeasurement_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::FlowMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster FlowMeasurement +// Cluster GeneralCommissioning + +chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralCommissioning_Breadcrumb(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::GeneralCommissioningCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeBreadcrumb(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_GeneralCommissioning_Breadcrumb(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::GeneralCommissioningCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeBreadcrumb(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralCommissioning_BasicCommissioningInfoList(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::GeneralCommissioningCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeBasicCommissioningInfoList(gGeneralCommissioningBasicCommissioningInfoListListAttributeCallback.Cancel(), + gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralCommissioning_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::GeneralCommissioningCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_GeneralCommissioning_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::GeneralCommissioningCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster GeneralCommissioning +// Cluster GeneralDiagnostics + +chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_NetworkInterfaces(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::GeneralDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeNetworkInterfaces(gGeneralDiagnosticsNetworkInterfacesListAttributeCallback.Cancel(), + gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_RebootCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::GeneralDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeRebootCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_GeneralDiagnostics_RebootCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::GeneralDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeRebootCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_UpTime(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::GeneralDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeUpTime(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_GeneralDiagnostics_UpTime(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::GeneralDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeUpTime(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_TotalOperationalHours(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::GeneralDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeTotalOperationalHours(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_GeneralDiagnostics_TotalOperationalHours(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::GeneralDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeTotalOperationalHours(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_BootReasons(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::GeneralDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeBootReasons(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_GeneralDiagnostics_BootReasons(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::GeneralDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeBootReasons(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_ActiveHardwareFaults(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::GeneralDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeActiveHardwareFaults(gGeneralDiagnosticsActiveHardwareFaultsListAttributeCallback.Cancel(), + gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_ActiveRadioFaults(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::GeneralDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeActiveRadioFaults(gGeneralDiagnosticsActiveRadioFaultsListAttributeCallback.Cancel(), + gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_ActiveNetworkFaults(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::GeneralDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeActiveNetworkFaults(gGeneralDiagnosticsActiveNetworkFaultsListAttributeCallback.Cancel(), + gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::GeneralDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_GeneralDiagnostics_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::GeneralDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster GeneralDiagnostics +// Cluster GroupKeyManagement + +chip::ChipError::StorageType chip_ime_ReadAttribute_GroupKeyManagement_Groups(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::GroupKeyManagementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeGroups(gGroupKeyManagementGroupsListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_GroupKeyManagement_GroupKeys(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::GroupKeyManagementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeGroupKeys(gGroupKeyManagementGroupKeysListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_GroupKeyManagement_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::GroupKeyManagementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_GroupKeyManagement_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::GroupKeyManagementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster GroupKeyManagement +// Cluster Groups + +chip::ChipError::StorageType chip_ime_ReadAttribute_Groups_NameSupport(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::GroupsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNameSupport(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Groups_NameSupport(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::GroupsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeNameSupport(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Groups_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::GroupsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Groups_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::GroupsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster Groups +// Cluster Identify + +chip::ChipError::StorageType chip_ime_ReadAttribute_Identify_IdentifyTime(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::IdentifyCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeIdentifyTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Identify_IdentifyTime(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::IdentifyCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeIdentifyTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Identify_IdentifyType(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::IdentifyCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeIdentifyType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Identify_IdentifyType(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::IdentifyCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeIdentifyType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Identify_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::IdentifyCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Identify_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::IdentifyCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster Identify +// Cluster IlluminanceMeasurement + +chip::ChipError::StorageType chip_ime_ReadAttribute_IlluminanceMeasurement_MeasuredValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::IlluminanceMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_IlluminanceMeasurement_MeasuredValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::IlluminanceMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_IlluminanceMeasurement_MinMeasuredValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::IlluminanceMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMinMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_IlluminanceMeasurement_MinMeasuredValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::IlluminanceMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMinMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_IlluminanceMeasurement_MaxMeasuredValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::IlluminanceMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMaxMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_IlluminanceMeasurement_MaxMeasuredValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::IlluminanceMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMaxMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_IlluminanceMeasurement_Tolerance(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::IlluminanceMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeTolerance(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_IlluminanceMeasurement_Tolerance(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::IlluminanceMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeTolerance(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_IlluminanceMeasurement_LightSensorType(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::IlluminanceMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeLightSensorType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_IlluminanceMeasurement_LightSensorType(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::IlluminanceMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeLightSensorType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_IlluminanceMeasurement_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::IlluminanceMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_IlluminanceMeasurement_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::IlluminanceMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster IlluminanceMeasurement +// Cluster KeypadInput + +chip::ChipError::StorageType chip_ime_ReadAttribute_KeypadInput_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::KeypadInputCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_KeypadInput_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::KeypadInputCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster KeypadInput +// Cluster LevelControl + +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_CurrentLevel(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCurrentLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_CurrentLevel(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCurrentLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_RemainingTime(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeRemainingTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_RemainingTime(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeRemainingTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_MinLevel(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMinLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_MinLevel(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMinLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_MaxLevel(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMaxLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_MaxLevel(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMaxLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_CurrentFrequency(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCurrentFrequency(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_CurrentFrequency(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCurrentFrequency(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_MinFrequency(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMinFrequency(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_MinFrequency(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMinFrequency(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_MaxFrequency(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMaxFrequency(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_MaxFrequency(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMaxFrequency(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_Options(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeOptions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_Options(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeOptions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_OnOffTransitionTime(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeOnOffTransitionTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_OnOffTransitionTime(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeOnOffTransitionTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_OnLevel(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeOnLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_OnLevel(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeOnLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_OnTransitionTime(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeOnTransitionTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_OnTransitionTime(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeOnTransitionTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_OffTransitionTime(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeOffTransitionTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_OffTransitionTime(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeOffTransitionTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_DefaultMoveRate(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeDefaultMoveRate(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_DefaultMoveRate(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeDefaultMoveRate(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_StartUpCurrentLevel(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeStartUpCurrentLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_StartUpCurrentLevel(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeStartUpCurrentLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster LevelControl +// Cluster LowPower + +chip::ChipError::StorageType chip_ime_ReadAttribute_LowPower_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LowPowerCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_LowPower_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LowPowerCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster LowPower +// Cluster MediaInput + +chip::ChipError::StorageType chip_ime_ReadAttribute_MediaInput_MediaInputList(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::MediaInputCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeMediaInputList(gMediaInputMediaInputListListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_MediaInput_CurrentMediaInput(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::MediaInputCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCurrentMediaInput(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_MediaInput_CurrentMediaInput(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::MediaInputCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCurrentMediaInput(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_MediaInput_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::MediaInputCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_MediaInput_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::MediaInputCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster MediaInput +// Cluster MediaPlayback + +chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_PlaybackState(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::MediaPlaybackCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePlaybackState(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_MediaPlayback_PlaybackState(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::MediaPlaybackCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePlaybackState(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_StartTime(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::MediaPlaybackCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeStartTime(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_MediaPlayback_StartTime(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::MediaPlaybackCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeStartTime(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_Duration(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::MediaPlaybackCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeDuration(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_MediaPlayback_Duration(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::MediaPlaybackCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeDuration(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_PositionUpdatedAt(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::MediaPlaybackCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePositionUpdatedAt(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_MediaPlayback_PositionUpdatedAt(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::MediaPlaybackCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePositionUpdatedAt(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_Position(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::MediaPlaybackCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePosition(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_MediaPlayback_Position(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::MediaPlaybackCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePosition(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_PlaybackSpeed(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::MediaPlaybackCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePlaybackSpeed(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_MediaPlayback_PlaybackSpeed(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::MediaPlaybackCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePlaybackSpeed(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_SeekRangeEnd(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::MediaPlaybackCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeSeekRangeEnd(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_MediaPlayback_SeekRangeEnd(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::MediaPlaybackCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeSeekRangeEnd(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_SeekRangeStart(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::MediaPlaybackCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeSeekRangeStart(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_MediaPlayback_SeekRangeStart(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::MediaPlaybackCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeSeekRangeStart(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::MediaPlaybackCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_MediaPlayback_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::MediaPlaybackCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster MediaPlayback +// Cluster ModeSelect + +chip::ChipError::StorageType chip_ime_ReadAttribute_ModeSelect_CurrentMode(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ModeSelectCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCurrentMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ModeSelect_CurrentMode(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ModeSelectCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCurrentMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ModeSelect_SupportedModes(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ModeSelectCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeSupportedModes(gModeSelectSupportedModesListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ModeSelect_OnMode(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ModeSelectCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeOnMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ModeSelect_OnMode(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ModeSelectCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeOnMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ModeSelect_StartUpMode(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ModeSelectCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeStartUpMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ModeSelect_StartUpMode(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ModeSelectCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeStartUpMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ModeSelect_Description(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ModeSelectCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeDescription(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ModeSelect_Description(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ModeSelectCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeDescription(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ModeSelect_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ModeSelectCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ModeSelect_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ModeSelectCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster ModeSelect +// Cluster NetworkCommissioning + +chip::ChipError::StorageType chip_ime_ReadAttribute_NetworkCommissioning_FeatureMap(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::NetworkCommissioningCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_NetworkCommissioning_FeatureMap(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::NetworkCommissioningCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_NetworkCommissioning_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::NetworkCommissioningCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_NetworkCommissioning_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::NetworkCommissioningCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster NetworkCommissioning +// Cluster OtaSoftwareUpdateProvider + +chip::ChipError::StorageType chip_ime_ReadAttribute_OtaSoftwareUpdateProvider_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OtaSoftwareUpdateProviderCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_OtaSoftwareUpdateProvider_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OtaSoftwareUpdateProviderCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster OtaSoftwareUpdateProvider +// Cluster OtaSoftwareUpdateRequestor + +chip::ChipError::StorageType chip_ime_ReadAttribute_OtaSoftwareUpdateRequestor_DefaultOtaProvider(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OtaSoftwareUpdateRequestorCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeDefaultOtaProvider(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_OtaSoftwareUpdateRequestor_DefaultOtaProvider( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OtaSoftwareUpdateRequestorCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeDefaultOtaProvider(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_OtaSoftwareUpdateRequestor_UpdatePossible(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OtaSoftwareUpdateRequestorCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeUpdatePossible(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_OtaSoftwareUpdateRequestor_UpdatePossible(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OtaSoftwareUpdateRequestorCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeUpdatePossible(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_OtaSoftwareUpdateRequestor_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OtaSoftwareUpdateRequestorCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_OtaSoftwareUpdateRequestor_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OtaSoftwareUpdateRequestorCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster OtaSoftwareUpdateRequestor +// Cluster OccupancySensing + +chip::ChipError::StorageType chip_ime_ReadAttribute_OccupancySensing_Occupancy(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OccupancySensingCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeOccupancy(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_OccupancySensing_Occupancy(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OccupancySensingCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeOccupancy(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_OccupancySensing_OccupancySensorType(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OccupancySensingCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeOccupancySensorType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_OccupancySensing_OccupancySensorType(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OccupancySensingCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeOccupancySensorType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_OccupancySensing_OccupancySensorTypeBitmap(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OccupancySensingCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeOccupancySensorTypeBitmap(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_OccupancySensing_OccupancySensorTypeBitmap(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OccupancySensingCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeOccupancySensorTypeBitmap(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), + minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_OccupancySensing_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OccupancySensingCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_OccupancySensing_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OccupancySensingCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster OccupancySensing +// Cluster OnOff + +chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_OnOff(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OnOffCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeOnOff(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_OnOff_OnOff(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OnOffCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeOnOff(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_GlobalSceneControl(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OnOffCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeGlobalSceneControl(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_OnOff_GlobalSceneControl(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OnOffCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeGlobalSceneControl(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_OnTime(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OnOffCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeOnTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_OnOff_OnTime(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OnOffCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeOnTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_OffWaitTime(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OnOffCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeOffWaitTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_OnOff_OffWaitTime(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OnOffCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeOffWaitTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_StartUpOnOff(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OnOffCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeStartUpOnOff(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_OnOff_StartUpOnOff(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OnOffCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeStartUpOnOff(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_FeatureMap(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OnOffCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_OnOff_FeatureMap(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OnOffCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OnOffCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_OnOff_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OnOffCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster OnOff +// Cluster OnOffSwitchConfiguration + +chip::ChipError::StorageType chip_ime_ReadAttribute_OnOffSwitchConfiguration_SwitchType(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OnOffSwitchConfigurationCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeSwitchType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_OnOffSwitchConfiguration_SwitchType(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OnOffSwitchConfigurationCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeSwitchType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_OnOffSwitchConfiguration_SwitchActions(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OnOffSwitchConfigurationCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeSwitchActions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_OnOffSwitchConfiguration_SwitchActions(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OnOffSwitchConfigurationCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeSwitchActions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_OnOffSwitchConfiguration_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OnOffSwitchConfigurationCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_OnOffSwitchConfiguration_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OnOffSwitchConfigurationCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster OnOffSwitchConfiguration +// Cluster OperationalCredentials + +chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_FabricsList(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OperationalCredentialsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeFabricsList(gOperationalCredentialsFabricsListListAttributeCallback.Cancel(), + gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_SupportedFabrics(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OperationalCredentialsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeSupportedFabrics(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_OperationalCredentials_SupportedFabrics(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OperationalCredentialsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeSupportedFabrics(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_CommissionedFabrics(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OperationalCredentialsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCommissionedFabrics(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_OperationalCredentials_CommissionedFabrics(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OperationalCredentialsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCommissionedFabrics(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_TrustedRootCertificates(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OperationalCredentialsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeTrustedRootCertificates(gOperationalCredentialsTrustedRootCertificatesListAttributeCallback.Cancel(), + gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_CurrentFabricIndex(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OperationalCredentialsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCurrentFabricIndex(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_OperationalCredentials_CurrentFabricIndex(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OperationalCredentialsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCurrentFabricIndex(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OperationalCredentialsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_OperationalCredentials_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::OperationalCredentialsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster OperationalCredentials +// Cluster PowerSource + +chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_Status(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PowerSourceCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeStatus(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PowerSource_Status(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PowerSourceCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeStatus(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_Order(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PowerSourceCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeOrder(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PowerSource_Order(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PowerSourceCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeOrder(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_Description(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PowerSourceCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeDescription(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PowerSource_Description(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PowerSourceCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeDescription(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_BatteryVoltage(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PowerSourceCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeBatteryVoltage(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PowerSource_BatteryVoltage(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PowerSourceCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeBatteryVoltage(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_BatteryPercentRemaining(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PowerSourceCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeBatteryPercentRemaining(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PowerSource_BatteryPercentRemaining(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PowerSourceCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeBatteryPercentRemaining(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_BatteryTimeRemaining(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PowerSourceCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeBatteryTimeRemaining(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PowerSource_BatteryTimeRemaining(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PowerSourceCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeBatteryTimeRemaining(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_BatteryChargeLevel(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PowerSourceCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeBatteryChargeLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PowerSource_BatteryChargeLevel(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PowerSourceCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeBatteryChargeLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_ActiveBatteryFaults(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PowerSourceCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeActiveBatteryFaults(gPowerSourceActiveBatteryFaultsListAttributeCallback.Cancel(), + gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_BatteryChargeState(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PowerSourceCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeBatteryChargeState(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PowerSource_BatteryChargeState(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PowerSourceCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeBatteryChargeState(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_FeatureMap(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PowerSourceCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PowerSource_FeatureMap(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PowerSourceCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PowerSourceCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PowerSource_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PowerSourceCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster PowerSource +// Cluster PowerSourceConfiguration + +chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSourceConfiguration_Sources(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PowerSourceConfigurationCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeSources(gPowerSourceConfigurationSourcesListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSourceConfiguration_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PowerSourceConfigurationCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +// End of Cluster PowerSourceConfiguration +// Cluster PressureMeasurement + +chip::ChipError::StorageType chip_ime_ReadAttribute_PressureMeasurement_MeasuredValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PressureMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PressureMeasurement_MeasuredValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PressureMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PressureMeasurement_MinMeasuredValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PressureMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMinMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PressureMeasurement_MinMeasuredValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PressureMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMinMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PressureMeasurement_MaxMeasuredValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PressureMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMaxMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PressureMeasurement_MaxMeasuredValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PressureMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMaxMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PressureMeasurement_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PressureMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PressureMeasurement_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PressureMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster PressureMeasurement +// Cluster PumpConfigurationAndControl + +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxPressure(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMaxPressure(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxPressure(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMaxPressure(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxSpeed(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMaxSpeed(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxSpeed(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMaxSpeed(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxFlow(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMaxFlow(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxFlow(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMaxFlow(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MinConstPressure(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMinConstPressure(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType +chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MinConstPressure(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMinConstPressure(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxConstPressure(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMaxConstPressure(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType +chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxConstPressure(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMaxConstPressure(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MinCompPressure(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMinCompPressure(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MinCompPressure(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMinCompPressure(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxCompPressure(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMaxCompPressure(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxCompPressure(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMaxCompPressure(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MinConstSpeed(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMinConstSpeed(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MinConstSpeed(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMinConstSpeed(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxConstSpeed(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMaxConstSpeed(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxConstSpeed(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMaxConstSpeed(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MinConstFlow(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMinConstFlow(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MinConstFlow(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMinConstFlow(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxConstFlow(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMaxConstFlow(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxConstFlow(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMaxConstFlow(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MinConstTemp(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMinConstTemp(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MinConstTemp(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMinConstTemp(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxConstTemp(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMaxConstTemp(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxConstTemp(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMaxConstTemp(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_PumpStatus(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePumpStatus(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_PumpStatus(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePumpStatus(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_EffectiveOperationMode( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeEffectiveOperationMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_EffectiveOperationMode( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeEffectiveOperationMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_EffectiveControlMode(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeEffectiveControlMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_EffectiveControlMode( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeEffectiveControlMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_Capacity(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCapacity(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_Capacity(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCapacity(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_Speed(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeSpeed(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_Speed(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeSpeed(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_LifetimeRunningHours(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeLifetimeRunningHours(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_LifetimeRunningHours( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeLifetimeRunningHours(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_Power(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePower(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_Power(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePower(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_LifetimeEnergyConsumed( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeLifetimeEnergyConsumed(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_LifetimeEnergyConsumed( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeLifetimeEnergyConsumed(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_OperationMode(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeOperationMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_OperationMode(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeOperationMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ControlMode(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeControlMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_ControlMode(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeControlMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_AlarmMask(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeAlarmMask(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_AlarmMask(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeAlarmMask(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_FeatureMap(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_FeatureMap(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster PumpConfigurationAndControl +// Cluster RelativeHumidityMeasurement + +chip::ChipError::StorageType chip_ime_ReadAttribute_RelativeHumidityMeasurement_MeasuredValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::RelativeHumidityMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_RelativeHumidityMeasurement_MeasuredValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::RelativeHumidityMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_RelativeHumidityMeasurement_MinMeasuredValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::RelativeHumidityMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMinMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType +chip_ime_SubscribeAttribute_RelativeHumidityMeasurement_MinMeasuredValue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::RelativeHumidityMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMinMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_RelativeHumidityMeasurement_MaxMeasuredValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::RelativeHumidityMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMaxMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType +chip_ime_SubscribeAttribute_RelativeHumidityMeasurement_MaxMeasuredValue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::RelativeHumidityMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMaxMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_RelativeHumidityMeasurement_Tolerance(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::RelativeHumidityMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeTolerance(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_RelativeHumidityMeasurement_Tolerance(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::RelativeHumidityMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeTolerance(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_RelativeHumidityMeasurement_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::RelativeHumidityMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_RelativeHumidityMeasurement_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::RelativeHumidityMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster RelativeHumidityMeasurement +// Cluster Scenes + +chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_SceneCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ScenesCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeSceneCount(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Scenes_SceneCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ScenesCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeSceneCount(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_CurrentScene(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ScenesCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCurrentScene(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Scenes_CurrentScene(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ScenesCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCurrentScene(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_CurrentGroup(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ScenesCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCurrentGroup(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Scenes_CurrentGroup(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ScenesCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCurrentGroup(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_SceneValid(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ScenesCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeSceneValid(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Scenes_SceneValid(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ScenesCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeSceneValid(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_NameSupport(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ScenesCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNameSupport(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Scenes_NameSupport(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ScenesCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeNameSupport(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ScenesCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Scenes_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ScenesCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster Scenes +// Cluster SoftwareDiagnostics + +chip::ChipError::StorageType chip_ime_ReadAttribute_SoftwareDiagnostics_ThreadMetrics(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::SoftwareDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeThreadMetrics(gSoftwareDiagnosticsThreadMetricsListAttributeCallback.Cancel(), + gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_SoftwareDiagnostics_CurrentHeapFree(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::SoftwareDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCurrentHeapFree(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_SoftwareDiagnostics_CurrentHeapFree(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::SoftwareDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCurrentHeapFree(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_SoftwareDiagnostics_CurrentHeapUsed(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::SoftwareDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCurrentHeapUsed(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_SoftwareDiagnostics_CurrentHeapUsed(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::SoftwareDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCurrentHeapUsed(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_SoftwareDiagnostics_CurrentHeapHighWatermark(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::SoftwareDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCurrentHeapHighWatermark(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType +chip_ime_SubscribeAttribute_SoftwareDiagnostics_CurrentHeapHighWatermark(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::SoftwareDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCurrentHeapHighWatermark(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), + minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_SoftwareDiagnostics_FeatureMap(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::SoftwareDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_SoftwareDiagnostics_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::SoftwareDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_SoftwareDiagnostics_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::SoftwareDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster SoftwareDiagnostics +// Cluster Switch + +chip::ChipError::StorageType chip_ime_ReadAttribute_Switch_NumberOfPositions(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::SwitchCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNumberOfPositions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Switch_NumberOfPositions(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::SwitchCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeNumberOfPositions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Switch_CurrentPosition(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::SwitchCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCurrentPosition(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Switch_CurrentPosition(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::SwitchCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCurrentPosition(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Switch_MultiPressMax(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::SwitchCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMultiPressMax(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Switch_MultiPressMax(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::SwitchCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMultiPressMax(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Switch_FeatureMap(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::SwitchCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Switch_FeatureMap(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::SwitchCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Switch_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::SwitchCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Switch_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::SwitchCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster Switch +// Cluster TvChannel + +chip::ChipError::StorageType chip_ime_ReadAttribute_TvChannel_TvChannelList(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TvChannelCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeTvChannelList(gTvChannelTvChannelListListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TvChannel_TvChannelLineup(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TvChannelCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeTvChannelLineup(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TvChannel_TvChannelLineup(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TvChannelCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeTvChannelLineup(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TvChannel_CurrentTvChannel(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TvChannelCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCurrentTvChannel(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TvChannel_CurrentTvChannel(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TvChannelCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCurrentTvChannel(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TvChannel_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TvChannelCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TvChannel_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TvChannelCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster TvChannel +// Cluster TargetNavigator + +chip::ChipError::StorageType chip_ime_ReadAttribute_TargetNavigator_TargetNavigatorList(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TargetNavigatorCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeTargetNavigatorList(gTargetNavigatorTargetNavigatorListListAttributeCallback.Cancel(), + gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TargetNavigator_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TargetNavigatorCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TargetNavigator_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TargetNavigatorCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster TargetNavigator +// Cluster TemperatureMeasurement + +chip::ChipError::StorageType chip_ime_ReadAttribute_TemperatureMeasurement_MeasuredValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TemperatureMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TemperatureMeasurement_MeasuredValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TemperatureMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TemperatureMeasurement_MinMeasuredValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TemperatureMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMinMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TemperatureMeasurement_MinMeasuredValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TemperatureMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMinMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TemperatureMeasurement_MaxMeasuredValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TemperatureMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMaxMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TemperatureMeasurement_MaxMeasuredValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TemperatureMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMaxMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TemperatureMeasurement_Tolerance(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TemperatureMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeTolerance(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TemperatureMeasurement_Tolerance(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TemperatureMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeTolerance(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TemperatureMeasurement_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TemperatureMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TemperatureMeasurement_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TemperatureMeasurementCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster TemperatureMeasurement +// Cluster TestCluster + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Boolean(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeBoolean(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Boolean(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeBoolean(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Bitmap8(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeBitmap8(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Bitmap8(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeBitmap8(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Bitmap16(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeBitmap16(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Bitmap16(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeBitmap16(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Bitmap32(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeBitmap32(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Bitmap32(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeBitmap32(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Bitmap64(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeBitmap64(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Bitmap64(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeBitmap64(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int8u(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeInt8u(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Int8u(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeInt8u(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int16u(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeInt16u(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Int16u(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeInt16u(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int32u(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeInt32u(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Int32u(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeInt32u(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int64u(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeInt64u(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Int64u(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeInt64u(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int8s(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeInt8s(gInt8sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Int8s(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeInt8s(gInt8sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int16s(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeInt16s(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Int16s(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeInt16s(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int32s(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeInt32s(gInt32sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Int32s(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeInt32s(gInt32sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int64s(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeInt64s(gInt64sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Int64s(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeInt64s(gInt64sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Enum8(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeEnum8(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Enum8(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeEnum8(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Enum16(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeEnum16(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Enum16(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeEnum16(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_OctetString(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeOctetString(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_OctetString(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeOctetString(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_ListInt8u(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeListInt8u(gTestClusterListInt8uListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_ListOctetString(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeListOctetString(gTestClusterListOctetStringListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_ListStructOctetString(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeListStructOctetString(gTestClusterListStructOctetStringListAttributeCallback.Cancel(), + gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_LongOctetString(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeLongOctetString(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_LongOctetString(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeLongOctetString(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_CharString(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCharString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_CharString(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCharString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_LongCharString(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeLongCharString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_LongCharString(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeLongCharString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_EpochUs(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeEpochUs(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_EpochUs(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeEpochUs(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_EpochS(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeEpochS(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_EpochS(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeEpochS(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_VendorId(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeVendorId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_VendorId(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeVendorId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_ListNullablesAndOptionalsStruct(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeListNullablesAndOptionalsStruct(gTestClusterListNullablesAndOptionalsStructListAttributeCallback.Cancel(), + gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Unsupported(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeUnsupported(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Unsupported(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeUnsupported(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableBoolean(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableBoolean(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableBoolean(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeNullableBoolean(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableBitmap8(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableBitmap8(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableBitmap8(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeNullableBitmap8(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableBitmap16(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableBitmap16(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableBitmap16(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeNullableBitmap16(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableBitmap32(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableBitmap32(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableBitmap32(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeNullableBitmap32(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableBitmap64(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableBitmap64(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableBitmap64(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeNullableBitmap64(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableInt8u(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableInt8u(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableInt8u(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeNullableInt8u(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableInt16u(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableInt16u(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableInt16u(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeNullableInt16u(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableInt32u(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableInt32u(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableInt32u(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeNullableInt32u(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableInt64u(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableInt64u(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableInt64u(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeNullableInt64u(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableInt8s(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableInt8s(gInt8sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableInt8s(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeNullableInt8s(gInt8sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableInt16s(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableInt16s(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableInt16s(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeNullableInt16s(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableInt32s(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableInt32s(gInt32sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableInt32s(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeNullableInt32s(gInt32sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableInt64s(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableInt64s(gInt64sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableInt64s(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeNullableInt64s(gInt64sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableEnum8(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableEnum8(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableEnum8(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeNullableEnum8(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableEnum16(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableEnum16(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableEnum16(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeNullableEnum16(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableOctetString(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableOctetString(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableOctetString(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeNullableOctetString(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), + minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableCharString(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableCharString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableCharString(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeNullableCharString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster TestCluster +// Cluster Thermostat + +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_LocalTemperature(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeLocalTemperature(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_LocalTemperature(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeLocalTemperature(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_AbsMinHeatSetpointLimit(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeAbsMinHeatSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_AbsMinHeatSetpointLimit(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeAbsMinHeatSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_AbsMaxHeatSetpointLimit(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeAbsMaxHeatSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_AbsMaxHeatSetpointLimit(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeAbsMaxHeatSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_AbsMinCoolSetpointLimit(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeAbsMinCoolSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_AbsMinCoolSetpointLimit(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeAbsMinCoolSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_AbsMaxCoolSetpointLimit(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeAbsMaxCoolSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_AbsMaxCoolSetpointLimit(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeAbsMaxCoolSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_OccupiedCoolingSetpoint(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeOccupiedCoolingSetpoint(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_OccupiedCoolingSetpoint(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeOccupiedCoolingSetpoint(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_OccupiedHeatingSetpoint(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeOccupiedHeatingSetpoint(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_OccupiedHeatingSetpoint(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeOccupiedHeatingSetpoint(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_MinHeatSetpointLimit(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMinHeatSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_MinHeatSetpointLimit(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMinHeatSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_MaxHeatSetpointLimit(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMaxHeatSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_MaxHeatSetpointLimit(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMaxHeatSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_MinCoolSetpointLimit(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMinCoolSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_MinCoolSetpointLimit(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMinCoolSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_MaxCoolSetpointLimit(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMaxCoolSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_MaxCoolSetpointLimit(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMaxCoolSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_MinSetpointDeadBand(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMinSetpointDeadBand(gInt8sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_MinSetpointDeadBand(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMinSetpointDeadBand(gInt8sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_ControlSequenceOfOperation(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeControlSequenceOfOperation(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_ControlSequenceOfOperation(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeControlSequenceOfOperation(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), + minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_SystemMode(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeSystemMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_SystemMode(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeSystemMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_StartOfWeek(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeStartOfWeek(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_StartOfWeek(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeStartOfWeek(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_NumberOfWeeklyTransitions(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNumberOfWeeklyTransitions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_NumberOfWeeklyTransitions(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeNumberOfWeeklyTransitions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), + minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_NumberOfDailyTransitions(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNumberOfDailyTransitions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_NumberOfDailyTransitions(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeNumberOfDailyTransitions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_FeatureMap(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_FeatureMap(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster Thermostat +// Cluster ThermostatUserInterfaceConfiguration + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_TemperatureDisplayMode( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeTemperatureDisplayMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThermostatUserInterfaceConfiguration_TemperatureDisplayMode( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeTemperatureDisplayMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_KeypadLockout( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeKeypadLockout(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThermostatUserInterfaceConfiguration_KeypadLockout( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeKeypadLockout(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_ScheduleProgrammingVisibility( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeScheduleProgrammingVisibility(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThermostatUserInterfaceConfiguration_ScheduleProgrammingVisibility( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeScheduleProgrammingVisibility(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), + minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_ClusterRevision( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThermostatUserInterfaceConfiguration_ClusterRevision( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster ThermostatUserInterfaceConfiguration +// Cluster ThreadNetworkDiagnostics + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Channel(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeChannel(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_Channel(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeChannel(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RoutingRole(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeRoutingRole(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RoutingRole(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeRoutingRole(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_NetworkName(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNetworkName(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_NetworkName(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeNetworkName(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PanId(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePanId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_PanId(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePanId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ExtendedPanId(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeExtendedPanId(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_ExtendedPanId(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeExtendedPanId(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_MeshLocalPrefix(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMeshLocalPrefix(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_MeshLocalPrefix(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMeshLocalPrefix(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_OverrunCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeOverrunCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_OverrunCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeOverrunCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_NeighborTableList(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeNeighborTableList(gThreadNetworkDiagnosticsNeighborTableListListAttributeCallback.Cancel(), + gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RouteTableList(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeRouteTableList(gThreadNetworkDiagnosticsRouteTableListListAttributeCallback.Cancel(), + gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PartitionId(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePartitionId(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_PartitionId(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePartitionId(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Weighting(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeWeighting(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_Weighting(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeWeighting(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_DataVersion(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeDataVersion(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_DataVersion(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeDataVersion(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_StableDataVersion(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeStableDataVersion(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_StableDataVersion(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeStableDataVersion(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_LeaderRouterId(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeLeaderRouterId(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_LeaderRouterId(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeLeaderRouterId(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_DetachedRoleCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeDetachedRoleCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_DetachedRoleCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeDetachedRoleCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ChildRoleCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeChildRoleCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_ChildRoleCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeChildRoleCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RouterRoleCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeRouterRoleCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RouterRoleCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeRouterRoleCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_LeaderRoleCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeLeaderRoleCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_LeaderRoleCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeLeaderRoleCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_AttachAttemptCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeAttachAttemptCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_AttachAttemptCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeAttachAttemptCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PartitionIdChangeCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePartitionIdChangeCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_PartitionIdChangeCount( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePartitionIdChangeCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_BetterPartitionAttachAttemptCount( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeBetterPartitionAttachAttemptCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_BetterPartitionAttachAttemptCount( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeBetterPartitionAttachAttemptCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), + minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ParentChangeCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeParentChangeCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_ParentChangeCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeParentChangeCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxTotalCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeTxTotalCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxTotalCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeTxTotalCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxUnicastCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeTxUnicastCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxUnicastCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeTxUnicastCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBroadcastCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeTxBroadcastCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxBroadcastCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeTxBroadcastCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxAckRequestedCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeTxAckRequestedCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType +chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxAckRequestedCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeTxAckRequestedCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxAckedCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeTxAckedCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxAckedCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeTxAckedCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxNoAckRequestedCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeTxNoAckRequestedCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxNoAckRequestedCount( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeTxNoAckRequestedCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDataCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeTxDataCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxDataCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeTxDataCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDataPollCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeTxDataPollCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxDataPollCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeTxDataPollCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBeaconCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeTxBeaconCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxBeaconCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeTxBeaconCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBeaconRequestCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeTxBeaconRequestCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxBeaconRequestCount( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeTxBeaconRequestCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxOtherCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeTxOtherCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxOtherCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeTxOtherCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxRetryCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeTxRetryCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxRetryCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeTxRetryCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDirectMaxRetryExpiryCount( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeTxDirectMaxRetryExpiryCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxDirectMaxRetryExpiryCount( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeTxDirectMaxRetryExpiryCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), + minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxIndirectMaxRetryExpiryCount( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeTxIndirectMaxRetryExpiryCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxIndirectMaxRetryExpiryCount( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeTxIndirectMaxRetryExpiryCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), + minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrCcaCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeTxErrCcaCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxErrCcaCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeTxErrCcaCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrAbortCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeTxErrAbortCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxErrAbortCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeTxErrAbortCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrBusyChannelCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeTxErrBusyChannelCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxErrBusyChannelCount( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeTxErrBusyChannelCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxTotalCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeRxTotalCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxTotalCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeRxTotalCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxUnicastCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeRxUnicastCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxUnicastCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeRxUnicastCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBroadcastCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeRxBroadcastCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxBroadcastCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeRxBroadcastCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDataCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeRxDataCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxDataCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeRxDataCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDataPollCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeRxDataPollCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxDataPollCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeRxDataPollCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBeaconCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeRxBeaconCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxBeaconCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeRxBeaconCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBeaconRequestCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeRxBeaconRequestCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxBeaconRequestCount( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeRxBeaconRequestCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxOtherCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeRxOtherCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxOtherCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeRxOtherCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxAddressFilteredCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeRxAddressFilteredCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxAddressFilteredCount( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeRxAddressFilteredCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDestAddrFilteredCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeRxDestAddrFilteredCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxDestAddrFilteredCount( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeRxDestAddrFilteredCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDuplicatedCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeRxDuplicatedCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxDuplicatedCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeRxDuplicatedCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrNoFrameCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeRxErrNoFrameCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxErrNoFrameCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeRxErrNoFrameCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrUnknownNeighborCount( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeRxErrUnknownNeighborCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxErrUnknownNeighborCount( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeRxErrUnknownNeighborCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), + minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType +chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrInvalidSrcAddrCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeRxErrInvalidSrcAddrCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxErrInvalidSrcAddrCount( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeRxErrInvalidSrcAddrCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), + minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrSecCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeRxErrSecCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxErrSecCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeRxErrSecCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrFcsCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeRxErrFcsCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxErrFcsCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeRxErrFcsCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrOtherCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeRxErrOtherCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxErrOtherCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeRxErrOtherCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ActiveTimestamp(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeActiveTimestamp(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_ActiveTimestamp(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeActiveTimestamp(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PendingTimestamp(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePendingTimestamp(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_PendingTimestamp(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePendingTimestamp(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Delay(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeDelay(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_Delay(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeDelay(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_SecurityPolicy(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeSecurityPolicy(gThreadNetworkDiagnosticsSecurityPolicyListAttributeCallback.Cancel(), + gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ChannelMask(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeChannelMask(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_ChannelMask(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeChannelMask(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_OperationalDatasetComponents( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeOperationalDatasetComponents( + gThreadNetworkDiagnosticsOperationalDatasetComponentsListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ActiveNetworkFaultsList(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeActiveNetworkFaultsList(gThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallback.Cancel(), + gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster ThreadNetworkDiagnostics +// Cluster WakeOnLan + +chip::ChipError::StorageType chip_ime_ReadAttribute_WakeOnLan_WakeOnLanMacAddress(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WakeOnLanCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeWakeOnLanMacAddress(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WakeOnLan_WakeOnLanMacAddress(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WakeOnLanCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeWakeOnLanMacAddress(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WakeOnLan_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WakeOnLanCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WakeOnLan_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WakeOnLanCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster WakeOnLan +// Cluster WiFiNetworkDiagnostics + +chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Bssid(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeBssid(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_Bssid(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeBssid(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_SecurityType(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeSecurityType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_SecurityType(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeSecurityType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_WiFiVersion(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeWiFiVersion(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_WiFiVersion(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeWiFiVersion(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_ChannelNumber(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeChannelNumber(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_ChannelNumber(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeChannelNumber(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Rssi(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeRssi(gInt8sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_Rssi(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeRssi(gInt8sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_BeaconLostCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeBeaconLostCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_BeaconLostCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeBeaconLostCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_BeaconRxCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeBeaconRxCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_BeaconRxCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeBeaconRxCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_PacketMulticastRxCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePacketMulticastRxCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_PacketMulticastRxCount( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePacketMulticastRxCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_PacketMulticastTxCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePacketMulticastTxCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_PacketMulticastTxCount( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePacketMulticastTxCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_PacketUnicastRxCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePacketUnicastRxCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_PacketUnicastRxCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePacketUnicastRxCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_PacketUnicastTxCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePacketUnicastTxCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_PacketUnicastTxCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributePacketUnicastTxCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_CurrentMaxRate(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCurrentMaxRate(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_CurrentMaxRate(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCurrentMaxRate(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_OverrunCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeOverrunCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_OverrunCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeOverrunCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_FeatureMap(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster WiFiNetworkDiagnostics +// Cluster WindowCovering + +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_Type(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_Type(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositionLift(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCurrentPositionLift(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionLift(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCurrentPositionLift(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositionTilt(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCurrentPositionTilt(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionTilt(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCurrentPositionTilt(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_ConfigStatus(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeConfigStatus(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_ConfigStatus(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeConfigStatus(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositionLiftPercentage(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCurrentPositionLiftPercentage(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType +chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionLiftPercentage(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCurrentPositionLiftPercentage(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), + minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositionTiltPercentage(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCurrentPositionTiltPercentage(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType +chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionTiltPercentage(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCurrentPositionTiltPercentage(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), + minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_OperationalStatus(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeOperationalStatus(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_OperationalStatus(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeOperationalStatus(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_TargetPositionLiftPercent100ths(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeTargetPositionLiftPercent100ths(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_TargetPositionLiftPercent100ths( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeTargetPositionLiftPercent100ths(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), + minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_TargetPositionTiltPercent100ths(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeTargetPositionTiltPercent100ths(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_TargetPositionTiltPercent100ths( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeTargetPositionTiltPercent100ths(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), + minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_EndProductType(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeEndProductType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_EndProductType(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeEndProductType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositionLiftPercent100ths(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeCurrentPositionLiftPercent100ths(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionLiftPercent100ths( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCurrentPositionLiftPercent100ths(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), + minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositionTiltPercent100ths(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeCurrentPositionTiltPercent100ths(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionTiltPercent100ths( + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeCurrentPositionTiltPercent100ths(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), + minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_InstalledOpenLimitLift(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeInstalledOpenLimitLift(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_InstalledOpenLimitLift(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeInstalledOpenLimitLift(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_InstalledClosedLimitLift(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeInstalledClosedLimitLift(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_InstalledClosedLimitLift(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeInstalledClosedLimitLift(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), + minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_InstalledOpenLimitTilt(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeInstalledOpenLimitTilt(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_InstalledOpenLimitTilt(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeInstalledOpenLimitTilt(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_InstalledClosedLimitTilt(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeInstalledClosedLimitTilt(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_InstalledClosedLimitTilt(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeInstalledClosedLimitTilt(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), + minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_Mode(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_Mode(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, uint16_t minInterval, + uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_SafetyStatus(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeSafetyStatus(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_SafetyStatus(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeSafetyStatus(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_FeatureMap(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_FeatureMap(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_ClusterRevision(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, + maxInterval) + .AsInteger(); +} + +// End of Cluster WindowCovering +} diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index be67bbb15d09ef..2bec056d79a87c 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -657,91 +657,6 @@ class ChipClusters: "commands": { }, "attributes": { - 0x00000001: { - "attributeName": "VendorName", - "attributeId": 0x00000001, - "type": "str", - "reportable": True, - }, - 0x00000002: { - "attributeName": "VendorID", - "attributeId": 0x00000002, - "type": "int", - "reportable": True, - }, - 0x00000003: { - "attributeName": "ProductName", - "attributeId": 0x00000003, - "type": "str", - "reportable": True, - }, - 0x00000005: { - "attributeName": "NodeLabel", - "attributeId": 0x00000005, - "type": "str", - "reportable": True, - "writable": True, - }, - 0x00000007: { - "attributeName": "HardwareVersion", - "attributeId": 0x00000007, - "type": "int", - "reportable": True, - }, - 0x00000008: { - "attributeName": "HardwareVersionString", - "attributeId": 0x00000008, - "type": "str", - "reportable": True, - }, - 0x00000009: { - "attributeName": "SoftwareVersion", - "attributeId": 0x00000009, - "type": "int", - "reportable": True, - }, - 0x0000000A: { - "attributeName": "SoftwareVersionString", - "attributeId": 0x0000000A, - "type": "str", - "reportable": True, - }, - 0x0000000B: { - "attributeName": "ManufacturingDate", - "attributeId": 0x0000000B, - "type": "str", - "reportable": True, - }, - 0x0000000C: { - "attributeName": "PartNumber", - "attributeId": 0x0000000C, - "type": "str", - "reportable": True, - }, - 0x0000000D: { - "attributeName": "ProductURL", - "attributeId": 0x0000000D, - "type": "str", - "reportable": True, - }, - 0x0000000E: { - "attributeName": "ProductLabel", - "attributeId": 0x0000000E, - "type": "str", - "reportable": True, - }, - 0x0000000F: { - "attributeName": "SerialNumber", - "attributeId": 0x0000000F, - "type": "str", - "reportable": True, - }, - 0x00000011: { - "attributeName": "Reachable", - "attributeId": 0x00000011, - "type": "bool", - "reportable": True, - }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -3094,6 +3009,24 @@ class ChipClusters: }, }, } + _POWER_SOURCE_CONFIGURATION_CLUSTER_INFO = { + "clusterName": "PowerSourceConfiguration", + "clusterId": 0x0000002E, + "commands": { + }, + "attributes": { + 0x00000000: { + "attributeName": "Sources", + "attributeId": 0x00000000, + "type": "int", + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + }, + }, + } _PRESSURE_MEASUREMENT_CLUSTER_INFO = { "clusterName": "PressureMeasurement", "clusterId": 0x00000403, @@ -5295,6 +5228,7 @@ class ChipClusters: 0x00000007: _ON_OFF_SWITCH_CONFIGURATION_CLUSTER_INFO, 0x0000003E: _OPERATIONAL_CREDENTIALS_CLUSTER_INFO, 0x0000002F: _POWER_SOURCE_CLUSTER_INFO, + 0x0000002E: _POWER_SOURCE_CONFIGURATION_CLUSTER_INFO, 0x00000403: _PRESSURE_MEASUREMENT_CLUSTER_INFO, 0x00000200: _PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_INFO, 0x00000405: _RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_INFO, @@ -5355,6 +5289,7 @@ class ChipClusters: "OnOffSwitchConfiguration": _ON_OFF_SWITCH_CONFIGURATION_CLUSTER_INFO, "OperationalCredentials": _OPERATIONAL_CREDENTIALS_CLUSTER_INFO, "PowerSource": _POWER_SOURCE_CLUSTER_INFO, + "PowerSourceConfiguration": _POWER_SOURCE_CONFIGURATION_CLUSTER_INFO, "PressureMeasurement": _PRESSURE_MEASUREMENT_CLUSTER_INFO, "PumpConfigurationAndControl": _PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_INFO, "RelativeHumidityMeasurement": _RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_INFO, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 652b05fd51b2d4..bea22788661c43 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -5949,6 +5949,22 @@ class PowerSourceConfiguration(Cluster): id: typing.ClassVar[int] = 0x002E class Attributes: + @dataclass + class Sources(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x002E + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = None + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty diff --git a/src/darwin/Framework/CHIP/templates/helper.js b/src/darwin/Framework/CHIP/templates/helper.js index 1aaa3e0c1ba4b6..d036e1cbf27f75 100644 --- a/src/darwin/Framework/CHIP/templates/helper.js +++ b/src/darwin/Framework/CHIP/templates/helper.js @@ -45,6 +45,7 @@ function asExpectedEndpointForCluster(clusterName) case 'TrustedRootCertificates': case 'OtaSoftwareUpdateProvider': case 'OtaSoftwareUpdateRequestor': + case 'PowerSourceConfiguration': return 0; } return 1; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm index 6622417c7e4743..4d90a0c2cf9d5c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm @@ -830,6 +830,26 @@ DispatchSuccess(context, objCValue); }; +void CHIPPowerSourceConfigurationSourcesListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + void CHIPSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge::OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value) diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h index ecf7dc89dfcbf6..cabe08c01511a7 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h @@ -744,6 +744,17 @@ class CHIPPowerSourceActiveBatteryFaultsListAttributeCallbackBridge static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; +class CHIPPowerSourceConfigurationSourcesListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPPowerSourceConfigurationSourcesListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + class CHIPSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge : public CHIPCallbackBridge { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h index 0b3c8344d76804..15264926e1595c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -581,118 +581,6 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPBridgedDeviceBasic : CHIPCluster -- (void)readAttributeVendorNameWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)subscribeAttributeVendorNameWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - responseHandler:(ResponseHandler)responseHandler; -- (void)reportAttributeVendorNameWithResponseHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))responseHandler; - -- (void)readAttributeVendorIDWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)subscribeAttributeVendorIDWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - responseHandler:(ResponseHandler)responseHandler; -- (void)reportAttributeVendorIDWithResponseHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; - -- (void)readAttributeProductNameWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)subscribeAttributeProductNameWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - responseHandler:(ResponseHandler)responseHandler; -- (void)reportAttributeProductNameWithResponseHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))responseHandler; - -- (void)readAttributeNodeLabelWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)subscribeAttributeNodeLabelWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - responseHandler:(ResponseHandler)responseHandler; -- (void)reportAttributeNodeLabelWithResponseHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))responseHandler; - -- (void)readAttributeHardwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)subscribeAttributeHardwareVersionWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - responseHandler:(ResponseHandler)responseHandler; -- (void)reportAttributeHardwareVersionWithResponseHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))responseHandler; - -- (void)readAttributeHardwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)subscribeAttributeHardwareVersionStringWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - responseHandler:(ResponseHandler)responseHandler; -- (void)reportAttributeHardwareVersionStringWithResponseHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))responseHandler; - -- (void)readAttributeSoftwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)subscribeAttributeSoftwareVersionWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - responseHandler:(ResponseHandler)responseHandler; -- (void)reportAttributeSoftwareVersionWithResponseHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))responseHandler; - -- (void)readAttributeSoftwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - responseHandler:(ResponseHandler)responseHandler; -- (void)reportAttributeSoftwareVersionStringWithResponseHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))responseHandler; - -- (void)readAttributeManufacturingDateWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)subscribeAttributeManufacturingDateWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - responseHandler:(ResponseHandler)responseHandler; -- (void)reportAttributeManufacturingDateWithResponseHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))responseHandler; - -- (void)readAttributePartNumberWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)subscribeAttributePartNumberWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - responseHandler:(ResponseHandler)responseHandler; -- (void)reportAttributePartNumberWithResponseHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))responseHandler; - -- (void)readAttributeProductURLWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)subscribeAttributeProductURLWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - responseHandler:(ResponseHandler)responseHandler; -- (void)reportAttributeProductURLWithResponseHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))responseHandler; - -- (void)readAttributeProductLabelWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)subscribeAttributeProductLabelWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - responseHandler:(ResponseHandler)responseHandler; -- (void)reportAttributeProductLabelWithResponseHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))responseHandler; - -- (void)readAttributeSerialNumberWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)subscribeAttributeSerialNumberWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - responseHandler:(ResponseHandler)responseHandler; -- (void)reportAttributeSerialNumberWithResponseHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))responseHandler; - -- (void)readAttributeReachableWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)subscribeAttributeReachableWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - responseHandler:(ResponseHandler)responseHandler; -- (void)reportAttributeReachableWithResponseHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; - - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -2634,6 +2522,19 @@ NS_ASSUME_NONNULL_BEGIN @end +/** + * Cluster Power Source Configuration + * + */ +@interface CHIPPowerSourceConfiguration : CHIPCluster + +- (void)readAttributeSourcesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + +@end + /** * Cluster Pressure Measurement * diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index 4ce736f57c8b43..98d018edcac12c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -2729,567 +2729,6 @@ @implementation CHIPBridgedDeviceBasic return &_cppCluster; } -- (void)readAttributeVendorNameWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPCharStringAttributeCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable value) { - completionHandler(value, error); - }, - ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::VendorName::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeVendorNameWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - responseHandler:(ResponseHandler)responseHandler -{ - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.SubscribeAttributeVendorName(success, failure, minInterval, maxInterval); - }); -} - -- (void)reportAttributeVendorNameWithResponseHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))responseHandler -{ - new CHIPCharStringAttributeCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable value) { - responseHandler(value, error); - }, - ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.ReportAttributeVendorName(success); - }, - true); -} - -- (void)readAttributeVendorIDWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPInt16uAttributeCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable value) { - completionHandler(value, error); - }, - ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::VendorID::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeVendorIDWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - responseHandler:(ResponseHandler)responseHandler -{ - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.SubscribeAttributeVendorID(success, failure, minInterval, maxInterval); - }); -} - -- (void)reportAttributeVendorIDWithResponseHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))responseHandler -{ - new CHIPInt16uAttributeCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable value) { - responseHandler(value, error); - }, - ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.ReportAttributeVendorID(success); - }, - true); -} - -- (void)readAttributeProductNameWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPCharStringAttributeCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable value) { - completionHandler(value, error); - }, - ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::ProductName::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeProductNameWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - responseHandler:(ResponseHandler)responseHandler -{ - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.SubscribeAttributeProductName(success, failure, minInterval, maxInterval); - }); -} - -- (void)reportAttributeProductNameWithResponseHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))responseHandler -{ - new CHIPCharStringAttributeCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable value) { - responseHandler(value, error); - }, - ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.ReportAttributeProductName(success); - }, - true); -} - -- (void)readAttributeNodeLabelWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPCharStringAttributeCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable value) { - completionHandler(value, error); - }, - ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable ignored) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeNodeLabelWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - responseHandler:(ResponseHandler)responseHandler -{ - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.SubscribeAttributeNodeLabel(success, failure, minInterval, maxInterval); - }); -} - -- (void)reportAttributeNodeLabelWithResponseHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))responseHandler -{ - new CHIPCharStringAttributeCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable value) { - responseHandler(value, error); - }, - ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.ReportAttributeNodeLabel(success); - }, - true); -} - -- (void)readAttributeHardwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPInt16uAttributeCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable value) { - completionHandler(value, error); - }, - ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersion::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeHardwareVersionWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - responseHandler:(ResponseHandler)responseHandler -{ - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.SubscribeAttributeHardwareVersion(success, failure, minInterval, maxInterval); - }); -} - -- (void)reportAttributeHardwareVersionWithResponseHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))responseHandler -{ - new CHIPInt16uAttributeCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable value) { - responseHandler(value, error); - }, - ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.ReportAttributeHardwareVersion(success); - }, - true); -} - -- (void)readAttributeHardwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPCharStringAttributeCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable value) { - completionHandler(value, error); - }, - ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersionString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeHardwareVersionStringWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - responseHandler:(ResponseHandler)responseHandler -{ - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.SubscribeAttributeHardwareVersionString(success, failure, minInterval, maxInterval); - }); -} - -- (void)reportAttributeHardwareVersionStringWithResponseHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))responseHandler -{ - new CHIPCharStringAttributeCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable value) { - responseHandler(value, error); - }, - ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.ReportAttributeHardwareVersionString(success); - }, - true); -} - -- (void)readAttributeSoftwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPInt32uAttributeCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable value) { - completionHandler(value, error); - }, - ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersion::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeSoftwareVersionWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - responseHandler:(ResponseHandler)responseHandler -{ - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.SubscribeAttributeSoftwareVersion(success, failure, minInterval, maxInterval); - }); -} - -- (void)reportAttributeSoftwareVersionWithResponseHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))responseHandler -{ - new CHIPInt32uAttributeCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable value) { - responseHandler(value, error); - }, - ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.ReportAttributeSoftwareVersion(success); - }, - true); -} - -- (void)readAttributeSoftwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPCharStringAttributeCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable value) { - completionHandler(value, error); - }, - ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersionString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - responseHandler:(ResponseHandler)responseHandler -{ - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.SubscribeAttributeSoftwareVersionString(success, failure, minInterval, maxInterval); - }); -} - -- (void)reportAttributeSoftwareVersionStringWithResponseHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))responseHandler -{ - new CHIPCharStringAttributeCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable value) { - responseHandler(value, error); - }, - ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.ReportAttributeSoftwareVersionString(success); - }, - true); -} - -- (void)readAttributeManufacturingDateWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPCharStringAttributeCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable value) { - completionHandler(value, error); - }, - ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::ManufacturingDate::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeManufacturingDateWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - responseHandler:(ResponseHandler)responseHandler -{ - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.SubscribeAttributeManufacturingDate(success, failure, minInterval, maxInterval); - }); -} - -- (void)reportAttributeManufacturingDateWithResponseHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))responseHandler -{ - new CHIPCharStringAttributeCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable value) { - responseHandler(value, error); - }, - ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.ReportAttributeManufacturingDate(success); - }, - true); -} - -- (void)readAttributePartNumberWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPCharStringAttributeCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable value) { - completionHandler(value, error); - }, - ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::PartNumber::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributePartNumberWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - responseHandler:(ResponseHandler)responseHandler -{ - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.SubscribeAttributePartNumber(success, failure, minInterval, maxInterval); - }); -} - -- (void)reportAttributePartNumberWithResponseHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))responseHandler -{ - new CHIPCharStringAttributeCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable value) { - responseHandler(value, error); - }, - ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.ReportAttributePartNumber(success); - }, - true); -} - -- (void)readAttributeProductURLWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPCharStringAttributeCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable value) { - completionHandler(value, error); - }, - ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::ProductURL::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeProductURLWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - responseHandler:(ResponseHandler)responseHandler -{ - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.SubscribeAttributeProductURL(success, failure, minInterval, maxInterval); - }); -} - -- (void)reportAttributeProductURLWithResponseHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))responseHandler -{ - new CHIPCharStringAttributeCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable value) { - responseHandler(value, error); - }, - ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.ReportAttributeProductURL(success); - }, - true); -} - -- (void)readAttributeProductLabelWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPCharStringAttributeCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable value) { - completionHandler(value, error); - }, - ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::ProductLabel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeProductLabelWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - responseHandler:(ResponseHandler)responseHandler -{ - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.SubscribeAttributeProductLabel(success, failure, minInterval, maxInterval); - }); -} - -- (void)reportAttributeProductLabelWithResponseHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))responseHandler -{ - new CHIPCharStringAttributeCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable value) { - responseHandler(value, error); - }, - ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.ReportAttributeProductLabel(success); - }, - true); -} - -- (void)readAttributeSerialNumberWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPCharStringAttributeCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable value) { - completionHandler(value, error); - }, - ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::SerialNumber::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeSerialNumberWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - responseHandler:(ResponseHandler)responseHandler -{ - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.SubscribeAttributeSerialNumber(success, failure, minInterval, maxInterval); - }); -} - -- (void)reportAttributeSerialNumberWithResponseHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))responseHandler -{ - new CHIPCharStringAttributeCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable value) { - responseHandler(value, error); - }, - ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.ReportAttributeSerialNumber(success); - }, - true); -} - -- (void)readAttributeReachableWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPBooleanAttributeCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable value) { - completionHandler(value, error); - }, - ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::Reachable::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeReachableWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - responseHandler:(ResponseHandler)responseHandler -{ - new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.SubscribeAttributeReachable(success, failure, minInterval, maxInterval); - }); -} - -- (void)reportAttributeReachableWithResponseHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))responseHandler -{ - new CHIPBooleanAttributeCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable value) { - responseHandler(value, error); - }, - ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.ReportAttributeReachable(success); - }, - true); -} - - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -13453,6 +12892,46 @@ new CHIPInt16uAttributeCallbackBridge( @end +@implementation CHIPPowerSourceConfiguration + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)readAttributeSourcesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPowerSourceConfigurationSourcesListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +@end + @implementation CHIPPressureMeasurement - (chip::Controller::ClusterBase *)getCluster diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc_internal.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc_internal.h index 81c2739f0e451f..1ef8001ef4dee5 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc_internal.h @@ -185,6 +185,10 @@ @property (readonly) chip::Controller::PowerSourceCluster cppCluster; @end +@interface CHIPPowerSourceConfiguration () +@property (readonly) chip::Controller::PowerSourceConfigurationCluster cppCluster; +@end + @interface CHIPPressureMeasurement () @property (readonly) chip::Controller::PressureMeasurementCluster cppCluster; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h index aca21a7a489f5d..fa73c746f6750b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h @@ -180,21 +180,6 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPTestBridgedDeviceBasic : CHIPBridgedDeviceBasic -- (void)writeAttributeVendorNameWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeVendorIDWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeProductNameWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeHardwareVersionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeHardwareVersionStringWithValue:(NSString * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeSoftwareVersionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeSoftwareVersionStringWithValue:(NSString * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeManufacturingDateWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributePartNumberWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeProductURLWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeProductLabelWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeSerialNumberWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeReachableWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -638,6 +623,17 @@ NS_ASSUME_NONNULL_BEGIN @end +/** + * Cluster Power Source Configuration + * + */ +@interface CHIPTestPowerSourceConfiguration : CHIPPowerSourceConfiguration + +- (void)writeAttributeSourcesWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; + +@end + /** * Cluster Pressure Measurement * diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm index d4fcab97b05ac8..251d7373f573cc 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm @@ -1178,242 +1178,6 @@ @implementation CHIPTestBridgedDeviceBasic return &_cppCluster; } -- (void)writeAttributeVendorNameWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable ignored) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::VendorName::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeVendorIDWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable ignored) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::VendorID::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeProductNameWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable ignored) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::ProductName::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeHardwareVersionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable ignored) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersion::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeHardwareVersionStringWithValue:(NSString * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable ignored) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersionString::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeSoftwareVersionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable ignored) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersion::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeSoftwareVersionStringWithValue:(NSString * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable ignored) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersionString::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeManufacturingDateWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable ignored) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::ManufacturingDate::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributePartNumberWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable ignored) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::PartNumber::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeProductURLWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable ignored) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::ProductURL::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeProductLabelWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable ignored) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::ProductLabel::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeSerialNumberWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable ignored) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::SerialNumber::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeReachableWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable ignored) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::Reachable::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -5284,6 +5048,76 @@ new CHIPDefaultSuccessCallbackBridge( @end +@interface CHIPTestPowerSourceConfiguration () +@property (readonly) chip::Controller::PowerSourceConfigurationClusterTest cppCluster; +@end + +@implementation CHIPTestPowerSourceConfiguration + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeSourcesWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedCharValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +@end + @interface CHIPTestPressureMeasurement () @property (readonly) chip::Controller::PressureMeasurementClusterTest cppCluster; @end diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index 791268d6715d06..b0651e928b5998 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -29781,25 +29781,26 @@ - (void)testSendClusterTestDescriptorCluster_000002_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue count], 18); + XCTAssertEqual([actualValue count], 19); XCTAssertEqual([actualValue[0] unsignedIntValue], 3UL); XCTAssertEqual([actualValue[1] unsignedIntValue], 29UL); XCTAssertEqual([actualValue[2] unsignedIntValue], 40UL); XCTAssertEqual([actualValue[3] unsignedIntValue], 41UL); XCTAssertEqual([actualValue[4] unsignedIntValue], 42UL); - XCTAssertEqual([actualValue[5] unsignedIntValue], 48UL); - XCTAssertEqual([actualValue[6] unsignedIntValue], 49UL); - XCTAssertEqual([actualValue[7] unsignedIntValue], 50UL); - XCTAssertEqual([actualValue[8] unsignedIntValue], 51UL); - XCTAssertEqual([actualValue[9] unsignedIntValue], 52UL); - XCTAssertEqual([actualValue[10] unsignedIntValue], 53UL); - XCTAssertEqual([actualValue[11] unsignedIntValue], 54UL); - XCTAssertEqual([actualValue[12] unsignedIntValue], 55UL); - XCTAssertEqual([actualValue[13] unsignedIntValue], 60UL); - XCTAssertEqual([actualValue[14] unsignedIntValue], 62UL); - XCTAssertEqual([actualValue[15] unsignedIntValue], 1029UL); - XCTAssertEqual([actualValue[16] unsignedIntValue], 61440UL); - XCTAssertEqual([actualValue[17] unsignedIntValue], 61444UL); + XCTAssertEqual([actualValue[5] unsignedIntValue], 46UL); + XCTAssertEqual([actualValue[6] unsignedIntValue], 48UL); + XCTAssertEqual([actualValue[7] unsignedIntValue], 49UL); + XCTAssertEqual([actualValue[8] unsignedIntValue], 50UL); + XCTAssertEqual([actualValue[9] unsignedIntValue], 51UL); + XCTAssertEqual([actualValue[10] unsignedIntValue], 52UL); + XCTAssertEqual([actualValue[11] unsignedIntValue], 53UL); + XCTAssertEqual([actualValue[12] unsignedIntValue], 54UL); + XCTAssertEqual([actualValue[13] unsignedIntValue], 55UL); + XCTAssertEqual([actualValue[14] unsignedIntValue], 60UL); + XCTAssertEqual([actualValue[15] unsignedIntValue], 62UL); + XCTAssertEqual([actualValue[16] unsignedIntValue], 1029UL); + XCTAssertEqual([actualValue[17] unsignedIntValue], 61440UL); + XCTAssertEqual([actualValue[18] unsignedIntValue], 61444UL); } [expectation fulfill]; @@ -32374,381 +32375,6 @@ - (void)testSendClusterBridgedActionsReadAttributeClusterRevisionWithCompletionH [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterBridgedDeviceBasicReadAttributeVendorNameWithCompletionHandler -{ - dispatch_queue_t queue = dispatch_get_main_queue(); - - XCTestExpectation * connectedExpectation = - [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - WaitForCommissionee(connectedExpectation, queue); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; - - CHIPDevice * device = GetConnectedDevice(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - XCTestExpectation * expectation = - [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeVendorNameWithCompletionHandler"]; - - [cluster readAttributeVendorNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"BridgedDeviceBasic VendorName Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - -- (void)testSendClusterBridgedDeviceBasicReadAttributeVendorIDWithCompletionHandler -{ - dispatch_queue_t queue = dispatch_get_main_queue(); - - XCTestExpectation * connectedExpectation = - [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - WaitForCommissionee(connectedExpectation, queue); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; - - CHIPDevice * device = GetConnectedDevice(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - XCTestExpectation * expectation = - [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeVendorIDWithCompletionHandler"]; - - [cluster readAttributeVendorIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"BridgedDeviceBasic VendorID Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - -- (void)testSendClusterBridgedDeviceBasicReadAttributeProductNameWithCompletionHandler -{ - dispatch_queue_t queue = dispatch_get_main_queue(); - - XCTestExpectation * connectedExpectation = - [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - WaitForCommissionee(connectedExpectation, queue); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; - - CHIPDevice * device = GetConnectedDevice(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - XCTestExpectation * expectation = - [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeProductNameWithCompletionHandler"]; - - [cluster readAttributeProductNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"BridgedDeviceBasic ProductName Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - -- (void)testSendClusterBridgedDeviceBasicReadAttributeNodeLabelWithCompletionHandler -{ - dispatch_queue_t queue = dispatch_get_main_queue(); - - XCTestExpectation * connectedExpectation = - [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - WaitForCommissionee(connectedExpectation, queue); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; - - CHIPDevice * device = GetConnectedDevice(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - XCTestExpectation * expectation = - [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeNodeLabelWithCompletionHandler"]; - - [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"BridgedDeviceBasic NodeLabel Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - -- (void)testSendClusterBridgedDeviceBasicWriteAttributeNodeLabelWithValue -{ - dispatch_queue_t queue = dispatch_get_main_queue(); - - XCTestExpectation * connectedExpectation = - [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - WaitForCommissionee(connectedExpectation, queue); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; - - CHIPDevice * device = GetConnectedDevice(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - XCTestExpectation * expectation = [self expectationWithDescription:@"BridgedDeviceBasicWriteAttributeNodeLabelWithValue"]; - - NSString * _Nonnull value = @"Test"; - [cluster writeAttributeNodeLabelWithValue:value - completionHandler:^(NSError * _Nullable err) { - NSLog(@"BridgedDeviceBasic NodeLabel Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterBridgedDeviceBasicReadAttributeHardwareVersionWithCompletionHandler -{ - dispatch_queue_t queue = dispatch_get_main_queue(); - - XCTestExpectation * connectedExpectation = - [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - WaitForCommissionee(connectedExpectation, queue); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; - - CHIPDevice * device = GetConnectedDevice(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - XCTestExpectation * expectation = - [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeHardwareVersionWithCompletionHandler"]; - - [cluster readAttributeHardwareVersionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"BridgedDeviceBasic HardwareVersion Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - -- (void)testSendClusterBridgedDeviceBasicReadAttributeHardwareVersionStringWithCompletionHandler -{ - dispatch_queue_t queue = dispatch_get_main_queue(); - - XCTestExpectation * connectedExpectation = - [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - WaitForCommissionee(connectedExpectation, queue); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; - - CHIPDevice * device = GetConnectedDevice(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - XCTestExpectation * expectation = - [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeHardwareVersionStringWithCompletionHandler"]; - - [cluster readAttributeHardwareVersionStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"BridgedDeviceBasic HardwareVersionString Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - -- (void)testSendClusterBridgedDeviceBasicReadAttributeSoftwareVersionWithCompletionHandler -{ - dispatch_queue_t queue = dispatch_get_main_queue(); - - XCTestExpectation * connectedExpectation = - [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - WaitForCommissionee(connectedExpectation, queue); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; - - CHIPDevice * device = GetConnectedDevice(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - XCTestExpectation * expectation = - [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeSoftwareVersionWithCompletionHandler"]; - - [cluster readAttributeSoftwareVersionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"BridgedDeviceBasic SoftwareVersion Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - -- (void)testSendClusterBridgedDeviceBasicReadAttributeSoftwareVersionStringWithCompletionHandler -{ - dispatch_queue_t queue = dispatch_get_main_queue(); - - XCTestExpectation * connectedExpectation = - [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - WaitForCommissionee(connectedExpectation, queue); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; - - CHIPDevice * device = GetConnectedDevice(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - XCTestExpectation * expectation = - [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeSoftwareVersionStringWithCompletionHandler"]; - - [cluster readAttributeSoftwareVersionStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"BridgedDeviceBasic SoftwareVersionString Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - -- (void)testSendClusterBridgedDeviceBasicReadAttributeManufacturingDateWithCompletionHandler -{ - dispatch_queue_t queue = dispatch_get_main_queue(); - - XCTestExpectation * connectedExpectation = - [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - WaitForCommissionee(connectedExpectation, queue); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; - - CHIPDevice * device = GetConnectedDevice(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - XCTestExpectation * expectation = - [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeManufacturingDateWithCompletionHandler"]; - - [cluster readAttributeManufacturingDateWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"BridgedDeviceBasic ManufacturingDate Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - -- (void)testSendClusterBridgedDeviceBasicReadAttributePartNumberWithCompletionHandler -{ - dispatch_queue_t queue = dispatch_get_main_queue(); - - XCTestExpectation * connectedExpectation = - [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - WaitForCommissionee(connectedExpectation, queue); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; - - CHIPDevice * device = GetConnectedDevice(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - XCTestExpectation * expectation = - [self expectationWithDescription:@"BridgedDeviceBasicReadAttributePartNumberWithCompletionHandler"]; - - [cluster readAttributePartNumberWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"BridgedDeviceBasic PartNumber Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - -- (void)testSendClusterBridgedDeviceBasicReadAttributeProductURLWithCompletionHandler -{ - dispatch_queue_t queue = dispatch_get_main_queue(); - - XCTestExpectation * connectedExpectation = - [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - WaitForCommissionee(connectedExpectation, queue); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; - - CHIPDevice * device = GetConnectedDevice(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - XCTestExpectation * expectation = - [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeProductURLWithCompletionHandler"]; - - [cluster readAttributeProductURLWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"BridgedDeviceBasic ProductURL Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - -- (void)testSendClusterBridgedDeviceBasicReadAttributeProductLabelWithCompletionHandler -{ - dispatch_queue_t queue = dispatch_get_main_queue(); - - XCTestExpectation * connectedExpectation = - [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - WaitForCommissionee(connectedExpectation, queue); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; - - CHIPDevice * device = GetConnectedDevice(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - XCTestExpectation * expectation = - [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeProductLabelWithCompletionHandler"]; - - [cluster readAttributeProductLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"BridgedDeviceBasic ProductLabel Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - -- (void)testSendClusterBridgedDeviceBasicReadAttributeSerialNumberWithCompletionHandler -{ - dispatch_queue_t queue = dispatch_get_main_queue(); - - XCTestExpectation * connectedExpectation = - [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - WaitForCommissionee(connectedExpectation, queue); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; - - CHIPDevice * device = GetConnectedDevice(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - XCTestExpectation * expectation = - [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeSerialNumberWithCompletionHandler"]; - - [cluster readAttributeSerialNumberWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"BridgedDeviceBasic SerialNumber Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - -- (void)testSendClusterBridgedDeviceBasicReadAttributeReachableWithCompletionHandler -{ - dispatch_queue_t queue = dispatch_get_main_queue(); - - XCTestExpectation * connectedExpectation = - [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - WaitForCommissionee(connectedExpectation, queue); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; - - CHIPDevice * device = GetConnectedDevice(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - XCTestExpectation * expectation = - [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeReachableWithCompletionHandler"]; - - [cluster readAttributeReachableWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"BridgedDeviceBasic Reachable Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - - (void)testSendClusterBridgedDeviceBasicReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -38288,6 +37914,56 @@ - (void)testSendClusterPowerSourceReadAttributeClusterRevisionWithCompletionHand [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterPowerSourceConfigurationReadAttributeSourcesWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPPowerSourceConfiguration * cluster = [[CHIPPowerSourceConfiguration alloc] initWithDevice:device endpoint:0 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"PowerSourceConfigurationReadAttributeSourcesWithCompletionHandler"]; + + [cluster readAttributeSourcesWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"PowerSourceConfiguration Sources Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterPowerSourceConfigurationReadAttributeClusterRevisionWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPPowerSourceConfiguration * cluster = [[CHIPPowerSourceConfiguration alloc] initWithDevice:device endpoint:0 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"PowerSourceConfigurationReadAttributeClusterRevisionWithCompletionHandler"]; + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"PowerSourceConfiguration ClusterRevision Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterPressureMeasurementReadAttributeMeasuredValueWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); diff --git a/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h index 89859ac5ae2dee..3f5c36cce8e594 100644 --- a/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h @@ -64,6 +64,7 @@ MatterOnOffSwitchConfigurationPluginServerInitCallback(); \ MatterOperationalCredentialsPluginServerInitCallback(); \ MatterPowerSourcePluginServerInitCallback(); \ + MatterPowerSourceConfigurationPluginServerInitCallback(); \ MatterPressureMeasurementPluginServerInitCallback(); \ MatterPumpConfigurationAndControlPluginServerInitCallback(); \ MatterRelativeHumidityMeasurementPluginServerInitCallback(); \ diff --git a/zzz_generated/all-clusters-app/zap-generated/attribute-size.cpp b/zzz_generated/all-clusters-app/zap-generated/attribute-size.cpp index 53216da4432b3c..c895a1b465d390 100644 --- a/zzz_generated/all-clusters-app/zap-generated/attribute-size.cpp +++ b/zzz_generated/all-clusters-app/zap-generated/attribute-size.cpp @@ -690,6 +690,26 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo } break; } + case 0x002E: // Power Source Configuration Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x0000: // Sources + { + entryLength = 1; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + copyListMember(dest, src, write, &entryOffset, entryLength); // INT8U + break; + } + } + break; + } case 0x0034: // Software Diagnostics Cluster { uint16_t entryOffset = kSizeLengthInBytes; @@ -1283,6 +1303,15 @@ uint16_t emberAfAttributeValueListSize(ClusterId clusterId, AttributeId attribut break; } break; + case 0x002E: // Power Source Configuration Cluster + switch (attributeId) + { + case 0x0000: // Sources + // uint8_t + entryLength = 1; + break; + } + break; case 0x0034: // Software Diagnostics Cluster switch (attributeId) { diff --git a/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp b/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp index 52cf5b95692ef1..9add63fa52704c 100644 --- a/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp @@ -155,6 +155,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_POWER_SOURCE_CLUSTER_ID: emberAfPowerSourceClusterInitCallback(endpoint); break; + case ZCL_POWER_SOURCE_CONFIGURATION_CLUSTER_ID: + emberAfPowerSourceConfigurationClusterInitCallback(endpoint); + break; case ZCL_PRESSURE_MEASUREMENT_CLUSTER_ID: emberAfPressureMeasurementClusterInitCallback(endpoint); break; @@ -419,6 +422,11 @@ void __attribute__((weak)) emberAfPowerSourceClusterInitCallback(EndpointId endp // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfPowerSourceConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfPressureMeasurementClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index 07b38ca460f077..cf8f6e7501d4b3 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -320,21 +320,16 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* 1144 - FeatureMap, */ \ - 0x00, 0x00, 0x00, 0x00, \ - \ - /* Endpoint: 1, Cluster: Bridged Device Basic (server), big-endian */ \ - \ - /* 1148 - SoftwareVersion, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Switch (server), big-endian */ \ \ - /* 1152 - FeatureMap, */ \ + /* 1148 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Fixed Label (server), big-endian */ \ \ - /* 1156 - label list, */ \ + /* 1152 - label list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -352,46 +347,46 @@ \ /* Endpoint: 1, Cluster: Mode Select (server), big-endian */ \ \ - /* 1410 - Description, */ \ + /* 1406 - Description, */ \ 6, 'C', 'o', 'f', 'f', 'e', 'e', \ \ /* Endpoint: 1, Cluster: Door Lock (server), big-endian */ \ \ - /* 1417 - AutoRelockTime, */ \ + /* 1413 - AutoRelockTime, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Window Covering (server), big-endian */ \ \ - /* 1421 - FeatureMap, */ \ + /* 1417 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server), big-endian */ \ \ - /* 1425 - LifetimeRunningHours, */ \ + /* 1421 - LifetimeRunningHours, */ \ 0x00, 0x00, 0x00, \ \ - /* 1428 - Power, */ \ + /* 1424 - Power, */ \ 0x00, 0x00, 0x00, \ \ - /* 1431 - LifetimeEnergyConsumed, */ \ + /* 1427 - LifetimeEnergyConsumed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1435 - FeatureMap, */ \ + /* 1431 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Thermostat (server), big-endian */ \ \ - /* 1439 - FeatureMap, */ \ + /* 1435 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0B, \ \ /* Endpoint: 1, Cluster: IAS Zone (server), big-endian */ \ \ - /* 1443 - IAS CIE address, */ \ + /* 1439 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: TV Channel (server), big-endian */ \ \ - /* 1451 - tv channel list, */ \ + /* 1447 - tv channel list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -409,7 +404,7 @@ \ /* Endpoint: 1, Cluster: Target Navigator (server), big-endian */ \ \ - /* 1705 - target navigator list, */ \ + /* 1701 - target navigator list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -427,30 +422,30 @@ \ /* Endpoint: 1, Cluster: Media Playback (server), big-endian */ \ \ - /* 1959 - start time, */ \ + /* 1955 - start time, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, \ \ - /* 1967 - duration, */ \ + /* 1963 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1975 - position updated at, */ \ + /* 1971 - position updated at, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1983 - position, */ \ + /* 1979 - position, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1991 - playback speed, */ \ + /* 1987 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1999 - seek range end, */ \ + /* 1995 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2007 - seek range start, */ \ + /* 2003 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Media Input (server), big-endian */ \ \ - /* 2015 - media input list, */ \ + /* 2011 - media input list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -468,7 +463,7 @@ \ /* Endpoint: 1, Cluster: Content Launcher (server), big-endian */ \ \ - /* 2269 - accepts header list, */ \ + /* 2265 - accepts header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -484,7 +479,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2523 - supported streaming types, */ \ + /* 2519 - supported streaming types, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -502,7 +497,7 @@ \ /* Endpoint: 1, Cluster: Audio Output (server), big-endian */ \ \ - /* 2777 - audio output list, */ \ + /* 2773 - audio output list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -520,7 +515,7 @@ \ /* Endpoint: 1, Cluster: Application Launcher (server), big-endian */ \ \ - /* 3031 - application launcher list, */ \ + /* 3027 - application launcher list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -538,119 +533,119 @@ \ /* Endpoint: 1, Cluster: Test Cluster (server), big-endian */ \ \ - /* 3285 - bitmap32, */ \ + /* 3281 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3289 - bitmap64, */ \ + /* 3285 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3297 - int24u, */ \ + /* 3293 - int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 3300 - int32u, */ \ + /* 3296 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3304 - int40u, */ \ + /* 3300 - int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3309 - int48u, */ \ + /* 3305 - int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3315 - int56u, */ \ + /* 3311 - int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3322 - int64u, */ \ + /* 3318 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3330 - int24s, */ \ + /* 3326 - int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 3333 - int32s, */ \ + /* 3329 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3337 - int40s, */ \ + /* 3333 - int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3342 - int48s, */ \ + /* 3338 - int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3348 - int56s, */ \ + /* 3344 - int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3355 - int64s, */ \ + /* 3351 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3363 - float_single, */ \ + /* 3359 - float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3367 - float_double, */ \ + /* 3363 - float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3375 - epoch_us, */ \ + /* 3371 - epoch_us, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3383 - epoch_s, */ \ + /* 3379 - epoch_s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3387 - nullable_bitmap32, */ \ + /* 3383 - nullable_bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3391 - nullable_bitmap64, */ \ + /* 3387 - nullable_bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3399 - nullable_int24u, */ \ + /* 3395 - nullable_int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 3402 - nullable_int32u, */ \ + /* 3398 - nullable_int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3406 - nullable_int40u, */ \ + /* 3402 - nullable_int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3411 - nullable_int48u, */ \ + /* 3407 - nullable_int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3417 - nullable_int56u, */ \ + /* 3413 - nullable_int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3424 - nullable_int64u, */ \ + /* 3420 - nullable_int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3432 - nullable_int24s, */ \ + /* 3428 - nullable_int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 3435 - nullable_int32s, */ \ + /* 3431 - nullable_int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3439 - nullable_int40s, */ \ + /* 3435 - nullable_int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3444 - nullable_int48s, */ \ + /* 3440 - nullable_int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3450 - nullable_int56s, */ \ + /* 3446 - nullable_int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3457 - nullable_int64s, */ \ + /* 3453 - nullable_int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3465 - nullable_float_single, */ \ + /* 3461 - nullable_float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3469 - nullable_float_double, */ \ + /* 3465 - nullable_float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server), big-endian */ \ \ - /* 3477 - measurement type, */ \ + /* 3473 - measurement type, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3481 - total active power, */ \ + /* 3477 - total active power, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: On/Off (server), big-endian */ \ \ - /* 3485 - FeatureMap, */ \ + /* 3481 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } @@ -951,21 +946,16 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* 1144 - FeatureMap, */ \ - 0x00, 0x00, 0x00, 0x00, \ - \ - /* Endpoint: 1, Cluster: Bridged Device Basic (server), little-endian */ \ - \ - /* 1148 - SoftwareVersion, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Switch (server), little-endian */ \ \ - /* 1152 - FeatureMap, */ \ + /* 1148 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Fixed Label (server), little-endian */ \ \ - /* 1156 - label list, */ \ + /* 1152 - label list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -983,46 +973,46 @@ \ /* Endpoint: 1, Cluster: Mode Select (server), little-endian */ \ \ - /* 1410 - Description, */ \ + /* 1406 - Description, */ \ 6, 'C', 'o', 'f', 'f', 'e', 'e', \ \ /* Endpoint: 1, Cluster: Door Lock (server), little-endian */ \ \ - /* 1417 - AutoRelockTime, */ \ + /* 1413 - AutoRelockTime, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Window Covering (server), little-endian */ \ \ - /* 1421 - FeatureMap, */ \ + /* 1417 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server), little-endian */ \ \ - /* 1425 - LifetimeRunningHours, */ \ + /* 1421 - LifetimeRunningHours, */ \ 0x00, 0x00, 0x00, \ \ - /* 1428 - Power, */ \ + /* 1424 - Power, */ \ 0x00, 0x00, 0x00, \ \ - /* 1431 - LifetimeEnergyConsumed, */ \ + /* 1427 - LifetimeEnergyConsumed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1435 - FeatureMap, */ \ + /* 1431 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Thermostat (server), little-endian */ \ \ - /* 1439 - FeatureMap, */ \ + /* 1435 - FeatureMap, */ \ 0x0B, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: IAS Zone (server), little-endian */ \ \ - /* 1443 - IAS CIE address, */ \ + /* 1439 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: TV Channel (server), little-endian */ \ \ - /* 1451 - tv channel list, */ \ + /* 1447 - tv channel list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1040,7 +1030,7 @@ \ /* Endpoint: 1, Cluster: Target Navigator (server), little-endian */ \ \ - /* 1705 - target navigator list, */ \ + /* 1701 - target navigator list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1058,30 +1048,30 @@ \ /* Endpoint: 1, Cluster: Media Playback (server), little-endian */ \ \ - /* 1959 - start time, */ \ + /* 1955 - start time, */ \ 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1967 - duration, */ \ + /* 1963 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1975 - position updated at, */ \ + /* 1971 - position updated at, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1983 - position, */ \ + /* 1979 - position, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1991 - playback speed, */ \ + /* 1987 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1999 - seek range end, */ \ + /* 1995 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2007 - seek range start, */ \ + /* 2003 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Media Input (server), little-endian */ \ \ - /* 2015 - media input list, */ \ + /* 2011 - media input list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1099,7 +1089,7 @@ \ /* Endpoint: 1, Cluster: Content Launcher (server), little-endian */ \ \ - /* 2269 - accepts header list, */ \ + /* 2265 - accepts header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1115,7 +1105,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2523 - supported streaming types, */ \ + /* 2519 - supported streaming types, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1133,7 +1123,7 @@ \ /* Endpoint: 1, Cluster: Audio Output (server), little-endian */ \ \ - /* 2777 - audio output list, */ \ + /* 2773 - audio output list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1151,7 +1141,7 @@ \ /* Endpoint: 1, Cluster: Application Launcher (server), little-endian */ \ \ - /* 3031 - application launcher list, */ \ + /* 3027 - application launcher list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1169,125 +1159,125 @@ \ /* Endpoint: 1, Cluster: Test Cluster (server), little-endian */ \ \ - /* 3285 - bitmap32, */ \ + /* 3281 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3289 - bitmap64, */ \ + /* 3285 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3297 - int24u, */ \ + /* 3293 - int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 3300 - int32u, */ \ + /* 3296 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3304 - int40u, */ \ + /* 3300 - int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3309 - int48u, */ \ + /* 3305 - int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3315 - int56u, */ \ + /* 3311 - int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3322 - int64u, */ \ + /* 3318 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3330 - int24s, */ \ + /* 3326 - int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 3333 - int32s, */ \ + /* 3329 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3337 - int40s, */ \ + /* 3333 - int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3342 - int48s, */ \ + /* 3338 - int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3348 - int56s, */ \ + /* 3344 - int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3355 - int64s, */ \ + /* 3351 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3363 - float_single, */ \ + /* 3359 - float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3367 - float_double, */ \ + /* 3363 - float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3375 - epoch_us, */ \ + /* 3371 - epoch_us, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3383 - epoch_s, */ \ + /* 3379 - epoch_s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3387 - nullable_bitmap32, */ \ + /* 3383 - nullable_bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3391 - nullable_bitmap64, */ \ + /* 3387 - nullable_bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3399 - nullable_int24u, */ \ + /* 3395 - nullable_int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 3402 - nullable_int32u, */ \ + /* 3398 - nullable_int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3406 - nullable_int40u, */ \ + /* 3402 - nullable_int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3411 - nullable_int48u, */ \ + /* 3407 - nullable_int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3417 - nullable_int56u, */ \ + /* 3413 - nullable_int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3424 - nullable_int64u, */ \ + /* 3420 - nullable_int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3432 - nullable_int24s, */ \ + /* 3428 - nullable_int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 3435 - nullable_int32s, */ \ + /* 3431 - nullable_int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3439 - nullable_int40s, */ \ + /* 3435 - nullable_int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3444 - nullable_int48s, */ \ + /* 3440 - nullable_int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3450 - nullable_int56s, */ \ + /* 3446 - nullable_int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3457 - nullable_int64s, */ \ + /* 3453 - nullable_int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3465 - nullable_float_single, */ \ + /* 3461 - nullable_float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3469 - nullable_float_double, */ \ + /* 3465 - nullable_float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server), little-endian */ \ \ - /* 3477 - measurement type, */ \ + /* 3473 - measurement type, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3481 - total active power, */ \ + /* 3477 - total active power, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: On/Off (server), little-endian */ \ \ - /* 3485 - FeatureMap, */ \ + /* 3481 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (141) +#define GENERATED_DEFAULTS_COUNT (140) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -1377,7 +1367,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 568 +#define GENERATED_ATTRIBUTE_COUNT 556 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1427,6 +1417,10 @@ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x0001, ZAP_TYPE(OCTET_STRING), 17, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* default ota provider */ \ { 0x0002, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_EMPTY_DEFAULT() }, /* update possible */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: Power Source Configuration (server) */ \ + { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Sources */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ @@ -1677,32 +1671,17 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ - { 0x0002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ - { 0x0003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* NodeLabel */ \ - { 0x0007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* HardwareVersion */ \ - { 0x0008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(1148) }, /* SoftwareVersion */ \ - { 0x000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ - { 0x000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ManufacturingDate */ \ - { 0x000C, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* PartNumber */ \ - { 0x000D, ZAP_TYPE(LONG_CHAR_STRING), 258, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductURL */ \ - { 0x000E, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductLabel */ \ - { 0x000F, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SerialNumber */ \ - { 0x0011, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* Reachable */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Switch (server) */ \ { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* number of positions */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* current position */ \ { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* multi press max */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1152) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1148) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1156) }, /* label list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1152) }, /* label list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Boolean State (server) */ \ @@ -1714,7 +1693,7 @@ { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* SupportedModes */ \ { 0x0002, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OnMode */ \ { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* StartUpMode */ \ - { 0x0004, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(1410) }, /* Description */ \ + { 0x0004, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(1406) }, /* Description */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Door Lock (server) */ \ @@ -1722,7 +1701,7 @@ { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LockType */ \ { 0x0002, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ActuatorEnabled */ \ { 0x0010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0) }, /* NumberOfLogRecordsSupported */ \ - { 0x0023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1417) }, /* AutoRelockTime */ \ + { 0x0023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1413) }, /* AutoRelockTime */ \ { 0x0025, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(5) }, /* OperatingMode */ \ { 0x0026, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFF6) }, /* SupportedOperatingModes */ \ @@ -1748,7 +1727,7 @@ { 0x0017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(6) }, /* Mode */ \ { 0x001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* SafetyStatus */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1421) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1417) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Barrier Control (server) */ \ @@ -1778,16 +1757,16 @@ { 0x0013, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Capacity */ \ { 0x0014, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Speed */ \ { 0x0015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(1425) }, /* LifetimeRunningHours */ \ - { 0x0016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(1428) }, /* Power */ \ + ZAP_LONG_DEFAULTS_INDEX(1421) }, /* LifetimeRunningHours */ \ + { 0x0016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(1424) }, /* Power */ \ { 0x0017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(1431) }, /* LifetimeEnergyConsumed */ \ + ZAP_LONG_DEFAULTS_INDEX(1427) }, /* LifetimeEnergyConsumed */ \ { 0x0020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(7) }, /* OperationMode */ \ { 0x0021, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(8) }, /* ControlMode */ \ { 0x0022, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* AlarmMask */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1435) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1431) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ @@ -1817,7 +1796,7 @@ { 0x0020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ { 0x0021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ { 0x0022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1439) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1435) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ @@ -1938,7 +1917,7 @@ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* zone state */ \ { 0x0001, ZAP_TYPE(ENUM16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* zone type */ \ { 0x0002, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* zone status */ \ - { 0x0010, ZAP_TYPE(NODE_ID), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1443) }, /* IAS CIE address */ \ + { 0x0010, ZAP_TYPE(NODE_ID), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1439) }, /* IAS CIE address */ \ { 0x0011, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xff) }, /* Zone ID */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ @@ -1947,28 +1926,28 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: TV Channel (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1451) }, /* tv channel list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1447) }, /* tv channel list */ \ { 0x0001, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* tv channel lineup */ \ { 0x0002, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* current tv channel */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Target Navigator (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1705) }, /* target navigator list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1701) }, /* target navigator list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Media Playback (server) */ \ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* playback state */ \ - { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1959) }, /* start time */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1967) }, /* duration */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1975) }, /* position updated at */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1983) }, /* position */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1991) }, /* playback speed */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1999) }, /* seek range end */ \ - { 0x0007, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2007) }, /* seek range start */ \ + { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1955) }, /* start time */ \ + { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1963) }, /* duration */ \ + { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1971) }, /* position updated at */ \ + { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1979) }, /* position */ \ + { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1987) }, /* playback speed */ \ + { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1995) }, /* seek range end */ \ + { 0x0007, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2003) }, /* seek range start */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Media Input (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2015) }, /* media input list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2011) }, /* media input list */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current media input */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ @@ -1979,17 +1958,17 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Content Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2269) }, /* accepts header list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2523) }, /* supported streaming types */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2265) }, /* accepts header list */ \ + { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2519) }, /* supported streaming types */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Audio Output (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2777) }, /* audio output list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2773) }, /* audio output list */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current audio output */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(3031) }, /* application launcher list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(3027) }, /* application launcher list */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* catalog vendor id */ \ { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* application id */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ @@ -2011,28 +1990,28 @@ { 0x0000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(false) }, /* boolean */ \ { 0x0001, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap8 */ \ { 0x0002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap16 */ \ - { 0x0003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3285) }, /* bitmap32 */ \ - { 0x0004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3289) }, /* bitmap64 */ \ + { 0x0003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3281) }, /* bitmap32 */ \ + { 0x0004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3285) }, /* bitmap64 */ \ { 0x0005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8u */ \ { 0x0006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16u */ \ - { 0x0007, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3297) }, /* int24u */ \ - { 0x0008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3300) }, /* int32u */ \ - { 0x0009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3304) }, /* int40u */ \ - { 0x000A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3309) }, /* int48u */ \ - { 0x000B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3315) }, /* int56u */ \ - { 0x000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3322) }, /* int64u */ \ + { 0x0007, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3293) }, /* int24u */ \ + { 0x0008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3296) }, /* int32u */ \ + { 0x0009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3300) }, /* int40u */ \ + { 0x000A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3305) }, /* int48u */ \ + { 0x000B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3311) }, /* int56u */ \ + { 0x000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3318) }, /* int64u */ \ { 0x000D, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8s */ \ { 0x000E, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16s */ \ - { 0x000F, ZAP_TYPE(INT24S), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3330) }, /* int24s */ \ - { 0x0010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3333) }, /* int32s */ \ - { 0x0011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3337) }, /* int40s */ \ - { 0x0012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3342) }, /* int48s */ \ - { 0x0013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3348) }, /* int56s */ \ - { 0x0014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3355) }, /* int64s */ \ + { 0x000F, ZAP_TYPE(INT24S), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3326) }, /* int24s */ \ + { 0x0010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3329) }, /* int32s */ \ + { 0x0011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3333) }, /* int40s */ \ + { 0x0012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3338) }, /* int48s */ \ + { 0x0013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3344) }, /* int56s */ \ + { 0x0014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3351) }, /* int64s */ \ { 0x0015, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum8 */ \ { 0x0016, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum16 */ \ - { 0x0017, ZAP_TYPE(SINGLE), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3363) }, /* float_single */ \ - { 0x0018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3367) }, /* float_double */ \ + { 0x0017, ZAP_TYPE(SINGLE), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3359) }, /* float_single */ \ + { 0x0018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3363) }, /* float_double */ \ { 0x0019, ZAP_TYPE(OCTET_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* octet_string */ \ { 0x001A, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* list_int8u */ \ @@ -2045,8 +2024,8 @@ { 0x001E, ZAP_TYPE(CHAR_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* char_string */ \ { 0x001F, ZAP_TYPE(LONG_CHAR_STRING), 1002, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* long_char_string */ \ - { 0x0020, ZAP_TYPE(EPOCH_US), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3375) }, /* epoch_us */ \ - { 0x0021, ZAP_TYPE(EPOCH_S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3383) }, /* epoch_s */ \ + { 0x0020, ZAP_TYPE(EPOCH_US), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3371) }, /* epoch_us */ \ + { 0x0021, ZAP_TYPE(EPOCH_S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3379) }, /* epoch_s */ \ { 0x0022, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* vendor_id */ \ { 0x0023, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* list_nullables_and_optionals_struct */ \ @@ -2070,49 +2049,49 @@ { 0x8002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_bitmap16 */ \ { 0x8003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3387) }, /* nullable_bitmap32 */ \ + ZAP_LONG_DEFAULTS_INDEX(3383) }, /* nullable_bitmap32 */ \ { 0x8004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3391) }, /* nullable_bitmap64 */ \ + ZAP_LONG_DEFAULTS_INDEX(3387) }, /* nullable_bitmap64 */ \ { 0x8005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int8u */ \ { 0x8006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int16u */ \ { 0x8007, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3399) }, /* nullable_int24u */ \ + ZAP_LONG_DEFAULTS_INDEX(3395) }, /* nullable_int24u */ \ { 0x8008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3402) }, /* nullable_int32u */ \ + ZAP_LONG_DEFAULTS_INDEX(3398) }, /* nullable_int32u */ \ { 0x8009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3406) }, /* nullable_int40u */ \ + ZAP_LONG_DEFAULTS_INDEX(3402) }, /* nullable_int40u */ \ { 0x800A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3411) }, /* nullable_int48u */ \ + ZAP_LONG_DEFAULTS_INDEX(3407) }, /* nullable_int48u */ \ { 0x800B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3417) }, /* nullable_int56u */ \ + ZAP_LONG_DEFAULTS_INDEX(3413) }, /* nullable_int56u */ \ { 0x800C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3424) }, /* nullable_int64u */ \ + ZAP_LONG_DEFAULTS_INDEX(3420) }, /* nullable_int64u */ \ { 0x800D, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int8s */ \ { 0x800E, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int16s */ \ { 0x800F, ZAP_TYPE(INT24S), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3432) }, /* nullable_int24s */ \ + ZAP_LONG_DEFAULTS_INDEX(3428) }, /* nullable_int24s */ \ { 0x8010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3435) }, /* nullable_int32s */ \ + ZAP_LONG_DEFAULTS_INDEX(3431) }, /* nullable_int32s */ \ { 0x8011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3439) }, /* nullable_int40s */ \ + ZAP_LONG_DEFAULTS_INDEX(3435) }, /* nullable_int40s */ \ { 0x8012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3444) }, /* nullable_int48s */ \ + ZAP_LONG_DEFAULTS_INDEX(3440) }, /* nullable_int48s */ \ { 0x8013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3450) }, /* nullable_int56s */ \ + ZAP_LONG_DEFAULTS_INDEX(3446) }, /* nullable_int56s */ \ { 0x8014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3457) }, /* nullable_int64s */ \ + ZAP_LONG_DEFAULTS_INDEX(3453) }, /* nullable_int64s */ \ { 0x8015, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_enum8 */ \ { 0x8016, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_enum16 */ \ { 0x8017, ZAP_TYPE(SINGLE), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3465) }, /* nullable_float_single */ \ + ZAP_LONG_DEFAULTS_INDEX(3461) }, /* nullable_float_single */ \ { 0x8018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3469) }, /* nullable_float_double */ \ + ZAP_LONG_DEFAULTS_INDEX(3465) }, /* nullable_float_double */ \ { 0x8019, ZAP_TYPE(OCTET_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* nullable_octet_string */ \ { 0x801E, ZAP_TYPE(CHAR_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ @@ -2137,8 +2116,8 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ - { 0x0000, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(3477) }, /* measurement type */ \ - { 0x0304, ZAP_TYPE(INT32S), 4, 0, ZAP_LONG_DEFAULTS_INDEX(3481) }, /* total active power */ \ + { 0x0000, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(3473) }, /* measurement type */ \ + { 0x0304, ZAP_TYPE(INT32S), 4, 0, ZAP_LONG_DEFAULTS_INDEX(3477) }, /* total active power */ \ { 0x0505, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms voltage */ \ { 0x0506, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* rms voltage min */ \ { 0x0507, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* rms voltage max */ \ @@ -2159,7 +2138,7 @@ { 0x4001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OnTime */ \ { 0x4002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OffWaitTime */ \ { 0x4003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(3485) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(3481) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ @@ -2223,7 +2202,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 65 +#define GENERATED_CLUSTER_COUNT 66 #define GENERATED_CLUSTERS \ { \ { 0x0003, \ @@ -2248,225 +2227,228 @@ 0x002A, ZAP_ATTRIBUTE_INDEX(29), 3, 20, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(32), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002E, ZAP_ATTRIBUTE_INDEX(32), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Power Source Configuration (server) */ \ + { \ + 0x0030, ZAP_ATTRIBUTE_INDEX(34), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(38), 2, 6, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(40), 2, 6, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(40), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(42), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(40), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(42), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(49), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(51), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(55), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(57), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(120), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(122), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(135), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(137), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(146), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(148), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(147), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(149), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(153), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0405, ZAP_ATTRIBUTE_INDEX(155), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Relative Humidity Measurement (server) */ \ { \ - 0xF000, ZAP_ATTRIBUTE_INDEX(157), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0xF000, ZAP_ATTRIBUTE_INDEX(159), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Binding (server) */ \ { \ - 0xF004, ZAP_ATTRIBUTE_INDEX(158), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0xF004, ZAP_ATTRIBUTE_INDEX(160), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Group Key Management (server) */ \ { 0x0003, \ - ZAP_ATTRIBUTE_INDEX(161), \ + ZAP_ATTRIBUTE_INDEX(163), \ 3, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayIdentifyServer }, /* Endpoint: 1, Cluster: Identify (server) */ \ { 0x0004, \ - ZAP_ATTRIBUTE_INDEX(164), \ + ZAP_ATTRIBUTE_INDEX(166), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 1, Cluster: Groups (server) */ \ { 0x0005, \ - ZAP_ATTRIBUTE_INDEX(166), \ + ZAP_ATTRIBUTE_INDEX(168), \ 6, \ 8, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayScenesServer }, /* Endpoint: 1, Cluster: Scenes (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(172), \ + ZAP_ATTRIBUTE_INDEX(174), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { \ - 0x0007, ZAP_ATTRIBUTE_INDEX(179), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0007, ZAP_ATTRIBUTE_INDEX(181), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ { 0x0008, \ - ZAP_ATTRIBUTE_INDEX(182), \ + ZAP_ATTRIBUTE_INDEX(184), \ 15, \ 23, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x000F, ZAP_ATTRIBUTE_INDEX(197), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x000F, ZAP_ATTRIBUTE_INDEX(199), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(201), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(203), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x0025, ZAP_ATTRIBUTE_INDEX(206), 4, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0025, ZAP_ATTRIBUTE_INDEX(208), 4, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Actions (server) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(210), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002F, ZAP_ATTRIBUTE_INDEX(212), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Power Source (server) */ \ { \ - 0x0039, ZAP_ATTRIBUTE_INDEX(221), 15, 646, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0039, ZAP_ATTRIBUTE_INDEX(223), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ { \ - 0x003B, ZAP_ATTRIBUTE_INDEX(236), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003B, ZAP_ATTRIBUTE_INDEX(224), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(241), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(229), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ { \ - 0x0045, ZAP_ATTRIBUTE_INDEX(243), 2, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0045, ZAP_ATTRIBUTE_INDEX(231), 2, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Boolean State (server) */ \ { \ - 0x0050, ZAP_ATTRIBUTE_INDEX(245), 6, 38, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0050, ZAP_ATTRIBUTE_INDEX(233), 6, 38, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Mode Select (server) */ \ { 0x0101, \ - ZAP_ATTRIBUTE_INDEX(251), \ + ZAP_ATTRIBUTE_INDEX(239), \ 8, \ 14, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayDoorLockServer }, /* Endpoint: 1, Cluster: Door Lock (server) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(259), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0102, ZAP_ATTRIBUTE_INDEX(247), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (server) */ \ { \ - 0x0103, ZAP_ATTRIBUTE_INDEX(279), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0103, ZAP_ATTRIBUTE_INDEX(267), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Barrier Control (server) */ \ { \ 0x0200, \ - ZAP_ATTRIBUTE_INDEX(284), \ + ZAP_ATTRIBUTE_INDEX(272), \ 26, \ 54, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayPumpConfigurationAndControlServer \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ { \ - 0x0201, ZAP_ATTRIBUTE_INDEX(310), 19, 34, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0201, ZAP_ATTRIBUTE_INDEX(298), 19, 34, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Thermostat (server) */ \ { \ 0x0204, \ - ZAP_ATTRIBUTE_INDEX(329), \ + ZAP_ATTRIBUTE_INDEX(317), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayThermostatUserInterfaceConfigurationServer \ }, /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ { 0x0300, \ - ZAP_ATTRIBUTE_INDEX(333), \ + ZAP_ATTRIBUTE_INDEX(321), \ 53, \ 341, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { \ - 0x0400, ZAP_ATTRIBUTE_INDEX(386), 6, 11, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0400, ZAP_ATTRIBUTE_INDEX(374), 6, 11, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Illuminance Measurement (server) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(392), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(380), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(397), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0403, ZAP_ATTRIBUTE_INDEX(385), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(401), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0404, ZAP_ATTRIBUTE_INDEX(389), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(406), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0405, ZAP_ATTRIBUTE_INDEX(394), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(411), \ + ZAP_ATTRIBUTE_INDEX(399), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOccupancySensingServer }, /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ { 0x0500, \ - ZAP_ATTRIBUTE_INDEX(415), \ + ZAP_ATTRIBUTE_INDEX(403), \ 6, \ 16, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(MESSAGE_SENT_FUNCTION), \ chipFuncArrayIasZoneServer }, /* Endpoint: 1, Cluster: IAS Zone (server) */ \ { \ - 0x0503, ZAP_ATTRIBUTE_INDEX(421), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0503, ZAP_ATTRIBUTE_INDEX(409), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(423), 4, 322, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(411), 4, 322, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: TV Channel (server) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(427), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(415), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(429), 9, 59, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(417), 9, 59, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (server) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(438), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(426), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Input (server) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(441), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0508, ZAP_ATTRIBUTE_INDEX(429), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Low Power (server) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(442), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(430), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(443), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(431), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(446), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(434), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (server) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(449), 4, 258, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(437), 4, 258, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(453), 8, 108, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(441), 8, 108, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(461), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(449), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Account Login (server) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(462), 77, 2285, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050F, ZAP_ATTRIBUTE_INDEX(450), 77, 2285, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (server) */ \ { \ - 0x0B04, ZAP_ATTRIBUTE_INDEX(539), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0B04, ZAP_ATTRIBUTE_INDEX(527), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ { \ - 0xF000, ZAP_ATTRIBUTE_INDEX(551), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0xF000, ZAP_ATTRIBUTE_INDEX(539), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binding (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(552), \ + ZAP_ATTRIBUTE_INDEX(540), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(559), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(547), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(564), \ + ZAP_ATTRIBUTE_INDEX(552), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2478,17 +2460,17 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 18, 1925 }, { ZAP_CLUSTER_INDEX(18), 44, 6044 }, { ZAP_CLUSTER_INDEX(62), 3, 18 }, \ + { ZAP_CLUSTER_INDEX(0), 19, 1927 }, { ZAP_CLUSTER_INDEX(19), 44, 5400 }, { ZAP_CLUSTER_INDEX(63), 3, 18 }, \ } // Largest attribute size is needed for various buffers #define ATTRIBUTE_LARGEST (1003) // Total size of singleton attributes -#define ATTRIBUTE_SINGLETONS_SIZE (1333) +#define ATTRIBUTE_SINGLETONS_SIZE (689) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (7987) +#define ATTRIBUTE_MAX_SIZE (7345) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) diff --git a/zzz_generated/all-clusters-app/zap-generated/gen_config.h b/zzz_generated/all-clusters-app/zap-generated/gen_config.h index 84dbd77bcf5134..b2da54d083c4c7 100644 --- a/zzz_generated/all-clusters-app/zap-generated/gen_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/gen_config.h @@ -71,6 +71,7 @@ #define EMBER_AF_ON_OFF_SWITCH_CONFIG_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OPERATIONAL_CREDENTIALS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_POWER_SOURCE_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_POWER_SOURCE_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_PRESSURE_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_PUMP_CONFIG_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (2) @@ -310,6 +311,11 @@ #define EMBER_AF_PLUGIN_POWER_SOURCE_SERVER #define EMBER_AF_PLUGIN_POWER_SOURCE +// Use this macro to check if the server side of the Power Source Configuration cluster is included +#define ZCL_USING_POWER_SOURCE_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_POWER_SOURCE_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_POWER_SOURCE_CONFIGURATION + // Use this macro to check if the server side of the Pressure Measurement cluster is included #define ZCL_USING_PRESSURE_MEASUREMENT_CLUSTER_SERVER #define EMBER_AF_PLUGIN_PRESSURE_MEASUREMENT_SERVER diff --git a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h index e1ba4b54913edb..1f3a6ba93ab379 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h @@ -322,6 +322,7 @@ // Client attributes // Server attributes +#define ZCL_SOURCES_ATTRIBUTE_ID (0x0000) // Attribute ids for cluster: Power Source 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 0e0d213a00f24b..a8e0ffb86d941f 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 @@ -4706,6 +4706,12 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value) } // namespace Attributes } // namespace OtaSoftwareUpdateRequestor +namespace PowerSourceConfiguration { +namespace Attributes { + +} // namespace Attributes +} // namespace PowerSourceConfiguration + namespace PowerSource { namespace Attributes { 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 8bc3b866bf7de8..e571c62eadbe97 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 @@ -913,6 +913,12 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value); } // namespace Attributes } // namespace OtaSoftwareUpdateRequestor +namespace PowerSourceConfiguration { +namespace Attributes { + +} // namespace Attributes +} // namespace PowerSourceConfiguration + namespace PowerSource { namespace Attributes { 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 777fbb9d196d0e..90408879629d8c 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 @@ -7815,6 +7815,18 @@ struct TypeInfo namespace PowerSourceConfiguration { namespace Attributes { +namespace Sources { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::PowerSourceConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Sources::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Sources namespace FeatureMap { struct TypeInfo { 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 7460f124e21a43..63286642c6bc6c 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 @@ -986,6 +986,10 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; namespace PowerSourceConfiguration { namespace Attributes { +namespace Sources { +static constexpr AttributeId Id = 0x00000000; +} // namespace Sources + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 0776c0e40c18a9..f9b7b99da73e7e 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -2543,6 +2543,15 @@ static void OnPowerSourceActiveBatteryFaultsListAttributeResponse(void * context command->SetCommandExitStatus(err); } +static void OnPowerSourceConfigurationSourcesListAttributeResponse(void * context, + const chip::app::DataModel::DecodableList & list) +{ + CHIP_ERROR err = LogValue("OnPowerSourceConfigurationSourcesListAttributeResponse", 0, list); + + ModelCommand * command = static_cast(context); + command->SetCommandExitStatus(err); +} + static void OnSoftwareDiagnosticsThreadMetricsListAttributeResponse( void * context, const chip::app::DataModel::DecodableList & @@ -3924,6 +3933,7 @@ static void OnTestClusterTestSpecificResponseSuccess( | OnOffSwitchConfiguration | 0x0007 | | OperationalCredentials | 0x003E | | PowerSource | 0x002F | +| PowerSourceConfiguration | 0x002E | | PressureMeasurement | 0x0403 | | PumpConfigurationAndControl | 0x0200 | | RelativeHumidityMeasurement | 0x0405 | @@ -9237,1263 +9247,9 @@ class ReportBridgedActionsClusterRevision : public ModelCommand | Commands: | | |------------------------------------------------------------------------------| | Attributes: | | -| * VendorName | 0x0001 | -| * VendorID | 0x0002 | -| * ProductName | 0x0003 | -| * NodeLabel | 0x0005 | -| * HardwareVersion | 0x0007 | -| * HardwareVersionString | 0x0008 | -| * SoftwareVersion | 0x0009 | -| * SoftwareVersionString | 0x000A | -| * ManufacturingDate | 0x000B | -| * PartNumber | 0x000C | -| * ProductURL | 0x000D | -| * ProductLabel | 0x000E | -| * SerialNumber | 0x000F | -| * Reachable | 0x0011 | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ -/* - * Attribute VendorName - */ -class ReadBridgedDeviceBasicVendorName : public ModelCommand -{ -public: - ReadBridgedDeviceBasicVendorName() : ModelCommand("read") - { - AddArgument("attr-name", "vendor-name"); - ModelCommand::AddArguments(); - } - - ~ReadBridgedDeviceBasicVendorName() - { - delete onSuccessCallback; - delete onFailureCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x00) on endpoint %" PRIu8, endpointId); - - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, endpointId); - return cluster.ReadAttributeVendorName(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnCharStringAttributeResponse, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); -}; - -class ReportBridgedDeviceBasicVendorName : public ModelCommand -{ -public: - ReportBridgedDeviceBasicVendorName() : ModelCommand("report") - { - AddArgument("attr-name", "vendor-name"); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("wait", 0, 1, &mWait); - ModelCommand::AddArguments(); - } - - ~ReportBridgedDeviceBasicVendorName() - { - delete onSuccessCallback; - delete onSuccessCallbackWithoutExit; - delete onFailureCallback; - delete onReportCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x06) on endpoint %" PRIu8, endpointId); - - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, endpointId); - - ReturnErrorOnFailure(cluster.ReportAttributeVendorName(onReportCallback->Cancel())); - - chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); - return cluster.SubscribeAttributeVendorName(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnDefaultSuccessResponse, this); - chip::Callback::Callback * onSuccessCallbackWithoutExit = - new chip::Callback::Callback(OnDefaultSuccessResponseWithoutExit, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); - chip::Callback::Callback * onReportCallback = - new chip::Callback::Callback(OnCharStringAttributeReport, this); - uint16_t mMinInterval; - uint16_t mMaxInterval; - bool mWait; -}; - -/* - * Attribute VendorID - */ -class ReadBridgedDeviceBasicVendorID : public ModelCommand -{ -public: - ReadBridgedDeviceBasicVendorID() : ModelCommand("read") - { - AddArgument("attr-name", "vendor-id"); - ModelCommand::AddArguments(); - } - - ~ReadBridgedDeviceBasicVendorID() - { - delete onSuccessCallback; - delete onFailureCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x00) on endpoint %" PRIu8, endpointId); - - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, endpointId); - return cluster.ReadAttributeVendorID(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnInt16uAttributeResponse, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); -}; - -class ReportBridgedDeviceBasicVendorID : public ModelCommand -{ -public: - ReportBridgedDeviceBasicVendorID() : ModelCommand("report") - { - AddArgument("attr-name", "vendor-id"); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("wait", 0, 1, &mWait); - ModelCommand::AddArguments(); - } - - ~ReportBridgedDeviceBasicVendorID() - { - delete onSuccessCallback; - delete onSuccessCallbackWithoutExit; - delete onFailureCallback; - delete onReportCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x06) on endpoint %" PRIu8, endpointId); - - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, endpointId); - - ReturnErrorOnFailure(cluster.ReportAttributeVendorID(onReportCallback->Cancel())); - - chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); - return cluster.SubscribeAttributeVendorID(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnDefaultSuccessResponse, this); - chip::Callback::Callback * onSuccessCallbackWithoutExit = - new chip::Callback::Callback(OnDefaultSuccessResponseWithoutExit, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); - chip::Callback::Callback * onReportCallback = - new chip::Callback::Callback(OnInt16uAttributeReport, this); - uint16_t mMinInterval; - uint16_t mMaxInterval; - bool mWait; -}; - -/* - * Attribute ProductName - */ -class ReadBridgedDeviceBasicProductName : public ModelCommand -{ -public: - ReadBridgedDeviceBasicProductName() : ModelCommand("read") - { - AddArgument("attr-name", "product-name"); - ModelCommand::AddArguments(); - } - - ~ReadBridgedDeviceBasicProductName() - { - delete onSuccessCallback; - delete onFailureCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x00) on endpoint %" PRIu8, endpointId); - - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, endpointId); - return cluster.ReadAttributeProductName(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnCharStringAttributeResponse, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); -}; - -class ReportBridgedDeviceBasicProductName : public ModelCommand -{ -public: - ReportBridgedDeviceBasicProductName() : ModelCommand("report") - { - AddArgument("attr-name", "product-name"); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("wait", 0, 1, &mWait); - ModelCommand::AddArguments(); - } - - ~ReportBridgedDeviceBasicProductName() - { - delete onSuccessCallback; - delete onSuccessCallbackWithoutExit; - delete onFailureCallback; - delete onReportCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x06) on endpoint %" PRIu8, endpointId); - - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, endpointId); - - ReturnErrorOnFailure(cluster.ReportAttributeProductName(onReportCallback->Cancel())); - - chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); - return cluster.SubscribeAttributeProductName(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnDefaultSuccessResponse, this); - chip::Callback::Callback * onSuccessCallbackWithoutExit = - new chip::Callback::Callback(OnDefaultSuccessResponseWithoutExit, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); - chip::Callback::Callback * onReportCallback = - new chip::Callback::Callback(OnCharStringAttributeReport, this); - uint16_t mMinInterval; - uint16_t mMaxInterval; - bool mWait; -}; - -/* - * Attribute NodeLabel - */ -class ReadBridgedDeviceBasicNodeLabel : public ModelCommand -{ -public: - ReadBridgedDeviceBasicNodeLabel() : ModelCommand("read") - { - AddArgument("attr-name", "node-label"); - ModelCommand::AddArguments(); - } - - ~ReadBridgedDeviceBasicNodeLabel() - { - delete onSuccessCallback; - delete onFailureCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x00) on endpoint %" PRIu8, endpointId); - - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, endpointId); - return cluster.ReadAttributeNodeLabel(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnCharStringAttributeResponse, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); -}; - -class WriteBridgedDeviceBasicNodeLabel : public ModelCommand -{ -public: - WriteBridgedDeviceBasicNodeLabel() : ModelCommand("write") - { - AddArgument("attr-name", "node-label"); - AddArgument("attr-value", &mValue); - ModelCommand::AddArguments(); - } - - ~WriteBridgedDeviceBasicNodeLabel() - { - delete onSuccessCallback; - delete onFailureCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x01) on endpoint %" PRIu8, endpointId); - - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, endpointId); - return cluster.WriteAttributeNodeLabel(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnDefaultSuccessResponse, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); - chip::CharSpan mValue; -}; - -class ReportBridgedDeviceBasicNodeLabel : public ModelCommand -{ -public: - ReportBridgedDeviceBasicNodeLabel() : ModelCommand("report") - { - AddArgument("attr-name", "node-label"); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("wait", 0, 1, &mWait); - ModelCommand::AddArguments(); - } - - ~ReportBridgedDeviceBasicNodeLabel() - { - delete onSuccessCallback; - delete onSuccessCallbackWithoutExit; - delete onFailureCallback; - delete onReportCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x06) on endpoint %" PRIu8, endpointId); - - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, endpointId); - - ReturnErrorOnFailure(cluster.ReportAttributeNodeLabel(onReportCallback->Cancel())); - - chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); - return cluster.SubscribeAttributeNodeLabel(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnDefaultSuccessResponse, this); - chip::Callback::Callback * onSuccessCallbackWithoutExit = - new chip::Callback::Callback(OnDefaultSuccessResponseWithoutExit, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); - chip::Callback::Callback * onReportCallback = - new chip::Callback::Callback(OnCharStringAttributeReport, this); - uint16_t mMinInterval; - uint16_t mMaxInterval; - bool mWait; -}; - -/* - * Attribute HardwareVersion - */ -class ReadBridgedDeviceBasicHardwareVersion : public ModelCommand -{ -public: - ReadBridgedDeviceBasicHardwareVersion() : ModelCommand("read") - { - AddArgument("attr-name", "hardware-version"); - ModelCommand::AddArguments(); - } - - ~ReadBridgedDeviceBasicHardwareVersion() - { - delete onSuccessCallback; - delete onFailureCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x00) on endpoint %" PRIu8, endpointId); - - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, endpointId); - return cluster.ReadAttributeHardwareVersion(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnInt16uAttributeResponse, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); -}; - -class ReportBridgedDeviceBasicHardwareVersion : public ModelCommand -{ -public: - ReportBridgedDeviceBasicHardwareVersion() : ModelCommand("report") - { - AddArgument("attr-name", "hardware-version"); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("wait", 0, 1, &mWait); - ModelCommand::AddArguments(); - } - - ~ReportBridgedDeviceBasicHardwareVersion() - { - delete onSuccessCallback; - delete onSuccessCallbackWithoutExit; - delete onFailureCallback; - delete onReportCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x06) on endpoint %" PRIu8, endpointId); - - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, endpointId); - - ReturnErrorOnFailure(cluster.ReportAttributeHardwareVersion(onReportCallback->Cancel())); - - chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); - return cluster.SubscribeAttributeHardwareVersion(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnDefaultSuccessResponse, this); - chip::Callback::Callback * onSuccessCallbackWithoutExit = - new chip::Callback::Callback(OnDefaultSuccessResponseWithoutExit, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); - chip::Callback::Callback * onReportCallback = - new chip::Callback::Callback(OnInt16uAttributeReport, this); - uint16_t mMinInterval; - uint16_t mMaxInterval; - bool mWait; -}; - -/* - * Attribute HardwareVersionString - */ -class ReadBridgedDeviceBasicHardwareVersionString : public ModelCommand -{ -public: - ReadBridgedDeviceBasicHardwareVersionString() : ModelCommand("read") - { - AddArgument("attr-name", "hardware-version-string"); - ModelCommand::AddArguments(); - } - - ~ReadBridgedDeviceBasicHardwareVersionString() - { - delete onSuccessCallback; - delete onFailureCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x00) on endpoint %" PRIu8, endpointId); - - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, endpointId); - return cluster.ReadAttributeHardwareVersionString(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnCharStringAttributeResponse, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); -}; - -class ReportBridgedDeviceBasicHardwareVersionString : public ModelCommand -{ -public: - ReportBridgedDeviceBasicHardwareVersionString() : ModelCommand("report") - { - AddArgument("attr-name", "hardware-version-string"); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("wait", 0, 1, &mWait); - ModelCommand::AddArguments(); - } - - ~ReportBridgedDeviceBasicHardwareVersionString() - { - delete onSuccessCallback; - delete onSuccessCallbackWithoutExit; - delete onFailureCallback; - delete onReportCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x06) on endpoint %" PRIu8, endpointId); - - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, endpointId); - - ReturnErrorOnFailure(cluster.ReportAttributeHardwareVersionString(onReportCallback->Cancel())); - - chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); - return cluster.SubscribeAttributeHardwareVersionString(successCallback, onFailureCallback->Cancel(), mMinInterval, - mMaxInterval); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnDefaultSuccessResponse, this); - chip::Callback::Callback * onSuccessCallbackWithoutExit = - new chip::Callback::Callback(OnDefaultSuccessResponseWithoutExit, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); - chip::Callback::Callback * onReportCallback = - new chip::Callback::Callback(OnCharStringAttributeReport, this); - uint16_t mMinInterval; - uint16_t mMaxInterval; - bool mWait; -}; - -/* - * Attribute SoftwareVersion - */ -class ReadBridgedDeviceBasicSoftwareVersion : public ModelCommand -{ -public: - ReadBridgedDeviceBasicSoftwareVersion() : ModelCommand("read") - { - AddArgument("attr-name", "software-version"); - ModelCommand::AddArguments(); - } - - ~ReadBridgedDeviceBasicSoftwareVersion() - { - delete onSuccessCallback; - delete onFailureCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x00) on endpoint %" PRIu8, endpointId); - - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, endpointId); - return cluster.ReadAttributeSoftwareVersion(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnInt32uAttributeResponse, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); -}; - -class ReportBridgedDeviceBasicSoftwareVersion : public ModelCommand -{ -public: - ReportBridgedDeviceBasicSoftwareVersion() : ModelCommand("report") - { - AddArgument("attr-name", "software-version"); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("wait", 0, 1, &mWait); - ModelCommand::AddArguments(); - } - - ~ReportBridgedDeviceBasicSoftwareVersion() - { - delete onSuccessCallback; - delete onSuccessCallbackWithoutExit; - delete onFailureCallback; - delete onReportCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x06) on endpoint %" PRIu8, endpointId); - - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, endpointId); - - ReturnErrorOnFailure(cluster.ReportAttributeSoftwareVersion(onReportCallback->Cancel())); - - chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); - return cluster.SubscribeAttributeSoftwareVersion(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnDefaultSuccessResponse, this); - chip::Callback::Callback * onSuccessCallbackWithoutExit = - new chip::Callback::Callback(OnDefaultSuccessResponseWithoutExit, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); - chip::Callback::Callback * onReportCallback = - new chip::Callback::Callback(OnInt32uAttributeReport, this); - uint16_t mMinInterval; - uint16_t mMaxInterval; - bool mWait; -}; - -/* - * Attribute SoftwareVersionString - */ -class ReadBridgedDeviceBasicSoftwareVersionString : public ModelCommand -{ -public: - ReadBridgedDeviceBasicSoftwareVersionString() : ModelCommand("read") - { - AddArgument("attr-name", "software-version-string"); - ModelCommand::AddArguments(); - } - - ~ReadBridgedDeviceBasicSoftwareVersionString() - { - delete onSuccessCallback; - delete onFailureCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x00) on endpoint %" PRIu8, endpointId); - - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, endpointId); - return cluster.ReadAttributeSoftwareVersionString(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnCharStringAttributeResponse, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); -}; - -class ReportBridgedDeviceBasicSoftwareVersionString : public ModelCommand -{ -public: - ReportBridgedDeviceBasicSoftwareVersionString() : ModelCommand("report") - { - AddArgument("attr-name", "software-version-string"); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("wait", 0, 1, &mWait); - ModelCommand::AddArguments(); - } - - ~ReportBridgedDeviceBasicSoftwareVersionString() - { - delete onSuccessCallback; - delete onSuccessCallbackWithoutExit; - delete onFailureCallback; - delete onReportCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x06) on endpoint %" PRIu8, endpointId); - - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, endpointId); - - ReturnErrorOnFailure(cluster.ReportAttributeSoftwareVersionString(onReportCallback->Cancel())); - - chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); - return cluster.SubscribeAttributeSoftwareVersionString(successCallback, onFailureCallback->Cancel(), mMinInterval, - mMaxInterval); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnDefaultSuccessResponse, this); - chip::Callback::Callback * onSuccessCallbackWithoutExit = - new chip::Callback::Callback(OnDefaultSuccessResponseWithoutExit, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); - chip::Callback::Callback * onReportCallback = - new chip::Callback::Callback(OnCharStringAttributeReport, this); - uint16_t mMinInterval; - uint16_t mMaxInterval; - bool mWait; -}; - -/* - * Attribute ManufacturingDate - */ -class ReadBridgedDeviceBasicManufacturingDate : public ModelCommand -{ -public: - ReadBridgedDeviceBasicManufacturingDate() : ModelCommand("read") - { - AddArgument("attr-name", "manufacturing-date"); - ModelCommand::AddArguments(); - } - - ~ReadBridgedDeviceBasicManufacturingDate() - { - delete onSuccessCallback; - delete onFailureCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x00) on endpoint %" PRIu8, endpointId); - - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, endpointId); - return cluster.ReadAttributeManufacturingDate(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnCharStringAttributeResponse, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); -}; - -class ReportBridgedDeviceBasicManufacturingDate : public ModelCommand -{ -public: - ReportBridgedDeviceBasicManufacturingDate() : ModelCommand("report") - { - AddArgument("attr-name", "manufacturing-date"); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("wait", 0, 1, &mWait); - ModelCommand::AddArguments(); - } - - ~ReportBridgedDeviceBasicManufacturingDate() - { - delete onSuccessCallback; - delete onSuccessCallbackWithoutExit; - delete onFailureCallback; - delete onReportCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x06) on endpoint %" PRIu8, endpointId); - - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, endpointId); - - ReturnErrorOnFailure(cluster.ReportAttributeManufacturingDate(onReportCallback->Cancel())); - - chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); - return cluster.SubscribeAttributeManufacturingDate(successCallback, onFailureCallback->Cancel(), mMinInterval, - mMaxInterval); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnDefaultSuccessResponse, this); - chip::Callback::Callback * onSuccessCallbackWithoutExit = - new chip::Callback::Callback(OnDefaultSuccessResponseWithoutExit, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); - chip::Callback::Callback * onReportCallback = - new chip::Callback::Callback(OnCharStringAttributeReport, this); - uint16_t mMinInterval; - uint16_t mMaxInterval; - bool mWait; -}; - -/* - * Attribute PartNumber - */ -class ReadBridgedDeviceBasicPartNumber : public ModelCommand -{ -public: - ReadBridgedDeviceBasicPartNumber() : ModelCommand("read") - { - AddArgument("attr-name", "part-number"); - ModelCommand::AddArguments(); - } - - ~ReadBridgedDeviceBasicPartNumber() - { - delete onSuccessCallback; - delete onFailureCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x00) on endpoint %" PRIu8, endpointId); - - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, endpointId); - return cluster.ReadAttributePartNumber(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnCharStringAttributeResponse, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); -}; - -class ReportBridgedDeviceBasicPartNumber : public ModelCommand -{ -public: - ReportBridgedDeviceBasicPartNumber() : ModelCommand("report") - { - AddArgument("attr-name", "part-number"); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("wait", 0, 1, &mWait); - ModelCommand::AddArguments(); - } - - ~ReportBridgedDeviceBasicPartNumber() - { - delete onSuccessCallback; - delete onSuccessCallbackWithoutExit; - delete onFailureCallback; - delete onReportCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x06) on endpoint %" PRIu8, endpointId); - - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, endpointId); - - ReturnErrorOnFailure(cluster.ReportAttributePartNumber(onReportCallback->Cancel())); - - chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); - return cluster.SubscribeAttributePartNumber(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnDefaultSuccessResponse, this); - chip::Callback::Callback * onSuccessCallbackWithoutExit = - new chip::Callback::Callback(OnDefaultSuccessResponseWithoutExit, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); - chip::Callback::Callback * onReportCallback = - new chip::Callback::Callback(OnCharStringAttributeReport, this); - uint16_t mMinInterval; - uint16_t mMaxInterval; - bool mWait; -}; - -/* - * Attribute ProductURL - */ -class ReadBridgedDeviceBasicProductURL : public ModelCommand -{ -public: - ReadBridgedDeviceBasicProductURL() : ModelCommand("read") - { - AddArgument("attr-name", "product-url"); - ModelCommand::AddArguments(); - } - - ~ReadBridgedDeviceBasicProductURL() - { - delete onSuccessCallback; - delete onFailureCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x00) on endpoint %" PRIu8, endpointId); - - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, endpointId); - return cluster.ReadAttributeProductURL(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnCharStringAttributeResponse, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); -}; - -class ReportBridgedDeviceBasicProductURL : public ModelCommand -{ -public: - ReportBridgedDeviceBasicProductURL() : ModelCommand("report") - { - AddArgument("attr-name", "product-url"); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("wait", 0, 1, &mWait); - ModelCommand::AddArguments(); - } - - ~ReportBridgedDeviceBasicProductURL() - { - delete onSuccessCallback; - delete onSuccessCallbackWithoutExit; - delete onFailureCallback; - delete onReportCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x06) on endpoint %" PRIu8, endpointId); - - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, endpointId); - - ReturnErrorOnFailure(cluster.ReportAttributeProductURL(onReportCallback->Cancel())); - - chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); - return cluster.SubscribeAttributeProductURL(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnDefaultSuccessResponse, this); - chip::Callback::Callback * onSuccessCallbackWithoutExit = - new chip::Callback::Callback(OnDefaultSuccessResponseWithoutExit, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); - chip::Callback::Callback * onReportCallback = - new chip::Callback::Callback(OnCharStringAttributeReport, this); - uint16_t mMinInterval; - uint16_t mMaxInterval; - bool mWait; -}; - -/* - * Attribute ProductLabel - */ -class ReadBridgedDeviceBasicProductLabel : public ModelCommand -{ -public: - ReadBridgedDeviceBasicProductLabel() : ModelCommand("read") - { - AddArgument("attr-name", "product-label"); - ModelCommand::AddArguments(); - } - - ~ReadBridgedDeviceBasicProductLabel() - { - delete onSuccessCallback; - delete onFailureCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x00) on endpoint %" PRIu8, endpointId); - - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, endpointId); - return cluster.ReadAttributeProductLabel(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnCharStringAttributeResponse, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); -}; - -class ReportBridgedDeviceBasicProductLabel : public ModelCommand -{ -public: - ReportBridgedDeviceBasicProductLabel() : ModelCommand("report") - { - AddArgument("attr-name", "product-label"); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("wait", 0, 1, &mWait); - ModelCommand::AddArguments(); - } - - ~ReportBridgedDeviceBasicProductLabel() - { - delete onSuccessCallback; - delete onSuccessCallbackWithoutExit; - delete onFailureCallback; - delete onReportCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x06) on endpoint %" PRIu8, endpointId); - - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, endpointId); - - ReturnErrorOnFailure(cluster.ReportAttributeProductLabel(onReportCallback->Cancel())); - - chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); - return cluster.SubscribeAttributeProductLabel(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnDefaultSuccessResponse, this); - chip::Callback::Callback * onSuccessCallbackWithoutExit = - new chip::Callback::Callback(OnDefaultSuccessResponseWithoutExit, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); - chip::Callback::Callback * onReportCallback = - new chip::Callback::Callback(OnCharStringAttributeReport, this); - uint16_t mMinInterval; - uint16_t mMaxInterval; - bool mWait; -}; - -/* - * Attribute SerialNumber - */ -class ReadBridgedDeviceBasicSerialNumber : public ModelCommand -{ -public: - ReadBridgedDeviceBasicSerialNumber() : ModelCommand("read") - { - AddArgument("attr-name", "serial-number"); - ModelCommand::AddArguments(); - } - - ~ReadBridgedDeviceBasicSerialNumber() - { - delete onSuccessCallback; - delete onFailureCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x00) on endpoint %" PRIu8, endpointId); - - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, endpointId); - return cluster.ReadAttributeSerialNumber(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnCharStringAttributeResponse, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); -}; - -class ReportBridgedDeviceBasicSerialNumber : public ModelCommand -{ -public: - ReportBridgedDeviceBasicSerialNumber() : ModelCommand("report") - { - AddArgument("attr-name", "serial-number"); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("wait", 0, 1, &mWait); - ModelCommand::AddArguments(); - } - - ~ReportBridgedDeviceBasicSerialNumber() - { - delete onSuccessCallback; - delete onSuccessCallbackWithoutExit; - delete onFailureCallback; - delete onReportCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x06) on endpoint %" PRIu8, endpointId); - - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, endpointId); - - ReturnErrorOnFailure(cluster.ReportAttributeSerialNumber(onReportCallback->Cancel())); - - chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); - return cluster.SubscribeAttributeSerialNumber(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnDefaultSuccessResponse, this); - chip::Callback::Callback * onSuccessCallbackWithoutExit = - new chip::Callback::Callback(OnDefaultSuccessResponseWithoutExit, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); - chip::Callback::Callback * onReportCallback = - new chip::Callback::Callback(OnCharStringAttributeReport, this); - uint16_t mMinInterval; - uint16_t mMaxInterval; - bool mWait; -}; - -/* - * Attribute Reachable - */ -class ReadBridgedDeviceBasicReachable : public ModelCommand -{ -public: - ReadBridgedDeviceBasicReachable() : ModelCommand("read") - { - AddArgument("attr-name", "reachable"); - ModelCommand::AddArguments(); - } - - ~ReadBridgedDeviceBasicReachable() - { - delete onSuccessCallback; - delete onFailureCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x00) on endpoint %" PRIu8, endpointId); - - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, endpointId); - return cluster.ReadAttributeReachable(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnBooleanAttributeResponse, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); -}; - -class ReportBridgedDeviceBasicReachable : public ModelCommand -{ -public: - ReportBridgedDeviceBasicReachable() : ModelCommand("report") - { - AddArgument("attr-name", "reachable"); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("wait", 0, 1, &mWait); - ModelCommand::AddArguments(); - } - - ~ReportBridgedDeviceBasicReachable() - { - delete onSuccessCallback; - delete onSuccessCallbackWithoutExit; - delete onFailureCallback; - delete onReportCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x06) on endpoint %" PRIu8, endpointId); - - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, endpointId); - - ReturnErrorOnFailure(cluster.ReportAttributeReachable(onReportCallback->Cancel())); - - chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); - return cluster.SubscribeAttributeReachable(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnDefaultSuccessResponse, this); - chip::Callback::Callback * onSuccessCallbackWithoutExit = - new chip::Callback::Callback(OnDefaultSuccessResponseWithoutExit, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); - chip::Callback::Callback * onReportCallback = - new chip::Callback::Callback(OnBooleanAttributeReport, this); - uint16_t mMinInterval; - uint16_t mMaxInterval; - bool mWait; -}; - /* * Attribute ClusterRevision */ @@ -29321,18 +28077,295 @@ class ReportOperationalCredentialsCurrentFabricIndex : public ModelCommand }; /* - * Attribute ClusterRevision + * Attribute ClusterRevision + */ +class ReadOperationalCredentialsClusterRevision : public ModelCommand +{ +public: + ReadOperationalCredentialsClusterRevision() : ModelCommand("read") + { + AddArgument("attr-name", "cluster-revision"); + ModelCommand::AddArguments(); + } + + ~ReadOperationalCredentialsClusterRevision() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x003E) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::OperationalCredentialsCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeClusterRevision(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt16uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +class ReportOperationalCredentialsClusterRevision : public ModelCommand +{ +public: + ReportOperationalCredentialsClusterRevision() : ModelCommand("report") + { + AddArgument("attr-name", "cluster-revision"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportOperationalCredentialsClusterRevision() + { + delete onSuccessCallback; + delete onSuccessCallbackWithoutExit; + delete onFailureCallback; + delete onReportCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x003E) command (0x06) on endpoint %" PRIu8, endpointId); + + chip::Controller::OperationalCredentialsCluster cluster; + cluster.Associate(device, endpointId); + + ReturnErrorOnFailure(cluster.ReportAttributeClusterRevision(onReportCallback->Cancel())); + + chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); + return cluster.SubscribeAttributeClusterRevision(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onSuccessCallbackWithoutExit = + new chip::Callback::Callback(OnDefaultSuccessResponseWithoutExit, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + chip::Callback::Callback * onReportCallback = + new chip::Callback::Callback(OnInt16uAttributeReport, this); + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + +/*----------------------------------------------------------------------------*\ +| Cluster PowerSource | 0x002F | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Status | 0x0000 | +| * Order | 0x0001 | +| * Description | 0x0002 | +| * BatteryVoltage | 0x000B | +| * BatteryPercentRemaining | 0x000C | +| * BatteryTimeRemaining | 0x000D | +| * BatteryChargeLevel | 0x000E | +| * ActiveBatteryFaults | 0x0012 | +| * BatteryChargeState | 0x001A | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +\*----------------------------------------------------------------------------*/ + +/* + * Attribute Status + */ +class ReadPowerSourceStatus : public ModelCommand +{ +public: + ReadPowerSourceStatus() : ModelCommand("read") + { + AddArgument("attr-name", "status"); + ModelCommand::AddArguments(); + } + + ~ReadPowerSourceStatus() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x002F) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::PowerSourceCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeStatus(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt8uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +class ReportPowerSourceStatus : public ModelCommand +{ +public: + ReportPowerSourceStatus() : ModelCommand("report") + { + AddArgument("attr-name", "status"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportPowerSourceStatus() + { + delete onSuccessCallback; + delete onSuccessCallbackWithoutExit; + delete onFailureCallback; + delete onReportCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x002F) command (0x06) on endpoint %" PRIu8, endpointId); + + chip::Controller::PowerSourceCluster cluster; + cluster.Associate(device, endpointId); + + ReturnErrorOnFailure(cluster.ReportAttributeStatus(onReportCallback->Cancel())); + + chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); + return cluster.SubscribeAttributeStatus(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onSuccessCallbackWithoutExit = + new chip::Callback::Callback(OnDefaultSuccessResponseWithoutExit, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + chip::Callback::Callback * onReportCallback = + new chip::Callback::Callback(OnInt8uAttributeReport, this); + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + +/* + * Attribute Order + */ +class ReadPowerSourceOrder : public ModelCommand +{ +public: + ReadPowerSourceOrder() : ModelCommand("read") + { + AddArgument("attr-name", "order"); + ModelCommand::AddArguments(); + } + + ~ReadPowerSourceOrder() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x002F) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::PowerSourceCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeOrder(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt8uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +class ReportPowerSourceOrder : public ModelCommand +{ +public: + ReportPowerSourceOrder() : ModelCommand("report") + { + AddArgument("attr-name", "order"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportPowerSourceOrder() + { + delete onSuccessCallback; + delete onSuccessCallbackWithoutExit; + delete onFailureCallback; + delete onReportCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x002F) command (0x06) on endpoint %" PRIu8, endpointId); + + chip::Controller::PowerSourceCluster cluster; + cluster.Associate(device, endpointId); + + ReturnErrorOnFailure(cluster.ReportAttributeOrder(onReportCallback->Cancel())); + + chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); + return cluster.SubscribeAttributeOrder(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onSuccessCallbackWithoutExit = + new chip::Callback::Callback(OnDefaultSuccessResponseWithoutExit, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + chip::Callback::Callback * onReportCallback = + new chip::Callback::Callback(OnInt8uAttributeReport, this); + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + +/* + * Attribute Description */ -class ReadOperationalCredentialsClusterRevision : public ModelCommand +class ReadPowerSourceDescription : public ModelCommand { public: - ReadOperationalCredentialsClusterRevision() : ModelCommand("read") + ReadPowerSourceDescription() : ModelCommand("read") { - AddArgument("attr-name", "cluster-revision"); + AddArgument("attr-name", "description"); ModelCommand::AddArguments(); } - ~ReadOperationalCredentialsClusterRevision() + ~ReadPowerSourceDescription() { delete onSuccessCallback; delete onFailureCallback; @@ -29340,33 +28373,33 @@ class ReadOperationalCredentialsClusterRevision : public ModelCommand CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x003E) command (0x00) on endpoint %" PRIu8, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x002F) command (0x00) on endpoint %" PRIu8, endpointId); - chip::Controller::OperationalCredentialsCluster cluster; + chip::Controller::PowerSourceCluster cluster; cluster.Associate(device, endpointId); - return cluster.ReadAttributeClusterRevision(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + return cluster.ReadAttributeDescription(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); } private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnInt16uAttributeResponse, this); + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnCharStringAttributeResponse, this); chip::Callback::Callback * onFailureCallback = new chip::Callback::Callback(OnDefaultFailureResponse, this); }; -class ReportOperationalCredentialsClusterRevision : public ModelCommand +class ReportPowerSourceDescription : public ModelCommand { public: - ReportOperationalCredentialsClusterRevision() : ModelCommand("report") + ReportPowerSourceDescription() : ModelCommand("report") { - AddArgument("attr-name", "cluster-revision"); + AddArgument("attr-name", "description"); AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); AddArgument("wait", 0, 1, &mWait); ModelCommand::AddArguments(); } - ~ReportOperationalCredentialsClusterRevision() + ~ReportPowerSourceDescription() { delete onSuccessCallback; delete onSuccessCallbackWithoutExit; @@ -29376,15 +28409,15 @@ class ReportOperationalCredentialsClusterRevision : public ModelCommand CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x003E) command (0x06) on endpoint %" PRIu8, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x002F) command (0x06) on endpoint %" PRIu8, endpointId); - chip::Controller::OperationalCredentialsCluster cluster; + chip::Controller::PowerSourceCluster cluster; cluster.Associate(device, endpointId); - ReturnErrorOnFailure(cluster.ReportAttributeClusterRevision(onReportCallback->Cancel())); + ReturnErrorOnFailure(cluster.ReportAttributeDescription(onReportCallback->Cancel())); chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); - return cluster.SubscribeAttributeClusterRevision(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); + return cluster.SubscribeAttributeDescription(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); } chip::System::Clock::Timeout GetWaitDuration() const override @@ -29399,45 +28432,26 @@ class ReportOperationalCredentialsClusterRevision : public ModelCommand new chip::Callback::Callback(OnDefaultSuccessResponseWithoutExit, this); chip::Callback::Callback * onFailureCallback = new chip::Callback::Callback(OnDefaultFailureResponse, this); - chip::Callback::Callback * onReportCallback = - new chip::Callback::Callback(OnInt16uAttributeReport, this); + chip::Callback::Callback * onReportCallback = + new chip::Callback::Callback(OnCharStringAttributeReport, this); uint16_t mMinInterval; uint16_t mMaxInterval; bool mWait; }; -/*----------------------------------------------------------------------------*\ -| Cluster PowerSource | 0x002F | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Status | 0x0000 | -| * Order | 0x0001 | -| * Description | 0x0002 | -| * BatteryVoltage | 0x000B | -| * BatteryPercentRemaining | 0x000C | -| * BatteryTimeRemaining | 0x000D | -| * BatteryChargeLevel | 0x000E | -| * ActiveBatteryFaults | 0x0012 | -| * BatteryChargeState | 0x001A | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -\*----------------------------------------------------------------------------*/ - /* - * Attribute Status + * Attribute BatteryVoltage */ -class ReadPowerSourceStatus : public ModelCommand +class ReadPowerSourceBatteryVoltage : public ModelCommand { public: - ReadPowerSourceStatus() : ModelCommand("read") + ReadPowerSourceBatteryVoltage() : ModelCommand("read") { - AddArgument("attr-name", "status"); + AddArgument("attr-name", "battery-voltage"); ModelCommand::AddArguments(); } - ~ReadPowerSourceStatus() + ~ReadPowerSourceBatteryVoltage() { delete onSuccessCallback; delete onFailureCallback; @@ -29449,29 +28463,29 @@ class ReadPowerSourceStatus : public ModelCommand chip::Controller::PowerSourceCluster cluster; cluster.Associate(device, endpointId); - return cluster.ReadAttributeStatus(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + return cluster.ReadAttributeBatteryVoltage(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); } private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnInt8uAttributeResponse, this); + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt32uAttributeResponse, this); chip::Callback::Callback * onFailureCallback = new chip::Callback::Callback(OnDefaultFailureResponse, this); }; -class ReportPowerSourceStatus : public ModelCommand +class ReportPowerSourceBatteryVoltage : public ModelCommand { public: - ReportPowerSourceStatus() : ModelCommand("report") + ReportPowerSourceBatteryVoltage() : ModelCommand("report") { - AddArgument("attr-name", "status"); + AddArgument("attr-name", "battery-voltage"); AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); AddArgument("wait", 0, 1, &mWait); ModelCommand::AddArguments(); } - ~ReportPowerSourceStatus() + ~ReportPowerSourceBatteryVoltage() { delete onSuccessCallback; delete onSuccessCallbackWithoutExit; @@ -29486,10 +28500,10 @@ class ReportPowerSourceStatus : public ModelCommand chip::Controller::PowerSourceCluster cluster; cluster.Associate(device, endpointId); - ReturnErrorOnFailure(cluster.ReportAttributeStatus(onReportCallback->Cancel())); + ReturnErrorOnFailure(cluster.ReportAttributeBatteryVoltage(onReportCallback->Cancel())); chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); - return cluster.SubscribeAttributeStatus(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); + return cluster.SubscribeAttributeBatteryVoltage(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); } chip::System::Clock::Timeout GetWaitDuration() const override @@ -29504,26 +28518,26 @@ class ReportPowerSourceStatus : public ModelCommand new chip::Callback::Callback(OnDefaultSuccessResponseWithoutExit, this); chip::Callback::Callback * onFailureCallback = new chip::Callback::Callback(OnDefaultFailureResponse, this); - chip::Callback::Callback * onReportCallback = - new chip::Callback::Callback(OnInt8uAttributeReport, this); + chip::Callback::Callback * onReportCallback = + new chip::Callback::Callback(OnInt32uAttributeReport, this); uint16_t mMinInterval; uint16_t mMaxInterval; bool mWait; }; /* - * Attribute Order + * Attribute BatteryPercentRemaining */ -class ReadPowerSourceOrder : public ModelCommand +class ReadPowerSourceBatteryPercentRemaining : public ModelCommand { public: - ReadPowerSourceOrder() : ModelCommand("read") + ReadPowerSourceBatteryPercentRemaining() : ModelCommand("read") { - AddArgument("attr-name", "order"); + AddArgument("attr-name", "battery-percent-remaining"); ModelCommand::AddArguments(); } - ~ReadPowerSourceOrder() + ~ReadPowerSourceBatteryPercentRemaining() { delete onSuccessCallback; delete onFailureCallback; @@ -29535,7 +28549,7 @@ class ReadPowerSourceOrder : public ModelCommand chip::Controller::PowerSourceCluster cluster; cluster.Associate(device, endpointId); - return cluster.ReadAttributeOrder(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + return cluster.ReadAttributeBatteryPercentRemaining(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); } private: @@ -29545,19 +28559,19 @@ class ReadPowerSourceOrder : public ModelCommand new chip::Callback::Callback(OnDefaultFailureResponse, this); }; -class ReportPowerSourceOrder : public ModelCommand +class ReportPowerSourceBatteryPercentRemaining : public ModelCommand { public: - ReportPowerSourceOrder() : ModelCommand("report") + ReportPowerSourceBatteryPercentRemaining() : ModelCommand("report") { - AddArgument("attr-name", "order"); + AddArgument("attr-name", "battery-percent-remaining"); AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); AddArgument("wait", 0, 1, &mWait); ModelCommand::AddArguments(); } - ~ReportPowerSourceOrder() + ~ReportPowerSourceBatteryPercentRemaining() { delete onSuccessCallback; delete onSuccessCallbackWithoutExit; @@ -29572,10 +28586,11 @@ class ReportPowerSourceOrder : public ModelCommand chip::Controller::PowerSourceCluster cluster; cluster.Associate(device, endpointId); - ReturnErrorOnFailure(cluster.ReportAttributeOrder(onReportCallback->Cancel())); + ReturnErrorOnFailure(cluster.ReportAttributeBatteryPercentRemaining(onReportCallback->Cancel())); chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); - return cluster.SubscribeAttributeOrder(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); + return cluster.SubscribeAttributeBatteryPercentRemaining(successCallback, onFailureCallback->Cancel(), mMinInterval, + mMaxInterval); } chip::System::Clock::Timeout GetWaitDuration() const override @@ -29598,18 +28613,18 @@ class ReportPowerSourceOrder : public ModelCommand }; /* - * Attribute Description + * Attribute BatteryTimeRemaining */ -class ReadPowerSourceDescription : public ModelCommand +class ReadPowerSourceBatteryTimeRemaining : public ModelCommand { public: - ReadPowerSourceDescription() : ModelCommand("read") + ReadPowerSourceBatteryTimeRemaining() : ModelCommand("read") { - AddArgument("attr-name", "description"); + AddArgument("attr-name", "battery-time-remaining"); ModelCommand::AddArguments(); } - ~ReadPowerSourceDescription() + ~ReadPowerSourceBatteryTimeRemaining() { delete onSuccessCallback; delete onFailureCallback; @@ -29621,29 +28636,29 @@ class ReadPowerSourceDescription : public ModelCommand chip::Controller::PowerSourceCluster cluster; cluster.Associate(device, endpointId); - return cluster.ReadAttributeDescription(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + return cluster.ReadAttributeBatteryTimeRemaining(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); } private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnCharStringAttributeResponse, this); + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt32uAttributeResponse, this); chip::Callback::Callback * onFailureCallback = new chip::Callback::Callback(OnDefaultFailureResponse, this); }; -class ReportPowerSourceDescription : public ModelCommand +class ReportPowerSourceBatteryTimeRemaining : public ModelCommand { public: - ReportPowerSourceDescription() : ModelCommand("report") + ReportPowerSourceBatteryTimeRemaining() : ModelCommand("report") { - AddArgument("attr-name", "description"); + AddArgument("attr-name", "battery-time-remaining"); AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); AddArgument("wait", 0, 1, &mWait); ModelCommand::AddArguments(); } - ~ReportPowerSourceDescription() + ~ReportPowerSourceBatteryTimeRemaining() { delete onSuccessCallback; delete onSuccessCallbackWithoutExit; @@ -29658,10 +28673,11 @@ class ReportPowerSourceDescription : public ModelCommand chip::Controller::PowerSourceCluster cluster; cluster.Associate(device, endpointId); - ReturnErrorOnFailure(cluster.ReportAttributeDescription(onReportCallback->Cancel())); + ReturnErrorOnFailure(cluster.ReportAttributeBatteryTimeRemaining(onReportCallback->Cancel())); chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); - return cluster.SubscribeAttributeDescription(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); + return cluster.SubscribeAttributeBatteryTimeRemaining(successCallback, onFailureCallback->Cancel(), mMinInterval, + mMaxInterval); } chip::System::Clock::Timeout GetWaitDuration() const override @@ -29676,26 +28692,26 @@ class ReportPowerSourceDescription : public ModelCommand new chip::Callback::Callback(OnDefaultSuccessResponseWithoutExit, this); chip::Callback::Callback * onFailureCallback = new chip::Callback::Callback(OnDefaultFailureResponse, this); - chip::Callback::Callback * onReportCallback = - new chip::Callback::Callback(OnCharStringAttributeReport, this); + chip::Callback::Callback * onReportCallback = + new chip::Callback::Callback(OnInt32uAttributeReport, this); uint16_t mMinInterval; uint16_t mMaxInterval; bool mWait; }; /* - * Attribute BatteryVoltage + * Attribute BatteryChargeLevel */ -class ReadPowerSourceBatteryVoltage : public ModelCommand +class ReadPowerSourceBatteryChargeLevel : public ModelCommand { public: - ReadPowerSourceBatteryVoltage() : ModelCommand("read") + ReadPowerSourceBatteryChargeLevel() : ModelCommand("read") { - AddArgument("attr-name", "battery-voltage"); + AddArgument("attr-name", "battery-charge-level"); ModelCommand::AddArguments(); } - ~ReadPowerSourceBatteryVoltage() + ~ReadPowerSourceBatteryChargeLevel() { delete onSuccessCallback; delete onFailureCallback; @@ -29707,29 +28723,29 @@ class ReadPowerSourceBatteryVoltage : public ModelCommand chip::Controller::PowerSourceCluster cluster; cluster.Associate(device, endpointId); - return cluster.ReadAttributeBatteryVoltage(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + return cluster.ReadAttributeBatteryChargeLevel(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); } private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnInt32uAttributeResponse, this); + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt8uAttributeResponse, this); chip::Callback::Callback * onFailureCallback = new chip::Callback::Callback(OnDefaultFailureResponse, this); }; -class ReportPowerSourceBatteryVoltage : public ModelCommand +class ReportPowerSourceBatteryChargeLevel : public ModelCommand { public: - ReportPowerSourceBatteryVoltage() : ModelCommand("report") + ReportPowerSourceBatteryChargeLevel() : ModelCommand("report") { - AddArgument("attr-name", "battery-voltage"); + AddArgument("attr-name", "battery-charge-level"); AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); AddArgument("wait", 0, 1, &mWait); ModelCommand::AddArguments(); } - ~ReportPowerSourceBatteryVoltage() + ~ReportPowerSourceBatteryChargeLevel() { delete onSuccessCallback; delete onSuccessCallbackWithoutExit; @@ -29744,10 +28760,11 @@ class ReportPowerSourceBatteryVoltage : public ModelCommand chip::Controller::PowerSourceCluster cluster; cluster.Associate(device, endpointId); - ReturnErrorOnFailure(cluster.ReportAttributeBatteryVoltage(onReportCallback->Cancel())); + ReturnErrorOnFailure(cluster.ReportAttributeBatteryChargeLevel(onReportCallback->Cancel())); chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); - return cluster.SubscribeAttributeBatteryVoltage(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); + return cluster.SubscribeAttributeBatteryChargeLevel(successCallback, onFailureCallback->Cancel(), mMinInterval, + mMaxInterval); } chip::System::Clock::Timeout GetWaitDuration() const override @@ -29762,26 +28779,26 @@ class ReportPowerSourceBatteryVoltage : public ModelCommand new chip::Callback::Callback(OnDefaultSuccessResponseWithoutExit, this); chip::Callback::Callback * onFailureCallback = new chip::Callback::Callback(OnDefaultFailureResponse, this); - chip::Callback::Callback * onReportCallback = - new chip::Callback::Callback(OnInt32uAttributeReport, this); + chip::Callback::Callback * onReportCallback = + new chip::Callback::Callback(OnInt8uAttributeReport, this); uint16_t mMinInterval; uint16_t mMaxInterval; bool mWait; }; /* - * Attribute BatteryPercentRemaining + * Attribute ActiveBatteryFaults */ -class ReadPowerSourceBatteryPercentRemaining : public ModelCommand +class ReadPowerSourceActiveBatteryFaults : public ModelCommand { public: - ReadPowerSourceBatteryPercentRemaining() : ModelCommand("read") + ReadPowerSourceActiveBatteryFaults() : ModelCommand("read") { - AddArgument("attr-name", "battery-percent-remaining"); + AddArgument("attr-name", "active-battery-faults"); ModelCommand::AddArguments(); } - ~ReadPowerSourceBatteryPercentRemaining() + ~ReadPowerSourceActiveBatteryFaults() { delete onSuccessCallback; delete onFailureCallback; @@ -29793,7 +28810,42 @@ class ReadPowerSourceBatteryPercentRemaining : public ModelCommand chip::Controller::PowerSourceCluster cluster; cluster.Associate(device, endpointId); - return cluster.ReadAttributeBatteryPercentRemaining(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + return cluster.ReadAttributeActiveBatteryFaults(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback( + OnPowerSourceActiveBatteryFaultsListAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +/* + * Attribute BatteryChargeState + */ +class ReadPowerSourceBatteryChargeState : public ModelCommand +{ +public: + ReadPowerSourceBatteryChargeState() : ModelCommand("read") + { + AddArgument("attr-name", "battery-charge-state"); + ModelCommand::AddArguments(); + } + + ~ReadPowerSourceBatteryChargeState() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x002F) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::PowerSourceCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeBatteryChargeState(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); } private: @@ -29803,19 +28855,19 @@ class ReadPowerSourceBatteryPercentRemaining : public ModelCommand new chip::Callback::Callback(OnDefaultFailureResponse, this); }; -class ReportPowerSourceBatteryPercentRemaining : public ModelCommand +class ReportPowerSourceBatteryChargeState : public ModelCommand { public: - ReportPowerSourceBatteryPercentRemaining() : ModelCommand("report") + ReportPowerSourceBatteryChargeState() : ModelCommand("report") { - AddArgument("attr-name", "battery-percent-remaining"); + AddArgument("attr-name", "battery-charge-state"); AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); AddArgument("wait", 0, 1, &mWait); ModelCommand::AddArguments(); } - ~ReportPowerSourceBatteryPercentRemaining() + ~ReportPowerSourceBatteryChargeState() { delete onSuccessCallback; delete onSuccessCallbackWithoutExit; @@ -29830,11 +28882,11 @@ class ReportPowerSourceBatteryPercentRemaining : public ModelCommand chip::Controller::PowerSourceCluster cluster; cluster.Associate(device, endpointId); - ReturnErrorOnFailure(cluster.ReportAttributeBatteryPercentRemaining(onReportCallback->Cancel())); + ReturnErrorOnFailure(cluster.ReportAttributeBatteryChargeState(onReportCallback->Cancel())); chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); - return cluster.SubscribeAttributeBatteryPercentRemaining(successCallback, onFailureCallback->Cancel(), mMinInterval, - mMaxInterval); + return cluster.SubscribeAttributeBatteryChargeState(successCallback, onFailureCallback->Cancel(), mMinInterval, + mMaxInterval); } chip::System::Clock::Timeout GetWaitDuration() const override @@ -29857,18 +28909,18 @@ class ReportPowerSourceBatteryPercentRemaining : public ModelCommand }; /* - * Attribute BatteryTimeRemaining + * Attribute FeatureMap */ -class ReadPowerSourceBatteryTimeRemaining : public ModelCommand +class ReadPowerSourceFeatureMap : public ModelCommand { public: - ReadPowerSourceBatteryTimeRemaining() : ModelCommand("read") + ReadPowerSourceFeatureMap() : ModelCommand("read") { - AddArgument("attr-name", "battery-time-remaining"); + AddArgument("attr-name", "feature-map"); ModelCommand::AddArguments(); } - ~ReadPowerSourceBatteryTimeRemaining() + ~ReadPowerSourceFeatureMap() { delete onSuccessCallback; delete onFailureCallback; @@ -29880,7 +28932,7 @@ class ReadPowerSourceBatteryTimeRemaining : public ModelCommand chip::Controller::PowerSourceCluster cluster; cluster.Associate(device, endpointId); - return cluster.ReadAttributeBatteryTimeRemaining(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + return cluster.ReadAttributeFeatureMap(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); } private: @@ -29890,19 +28942,19 @@ class ReadPowerSourceBatteryTimeRemaining : public ModelCommand new chip::Callback::Callback(OnDefaultFailureResponse, this); }; -class ReportPowerSourceBatteryTimeRemaining : public ModelCommand +class ReportPowerSourceFeatureMap : public ModelCommand { public: - ReportPowerSourceBatteryTimeRemaining() : ModelCommand("report") + ReportPowerSourceFeatureMap() : ModelCommand("report") { - AddArgument("attr-name", "battery-time-remaining"); + AddArgument("attr-name", "feature-map"); AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); AddArgument("wait", 0, 1, &mWait); ModelCommand::AddArguments(); } - ~ReportPowerSourceBatteryTimeRemaining() + ~ReportPowerSourceFeatureMap() { delete onSuccessCallback; delete onSuccessCallbackWithoutExit; @@ -29917,11 +28969,10 @@ class ReportPowerSourceBatteryTimeRemaining : public ModelCommand chip::Controller::PowerSourceCluster cluster; cluster.Associate(device, endpointId); - ReturnErrorOnFailure(cluster.ReportAttributeBatteryTimeRemaining(onReportCallback->Cancel())); + ReturnErrorOnFailure(cluster.ReportAttributeFeatureMap(onReportCallback->Cancel())); chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); - return cluster.SubscribeAttributeBatteryTimeRemaining(successCallback, onFailureCallback->Cancel(), mMinInterval, - mMaxInterval); + return cluster.SubscribeAttributeFeatureMap(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); } chip::System::Clock::Timeout GetWaitDuration() const override @@ -29944,18 +28995,18 @@ class ReportPowerSourceBatteryTimeRemaining : public ModelCommand }; /* - * Attribute BatteryChargeLevel + * Attribute ClusterRevision */ -class ReadPowerSourceBatteryChargeLevel : public ModelCommand +class ReadPowerSourceClusterRevision : public ModelCommand { public: - ReadPowerSourceBatteryChargeLevel() : ModelCommand("read") + ReadPowerSourceClusterRevision() : ModelCommand("read") { - AddArgument("attr-name", "battery-charge-level"); + AddArgument("attr-name", "cluster-revision"); ModelCommand::AddArguments(); } - ~ReadPowerSourceBatteryChargeLevel() + ~ReadPowerSourceClusterRevision() { delete onSuccessCallback; delete onFailureCallback; @@ -29967,29 +29018,29 @@ class ReadPowerSourceBatteryChargeLevel : public ModelCommand chip::Controller::PowerSourceCluster cluster; cluster.Associate(device, endpointId); - return cluster.ReadAttributeBatteryChargeLevel(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + return cluster.ReadAttributeClusterRevision(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); } private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnInt8uAttributeResponse, this); + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt16uAttributeResponse, this); chip::Callback::Callback * onFailureCallback = new chip::Callback::Callback(OnDefaultFailureResponse, this); }; -class ReportPowerSourceBatteryChargeLevel : public ModelCommand +class ReportPowerSourceClusterRevision : public ModelCommand { public: - ReportPowerSourceBatteryChargeLevel() : ModelCommand("report") + ReportPowerSourceClusterRevision() : ModelCommand("report") { - AddArgument("attr-name", "battery-charge-level"); + AddArgument("attr-name", "cluster-revision"); AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); AddArgument("wait", 0, 1, &mWait); ModelCommand::AddArguments(); } - ~ReportPowerSourceBatteryChargeLevel() + ~ReportPowerSourceClusterRevision() { delete onSuccessCallback; delete onSuccessCallbackWithoutExit; @@ -30004,11 +29055,10 @@ class ReportPowerSourceBatteryChargeLevel : public ModelCommand chip::Controller::PowerSourceCluster cluster; cluster.Associate(device, endpointId); - ReturnErrorOnFailure(cluster.ReportAttributeBatteryChargeLevel(onReportCallback->Cancel())); + ReturnErrorOnFailure(cluster.ReportAttributeClusterRevision(onReportCallback->Cancel())); chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); - return cluster.SubscribeAttributeBatteryChargeLevel(successCallback, onFailureCallback->Cancel(), mMinInterval, - mMaxInterval); + return cluster.SubscribeAttributeClusterRevision(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); } chip::System::Clock::Timeout GetWaitDuration() const override @@ -30023,148 +29073,36 @@ class ReportPowerSourceBatteryChargeLevel : public ModelCommand new chip::Callback::Callback(OnDefaultSuccessResponseWithoutExit, this); chip::Callback::Callback * onFailureCallback = new chip::Callback::Callback(OnDefaultFailureResponse, this); - chip::Callback::Callback * onReportCallback = - new chip::Callback::Callback(OnInt8uAttributeReport, this); + chip::Callback::Callback * onReportCallback = + new chip::Callback::Callback(OnInt16uAttributeReport, this); uint16_t mMinInterval; uint16_t mMaxInterval; bool mWait; }; -/* - * Attribute ActiveBatteryFaults - */ -class ReadPowerSourceActiveBatteryFaults : public ModelCommand -{ -public: - ReadPowerSourceActiveBatteryFaults() : ModelCommand("read") - { - AddArgument("attr-name", "active-battery-faults"); - ModelCommand::AddArguments(); - } - - ~ReadPowerSourceActiveBatteryFaults() - { - delete onSuccessCallback; - delete onFailureCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x002F) command (0x00) on endpoint %" PRIu8, endpointId); - - chip::Controller::PowerSourceCluster cluster; - cluster.Associate(device, endpointId); - return cluster.ReadAttributeActiveBatteryFaults(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback( - OnPowerSourceActiveBatteryFaultsListAttributeResponse, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); -}; - -/* - * Attribute BatteryChargeState - */ -class ReadPowerSourceBatteryChargeState : public ModelCommand -{ -public: - ReadPowerSourceBatteryChargeState() : ModelCommand("read") - { - AddArgument("attr-name", "battery-charge-state"); - ModelCommand::AddArguments(); - } - - ~ReadPowerSourceBatteryChargeState() - { - delete onSuccessCallback; - delete onFailureCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x002F) command (0x00) on endpoint %" PRIu8, endpointId); - - chip::Controller::PowerSourceCluster cluster; - cluster.Associate(device, endpointId); - return cluster.ReadAttributeBatteryChargeState(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnInt8uAttributeResponse, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); -}; - -class ReportPowerSourceBatteryChargeState : public ModelCommand -{ -public: - ReportPowerSourceBatteryChargeState() : ModelCommand("report") - { - AddArgument("attr-name", "battery-charge-state"); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("wait", 0, 1, &mWait); - ModelCommand::AddArguments(); - } - - ~ReportPowerSourceBatteryChargeState() - { - delete onSuccessCallback; - delete onSuccessCallbackWithoutExit; - delete onFailureCallback; - delete onReportCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x002F) command (0x06) on endpoint %" PRIu8, endpointId); - - chip::Controller::PowerSourceCluster cluster; - cluster.Associate(device, endpointId); - - ReturnErrorOnFailure(cluster.ReportAttributeBatteryChargeState(onReportCallback->Cancel())); - - chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); - return cluster.SubscribeAttributeBatteryChargeState(successCallback, onFailureCallback->Cancel(), mMinInterval, - mMaxInterval); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnDefaultSuccessResponse, this); - chip::Callback::Callback * onSuccessCallbackWithoutExit = - new chip::Callback::Callback(OnDefaultSuccessResponseWithoutExit, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); - chip::Callback::Callback * onReportCallback = - new chip::Callback::Callback(OnInt8uAttributeReport, this); - uint16_t mMinInterval; - uint16_t mMaxInterval; - bool mWait; -}; +/*----------------------------------------------------------------------------*\ +| Cluster PowerSourceConfiguration | 0x002E | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Sources | 0x0000 | +| * ClusterRevision | 0xFFFD | +\*----------------------------------------------------------------------------*/ /* - * Attribute FeatureMap + * Attribute Sources */ -class ReadPowerSourceFeatureMap : public ModelCommand +class ReadPowerSourceConfigurationSources : public ModelCommand { public: - ReadPowerSourceFeatureMap() : ModelCommand("read") + ReadPowerSourceConfigurationSources() : ModelCommand("read") { - AddArgument("attr-name", "feature-map"); + AddArgument("attr-name", "sources"); ModelCommand::AddArguments(); } - ~ReadPowerSourceFeatureMap() + ~ReadPowerSourceConfigurationSources() { delete onSuccessCallback; delete onFailureCallback; @@ -30172,85 +29110,34 @@ class ReadPowerSourceFeatureMap : public ModelCommand CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x002F) command (0x00) on endpoint %" PRIu8, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x002E) command (0x00) on endpoint %" PRIu8, endpointId); - chip::Controller::PowerSourceCluster cluster; + chip::Controller::PowerSourceConfigurationCluster cluster; cluster.Associate(device, endpointId); - return cluster.ReadAttributeFeatureMap(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + return cluster.ReadAttributeSources(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); } private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnInt32uAttributeResponse, this); + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback( + OnPowerSourceConfigurationSourcesListAttributeResponse, this); chip::Callback::Callback * onFailureCallback = new chip::Callback::Callback(OnDefaultFailureResponse, this); }; -class ReportPowerSourceFeatureMap : public ModelCommand -{ -public: - ReportPowerSourceFeatureMap() : ModelCommand("report") - { - AddArgument("attr-name", "feature-map"); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("wait", 0, 1, &mWait); - ModelCommand::AddArguments(); - } - - ~ReportPowerSourceFeatureMap() - { - delete onSuccessCallback; - delete onSuccessCallbackWithoutExit; - delete onFailureCallback; - delete onReportCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x002F) command (0x06) on endpoint %" PRIu8, endpointId); - - chip::Controller::PowerSourceCluster cluster; - cluster.Associate(device, endpointId); - - ReturnErrorOnFailure(cluster.ReportAttributeFeatureMap(onReportCallback->Cancel())); - - chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); - return cluster.SubscribeAttributeFeatureMap(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnDefaultSuccessResponse, this); - chip::Callback::Callback * onSuccessCallbackWithoutExit = - new chip::Callback::Callback(OnDefaultSuccessResponseWithoutExit, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); - chip::Callback::Callback * onReportCallback = - new chip::Callback::Callback(OnInt32uAttributeReport, this); - uint16_t mMinInterval; - uint16_t mMaxInterval; - bool mWait; -}; - /* * Attribute ClusterRevision */ -class ReadPowerSourceClusterRevision : public ModelCommand +class ReadPowerSourceConfigurationClusterRevision : public ModelCommand { public: - ReadPowerSourceClusterRevision() : ModelCommand("read") + ReadPowerSourceConfigurationClusterRevision() : ModelCommand("read") { AddArgument("attr-name", "cluster-revision"); ModelCommand::AddArguments(); } - ~ReadPowerSourceClusterRevision() + ~ReadPowerSourceConfigurationClusterRevision() { delete onSuccessCallback; delete onFailureCallback; @@ -30258,9 +29145,9 @@ class ReadPowerSourceClusterRevision : public ModelCommand CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x002F) command (0x00) on endpoint %" PRIu8, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x002E) command (0x00) on endpoint %" PRIu8, endpointId); - chip::Controller::PowerSourceCluster cluster; + chip::Controller::PowerSourceConfigurationCluster cluster; cluster.Associate(device, endpointId); return cluster.ReadAttributeClusterRevision(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); } @@ -30272,58 +29159,6 @@ class ReadPowerSourceClusterRevision : public ModelCommand new chip::Callback::Callback(OnDefaultFailureResponse, this); }; -class ReportPowerSourceClusterRevision : public ModelCommand -{ -public: - ReportPowerSourceClusterRevision() : ModelCommand("report") - { - AddArgument("attr-name", "cluster-revision"); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("wait", 0, 1, &mWait); - ModelCommand::AddArguments(); - } - - ~ReportPowerSourceClusterRevision() - { - delete onSuccessCallback; - delete onSuccessCallbackWithoutExit; - delete onFailureCallback; - delete onReportCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x002F) command (0x06) on endpoint %" PRIu8, endpointId); - - chip::Controller::PowerSourceCluster cluster; - cluster.Associate(device, endpointId); - - ReturnErrorOnFailure(cluster.ReportAttributeClusterRevision(onReportCallback->Cancel())); - - chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); - return cluster.SubscribeAttributeClusterRevision(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnDefaultSuccessResponse, this); - chip::Callback::Callback * onSuccessCallbackWithoutExit = - new chip::Callback::Callback(OnDefaultSuccessResponseWithoutExit, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); - chip::Callback::Callback * onReportCallback = - new chip::Callback::Callback(OnInt16uAttributeReport, this); - uint16_t mMinInterval; - uint16_t mMaxInterval; - bool mWait; -}; - /*----------------------------------------------------------------------------*\ | Cluster PressureMeasurement | 0x0403 | |------------------------------------------------------------------------------| @@ -56630,37 +55465,8 @@ void registerClusterBridgedDeviceBasic(Commands & commands) const char * clusterName = "BridgedDeviceBasic"; commands_list clusterCommands = { - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // }; commands.Register(clusterName, clusterCommands); @@ -57429,6 +56235,17 @@ void registerClusterPowerSource(Commands & commands) commands.Register(clusterName, clusterCommands); } +void registerClusterPowerSourceConfiguration(Commands & commands) +{ + const char * clusterName = "PowerSourceConfiguration"; + + commands_list clusterCommands = { + make_unique(), // + make_unique(), // + }; + + commands.Register(clusterName, clusterCommands); +} void registerClusterPressureMeasurement(Commands & commands) { const char * clusterName = "PressureMeasurement"; @@ -58254,6 +57071,7 @@ void registerClusters(Commands & commands) registerClusterOnOffSwitchConfiguration(commands); registerClusterOperationalCredentials(commands); registerClusterPowerSource(commands); + registerClusterPowerSourceConfiguration(commands); registerClusterPressureMeasurement(commands); registerClusterPumpConfigurationAndControl(commands); registerClusterRelativeHumidityMeasurement(commands); diff --git a/zzz_generated/chip-tool/zap-generated/reporting/Commands.h b/zzz_generated/chip-tool/zap-generated/reporting/Commands.h index d30328496698fe..180ae81d6ce20b 100644 --- a/zzz_generated/chip-tool/zap-generated/reporting/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/reporting/Commands.h @@ -78,20 +78,6 @@ class Listen : public ReportingCommand delete onReportBooleanStateClusterRevisionCallback; delete onReportBridgedActionsSetupUrlCallback; delete onReportBridgedActionsClusterRevisionCallback; - delete onReportBridgedDeviceBasicVendorNameCallback; - delete onReportBridgedDeviceBasicVendorIDCallback; - delete onReportBridgedDeviceBasicProductNameCallback; - delete onReportBridgedDeviceBasicNodeLabelCallback; - delete onReportBridgedDeviceBasicHardwareVersionCallback; - delete onReportBridgedDeviceBasicHardwareVersionStringCallback; - delete onReportBridgedDeviceBasicSoftwareVersionCallback; - delete onReportBridgedDeviceBasicSoftwareVersionStringCallback; - delete onReportBridgedDeviceBasicManufacturingDateCallback; - delete onReportBridgedDeviceBasicPartNumberCallback; - delete onReportBridgedDeviceBasicProductURLCallback; - delete onReportBridgedDeviceBasicProductLabelCallback; - delete onReportBridgedDeviceBasicSerialNumberCallback; - delete onReportBridgedDeviceBasicReachableCallback; delete onReportBridgedDeviceBasicClusterRevisionCallback; delete onReportColorControlCurrentHueCallback; delete onReportColorControlCurrentSaturationCallback; @@ -628,42 +614,6 @@ class Listen : public ReportingCommand callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0025, 0xFFFD, onReportBridgedActionsClusterRevisionCallback->Cancel(), BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0039, 0x0001, onReportBridgedDeviceBasicVendorNameCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0039, 0x0002, onReportBridgedDeviceBasicVendorIDCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0039, 0x0003, - onReportBridgedDeviceBasicProductNameCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0039, 0x0005, onReportBridgedDeviceBasicNodeLabelCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0039, 0x0007, - onReportBridgedDeviceBasicHardwareVersionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0039, 0x0008, - onReportBridgedDeviceBasicHardwareVersionStringCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0039, 0x0009, - onReportBridgedDeviceBasicSoftwareVersionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0039, 0x000A, - onReportBridgedDeviceBasicSoftwareVersionStringCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0039, 0x000B, - onReportBridgedDeviceBasicManufacturingDateCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0039, 0x000C, onReportBridgedDeviceBasicPartNumberCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0039, 0x000D, onReportBridgedDeviceBasicProductURLCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0039, 0x000E, - onReportBridgedDeviceBasicProductLabelCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0039, 0x000F, - onReportBridgedDeviceBasicSerialNumberCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0039, 0x0011, onReportBridgedDeviceBasicReachableCallback->Cancel(), - BasicAttributeFilter); callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0039, 0xFFFD, onReportBridgedDeviceBasicClusterRevisionCallback->Cancel(), BasicAttributeFilter); @@ -1878,34 +1828,6 @@ class Listen : public ReportingCommand new chip::Callback::Callback(OnCharStringAttributeResponse, this); chip::Callback::Callback * onReportBridgedActionsClusterRevisionCallback = new chip::Callback::Callback(OnInt16uAttributeResponse, this); - chip::Callback::Callback * onReportBridgedDeviceBasicVendorNameCallback = - new chip::Callback::Callback(OnCharStringAttributeResponse, this); - chip::Callback::Callback * onReportBridgedDeviceBasicVendorIDCallback = - new chip::Callback::Callback(OnInt16uAttributeResponse, this); - chip::Callback::Callback * onReportBridgedDeviceBasicProductNameCallback = - new chip::Callback::Callback(OnCharStringAttributeResponse, this); - chip::Callback::Callback * onReportBridgedDeviceBasicNodeLabelCallback = - new chip::Callback::Callback(OnCharStringAttributeResponse, this); - chip::Callback::Callback * onReportBridgedDeviceBasicHardwareVersionCallback = - new chip::Callback::Callback(OnInt16uAttributeResponse, this); - chip::Callback::Callback * onReportBridgedDeviceBasicHardwareVersionStringCallback = - new chip::Callback::Callback(OnCharStringAttributeResponse, this); - chip::Callback::Callback * onReportBridgedDeviceBasicSoftwareVersionCallback = - new chip::Callback::Callback(OnInt32uAttributeResponse, this); - chip::Callback::Callback * onReportBridgedDeviceBasicSoftwareVersionStringCallback = - new chip::Callback::Callback(OnCharStringAttributeResponse, this); - chip::Callback::Callback * onReportBridgedDeviceBasicManufacturingDateCallback = - new chip::Callback::Callback(OnCharStringAttributeResponse, this); - chip::Callback::Callback * onReportBridgedDeviceBasicPartNumberCallback = - new chip::Callback::Callback(OnCharStringAttributeResponse, this); - chip::Callback::Callback * onReportBridgedDeviceBasicProductURLCallback = - new chip::Callback::Callback(OnCharStringAttributeResponse, this); - chip::Callback::Callback * onReportBridgedDeviceBasicProductLabelCallback = - new chip::Callback::Callback(OnCharStringAttributeResponse, this); - chip::Callback::Callback * onReportBridgedDeviceBasicSerialNumberCallback = - new chip::Callback::Callback(OnCharStringAttributeResponse, this); - chip::Callback::Callback * onReportBridgedDeviceBasicReachableCallback = - new chip::Callback::Callback(OnBooleanAttributeResponse, this); chip::Callback::Callback * onReportBridgedDeviceBasicClusterRevisionCallback = new chip::Callback::Callback(OnInt16uAttributeResponse, this); chip::Callback::Callback * onReportColorControlCurrentHueCallback = diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 573443627cd573..eb749fa2490543 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -46659,32 +46659,34 @@ class TestDescriptorCluster : public TestCommand VerifyOrReturn(CheckNextListItemDecodes("serverList", iter, 4)); VerifyOrReturn(CheckValue("serverList[4]", iter.GetValue(), 42UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter, 5)); - VerifyOrReturn(CheckValue("serverList[5]", iter.GetValue(), 48UL)); + VerifyOrReturn(CheckValue("serverList[5]", iter.GetValue(), 46UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter, 6)); - VerifyOrReturn(CheckValue("serverList[6]", iter.GetValue(), 49UL)); + VerifyOrReturn(CheckValue("serverList[6]", iter.GetValue(), 48UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter, 7)); - VerifyOrReturn(CheckValue("serverList[7]", iter.GetValue(), 50UL)); + VerifyOrReturn(CheckValue("serverList[7]", iter.GetValue(), 49UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter, 8)); - VerifyOrReturn(CheckValue("serverList[8]", iter.GetValue(), 51UL)); + VerifyOrReturn(CheckValue("serverList[8]", iter.GetValue(), 50UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter, 9)); - VerifyOrReturn(CheckValue("serverList[9]", iter.GetValue(), 52UL)); + VerifyOrReturn(CheckValue("serverList[9]", iter.GetValue(), 51UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter, 10)); - VerifyOrReturn(CheckValue("serverList[10]", iter.GetValue(), 53UL)); + VerifyOrReturn(CheckValue("serverList[10]", iter.GetValue(), 52UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter, 11)); - VerifyOrReturn(CheckValue("serverList[11]", iter.GetValue(), 54UL)); + VerifyOrReturn(CheckValue("serverList[11]", iter.GetValue(), 53UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter, 12)); - VerifyOrReturn(CheckValue("serverList[12]", iter.GetValue(), 55UL)); + VerifyOrReturn(CheckValue("serverList[12]", iter.GetValue(), 54UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter, 13)); - VerifyOrReturn(CheckValue("serverList[13]", iter.GetValue(), 60UL)); + VerifyOrReturn(CheckValue("serverList[13]", iter.GetValue(), 55UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter, 14)); - VerifyOrReturn(CheckValue("serverList[14]", iter.GetValue(), 62UL)); + VerifyOrReturn(CheckValue("serverList[14]", iter.GetValue(), 60UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter, 15)); - VerifyOrReturn(CheckValue("serverList[15]", iter.GetValue(), 1029UL)); + VerifyOrReturn(CheckValue("serverList[15]", iter.GetValue(), 62UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter, 16)); - VerifyOrReturn(CheckValue("serverList[16]", iter.GetValue(), 61440UL)); + VerifyOrReturn(CheckValue("serverList[16]", iter.GetValue(), 1029UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter, 17)); - VerifyOrReturn(CheckValue("serverList[17]", iter.GetValue(), 61444UL)); - VerifyOrReturn(CheckNoMoreListItems("serverList", iter, 18)); + VerifyOrReturn(CheckValue("serverList[17]", iter.GetValue(), 61440UL)); + VerifyOrReturn(CheckNextListItemDecodes("serverList", iter, 18)); + VerifyOrReturn(CheckValue("serverList[18]", iter.GetValue(), 61444UL)); + VerifyOrReturn(CheckNoMoreListItems("serverList", iter, 19)); NextTest(); } diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp index 1f8ec3e13c0732..3b0bb2adbf2020 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp @@ -627,6 +627,27 @@ void PowerSourceClusterActiveBatteryFaultsListAttributeFilter(TLV::TLVReader * t cb->mCall(cb->mContext, list); } +void PowerSourceConfigurationClusterSourcesListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + void SoftwareDiagnosticsClusterThreadMetricsListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h index ea6fdad5b71e85..f30f8f1dfafdd4 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h @@ -260,6 +260,11 @@ void PowerSourceClusterActiveBatteryFaultsListAttributeFilter(chip::TLV::TLVRead chip::Callback::Cancelable * onFailureCallback); typedef void (*PowerSourceActiveBatteryFaultsListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); +void PowerSourceConfigurationClusterSourcesListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*PowerSourceConfigurationSourcesListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); void SoftwareDiagnosticsClusterThreadMetricsListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp index 0722875104f7ad..272c1a7db4265f 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp @@ -2645,409 +2645,6 @@ CHIP_ERROR BridgedActionsCluster::ReportAttributeClusterRevision(Callback::Cance // BridgedDeviceBasic Cluster Commands // BridgedDeviceBasic Cluster Attributes -CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeVendorName(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) -{ - app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = 0x00000001; - return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BridgedDeviceBasicCluster::SubscribeAttributeVendorName(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = BridgedDeviceBasic::Attributes::VendorName::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BridgedDeviceBasicCluster::ReportAttributeVendorName(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(BridgedDeviceBasic::Attributes::VendorName::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeVendorID(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) -{ - app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = 0x00000002; - return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BridgedDeviceBasicCluster::SubscribeAttributeVendorID(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = BridgedDeviceBasic::Attributes::VendorID::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BridgedDeviceBasicCluster::ReportAttributeVendorID(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(BridgedDeviceBasic::Attributes::VendorID::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeProductName(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) -{ - app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = 0x00000003; - return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BridgedDeviceBasicCluster::SubscribeAttributeProductName(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = BridgedDeviceBasic::Attributes::ProductName::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BridgedDeviceBasicCluster::ReportAttributeProductName(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(BridgedDeviceBasic::Attributes::ProductName::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeNodeLabel(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) -{ - app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = 0x00000005; - return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BridgedDeviceBasicCluster::WriteAttributeNodeLabel(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::CharSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, BridgedDeviceBasic::Attributes::NodeLabel::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BridgedDeviceBasicCluster::SubscribeAttributeNodeLabel(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = BridgedDeviceBasic::Attributes::NodeLabel::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BridgedDeviceBasicCluster::ReportAttributeNodeLabel(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(BridgedDeviceBasic::Attributes::NodeLabel::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeHardwareVersion(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) -{ - app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = 0x00000007; - return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BridgedDeviceBasicCluster::SubscribeAttributeHardwareVersion(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = BridgedDeviceBasic::Attributes::HardwareVersion::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BridgedDeviceBasicCluster::ReportAttributeHardwareVersion(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(BridgedDeviceBasic::Attributes::HardwareVersion::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeHardwareVersionString(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) -{ - app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = 0x00000008; - return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BridgedDeviceBasicCluster::SubscribeAttributeHardwareVersionString(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = BridgedDeviceBasic::Attributes::HardwareVersionString::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BridgedDeviceBasicCluster::ReportAttributeHardwareVersionString(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(BridgedDeviceBasic::Attributes::HardwareVersionString::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeSoftwareVersion(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) -{ - app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = 0x00000009; - return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BridgedDeviceBasicCluster::SubscribeAttributeSoftwareVersion(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = BridgedDeviceBasic::Attributes::SoftwareVersion::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BridgedDeviceBasicCluster::ReportAttributeSoftwareVersion(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(BridgedDeviceBasic::Attributes::SoftwareVersion::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeSoftwareVersionString(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) -{ - app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = 0x0000000A; - return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BridgedDeviceBasicCluster::SubscribeAttributeSoftwareVersionString(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = BridgedDeviceBasic::Attributes::SoftwareVersionString::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BridgedDeviceBasicCluster::ReportAttributeSoftwareVersionString(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(BridgedDeviceBasic::Attributes::SoftwareVersionString::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeManufacturingDate(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) -{ - app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = 0x0000000B; - return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BridgedDeviceBasicCluster::SubscribeAttributeManufacturingDate(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = BridgedDeviceBasic::Attributes::ManufacturingDate::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BridgedDeviceBasicCluster::ReportAttributeManufacturingDate(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(BridgedDeviceBasic::Attributes::ManufacturingDate::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributePartNumber(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) -{ - app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = 0x0000000C; - return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BridgedDeviceBasicCluster::SubscribeAttributePartNumber(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = BridgedDeviceBasic::Attributes::PartNumber::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BridgedDeviceBasicCluster::ReportAttributePartNumber(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(BridgedDeviceBasic::Attributes::PartNumber::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeProductURL(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) -{ - app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = 0x0000000D; - return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BridgedDeviceBasicCluster::SubscribeAttributeProductURL(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = BridgedDeviceBasic::Attributes::ProductURL::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BridgedDeviceBasicCluster::ReportAttributeProductURL(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(BridgedDeviceBasic::Attributes::ProductURL::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeProductLabel(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) -{ - app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = 0x0000000E; - return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BridgedDeviceBasicCluster::SubscribeAttributeProductLabel(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = BridgedDeviceBasic::Attributes::ProductLabel::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BridgedDeviceBasicCluster::ReportAttributeProductLabel(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(BridgedDeviceBasic::Attributes::ProductLabel::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeSerialNumber(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) -{ - app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = 0x0000000F; - return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BridgedDeviceBasicCluster::SubscribeAttributeSerialNumber(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = BridgedDeviceBasic::Attributes::SerialNumber::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BridgedDeviceBasicCluster::ReportAttributeSerialNumber(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(BridgedDeviceBasic::Attributes::SerialNumber::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeReachable(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) -{ - app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = 0x00000011; - return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BridgedDeviceBasicCluster::SubscribeAttributeReachable(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = BridgedDeviceBasic::Attributes::Reachable::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BridgedDeviceBasicCluster::ReportAttributeReachable(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(BridgedDeviceBasic::Attributes::Reachable::Id, onReportCallback, - BasicAttributeFilter); -} - CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { @@ -13352,6 +12949,30 @@ CHIP_ERROR PowerSourceCluster::ReportAttributeClusterRevision(Callback::Cancelab BasicAttributeFilter); } +// PowerSourceConfiguration Cluster Commands +// PowerSourceConfiguration Cluster Attributes +CHIP_ERROR PowerSourceConfigurationCluster::ReadAttributeSources(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + PowerSourceConfigurationClusterSourcesListAttributeFilter); +} + +CHIP_ERROR PowerSourceConfigurationCluster::ReadAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + // PressureMeasurement Cluster Commands // PressureMeasurement Cluster Attributes CHIP_ERROR PressureMeasurementCluster::ReadAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h index eb50ebc5ad6f08..13e45a664ef1ba 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h @@ -441,69 +441,6 @@ class DLL_EXPORT BridgedDeviceBasicCluster : public ClusterBase ~BridgedDeviceBasicCluster() {} // Cluster Attributes - CHIP_ERROR ReadAttributeVendorName(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); - CHIP_ERROR SubscribeAttributeVendorName(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeVendorName(Callback::Cancelable * onReportCallback); - CHIP_ERROR ReadAttributeVendorID(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); - CHIP_ERROR SubscribeAttributeVendorID(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeVendorID(Callback::Cancelable * onReportCallback); - CHIP_ERROR ReadAttributeProductName(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); - CHIP_ERROR SubscribeAttributeProductName(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeProductName(Callback::Cancelable * onReportCallback); - CHIP_ERROR ReadAttributeNodeLabel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); - CHIP_ERROR WriteAttributeNodeLabel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - chip::CharSpan value); - CHIP_ERROR SubscribeAttributeNodeLabel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeNodeLabel(Callback::Cancelable * onReportCallback); - CHIP_ERROR ReadAttributeHardwareVersion(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); - CHIP_ERROR SubscribeAttributeHardwareVersion(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeHardwareVersion(Callback::Cancelable * onReportCallback); - CHIP_ERROR ReadAttributeHardwareVersionString(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback); - CHIP_ERROR SubscribeAttributeHardwareVersionString(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeHardwareVersionString(Callback::Cancelable * onReportCallback); - CHIP_ERROR ReadAttributeSoftwareVersion(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); - CHIP_ERROR SubscribeAttributeSoftwareVersion(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeSoftwareVersion(Callback::Cancelable * onReportCallback); - CHIP_ERROR ReadAttributeSoftwareVersionString(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback); - CHIP_ERROR SubscribeAttributeSoftwareVersionString(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeSoftwareVersionString(Callback::Cancelable * onReportCallback); - CHIP_ERROR ReadAttributeManufacturingDate(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); - CHIP_ERROR SubscribeAttributeManufacturingDate(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeManufacturingDate(Callback::Cancelable * onReportCallback); - CHIP_ERROR ReadAttributePartNumber(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); - CHIP_ERROR SubscribeAttributePartNumber(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributePartNumber(Callback::Cancelable * onReportCallback); - CHIP_ERROR ReadAttributeProductURL(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); - CHIP_ERROR SubscribeAttributeProductURL(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeProductURL(Callback::Cancelable * onReportCallback); - CHIP_ERROR ReadAttributeProductLabel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); - CHIP_ERROR SubscribeAttributeProductLabel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeProductLabel(Callback::Cancelable * onReportCallback); - CHIP_ERROR ReadAttributeSerialNumber(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); - CHIP_ERROR SubscribeAttributeSerialNumber(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeSerialNumber(Callback::Cancelable * onReportCallback); - CHIP_ERROR ReadAttributeReachable(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); - CHIP_ERROR SubscribeAttributeReachable(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeReachable(Callback::Cancelable * onReportCallback); CHIP_ERROR ReadAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, uint16_t maxInterval); @@ -1874,6 +1811,17 @@ class DLL_EXPORT PowerSourceCluster : public ClusterBase CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); }; +class DLL_EXPORT PowerSourceConfigurationCluster : public ClusterBase +{ +public: + PowerSourceConfigurationCluster() : ClusterBase(app::Clusters::PowerSourceConfiguration::Id) {} + ~PowerSourceConfigurationCluster() {} + + // Cluster Attributes + CHIP_ERROR ReadAttributeSources(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); +}; + class DLL_EXPORT PressureMeasurementCluster : public ClusterBase { public: diff --git a/zzz_generated/controller-clusters/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/controller-clusters/zap-generated/PluginApplicationCallbacks.h index 541b221d76f3c9..3b0d93fc98c034 100644 --- a/zzz_generated/controller-clusters/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/controller-clusters/zap-generated/PluginApplicationCallbacks.h @@ -63,6 +63,7 @@ MatterOnOffSwitchConfigurationPluginClientInitCallback(); \ MatterOperationalCredentialsPluginClientInitCallback(); \ MatterPowerSourcePluginClientInitCallback(); \ + MatterPowerSourceConfigurationPluginClientInitCallback(); \ MatterPressureMeasurementPluginClientInitCallback(); \ MatterPumpConfigurationAndControlPluginClientInitCallback(); \ MatterRelativeHumidityMeasurementPluginClientInitCallback(); \ diff --git a/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp b/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp index 5066913f920360..7e315dec568069 100644 --- a/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp +++ b/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp @@ -152,6 +152,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_POWER_SOURCE_CLUSTER_ID: emberAfPowerSourceClusterInitCallback(endpoint); break; + case ZCL_POWER_SOURCE_CONFIGURATION_CLUSTER_ID: + emberAfPowerSourceConfigurationClusterInitCallback(endpoint); + break; case ZCL_PRESSURE_MEASUREMENT_CLUSTER_ID: emberAfPressureMeasurementClusterInitCallback(endpoint); break; @@ -411,6 +414,11 @@ void __attribute__((weak)) emberAfPowerSourceClusterInitCallback(EndpointId endp // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfPowerSourceConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfPressureMeasurementClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/controller-clusters/zap-generated/endpoint_config.h b/zzz_generated/controller-clusters/zap-generated/endpoint_config.h index 4335bc7a4f9c25..d177bcc76d6f75 100644 --- a/zzz_generated/controller-clusters/zap-generated/endpoint_config.h +++ b/zzz_generated/controller-clusters/zap-generated/endpoint_config.h @@ -123,7 +123,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 62 +#define GENERATED_ATTRIBUTE_COUNT 63 #define GENERATED_ATTRIBUTES \ { \ \ @@ -162,6 +162,9 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: OTA Software Update Requestor (client) */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + \ + /* Endpoint: 1, Cluster: Power Source Configuration (client) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Power Source (client) */ \ @@ -311,7 +314,7 @@ #define GENERATED_FUNCTION_ARRAYS #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 57 +#define GENERATED_CLUSTER_COUNT 58 #define GENERATED_CLUSTERS \ { \ { 0x0003, ZAP_ATTRIBUTE_INDEX(0), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Identify (client) */ \ @@ -341,137 +344,140 @@ 0x002A, ZAP_ATTRIBUTE_INDEX(11), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: OTA Software Update Requestor (client) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(12), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x002E, ZAP_ATTRIBUTE_INDEX(12), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + }, /* Endpoint: 1, Cluster: Power Source Configuration (client) */ \ + { \ + 0x002F, ZAP_ATTRIBUTE_INDEX(13), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Power Source (client) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(13), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0030, ZAP_ATTRIBUTE_INDEX(14), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: General Commissioning (client) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(15), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(16), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Network Commissioning (client) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(17), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(18), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Diagnostic Logs (client) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(17), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(18), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: General Diagnostics (client) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(18), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(19), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Software Diagnostics (client) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(20), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(21), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Thread Network Diagnostics (client) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(22), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(23), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: WiFi Network Diagnostics (client) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(23), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(24), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Ethernet Network Diagnostics (client) */ \ { \ - 0x0039, ZAP_ATTRIBUTE_INDEX(25), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0039, ZAP_ATTRIBUTE_INDEX(26), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Bridged Device Basic (client) */ \ - { 0x003B, ZAP_ATTRIBUTE_INDEX(26), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Switch (client) */ \ + { 0x003B, ZAP_ATTRIBUTE_INDEX(27), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Switch (client) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(27), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(28), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: AdministratorCommissioning (client) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(28), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(29), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Operational Credentials (client) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(29), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(30), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (client) */ \ { \ - 0x0045, ZAP_ATTRIBUTE_INDEX(30), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0045, ZAP_ATTRIBUTE_INDEX(31), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Boolean State (client) */ \ { \ - 0x0050, ZAP_ATTRIBUTE_INDEX(31), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0050, ZAP_ATTRIBUTE_INDEX(32), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Mode Select (client) */ \ { \ - 0x0101, ZAP_ATTRIBUTE_INDEX(32), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0101, ZAP_ATTRIBUTE_INDEX(33), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Door Lock (client) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(33), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0102, ZAP_ATTRIBUTE_INDEX(34), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (client) */ \ { \ - 0x0103, ZAP_ATTRIBUTE_INDEX(34), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0103, ZAP_ATTRIBUTE_INDEX(35), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Barrier Control (client) */ \ { \ - 0x0200, ZAP_ATTRIBUTE_INDEX(35), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0200, ZAP_ATTRIBUTE_INDEX(36), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (client) */ \ { \ - 0x0201, ZAP_ATTRIBUTE_INDEX(37), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0201, ZAP_ATTRIBUTE_INDEX(38), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Thermostat (client) */ \ { \ - 0x0204, ZAP_ATTRIBUTE_INDEX(38), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0204, ZAP_ATTRIBUTE_INDEX(39), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (client) */ \ { \ - 0x0300, ZAP_ATTRIBUTE_INDEX(39), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0300, ZAP_ATTRIBUTE_INDEX(40), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Color Control (client) */ \ { \ - 0x0400, ZAP_ATTRIBUTE_INDEX(40), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0400, ZAP_ATTRIBUTE_INDEX(41), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Illuminance Measurement (client) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(41), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(42), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (client) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(42), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0403, ZAP_ATTRIBUTE_INDEX(43), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (client) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(43), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0404, ZAP_ATTRIBUTE_INDEX(44), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (client) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(44), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0405, ZAP_ATTRIBUTE_INDEX(45), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Relative Humidity Measurement (client) */ \ { \ - 0x0406, ZAP_ATTRIBUTE_INDEX(45), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0406, ZAP_ATTRIBUTE_INDEX(46), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Occupancy Sensing (client) */ \ { \ - 0x0503, ZAP_ATTRIBUTE_INDEX(46), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0503, ZAP_ATTRIBUTE_INDEX(47), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (client) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(47), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(48), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: TV Channel (client) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(48), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(49), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (client) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(49), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(50), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (client) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(50), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(51), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Media Input (client) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(51), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0508, ZAP_ATTRIBUTE_INDEX(52), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Low Power (client) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(52), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(53), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (client) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(53), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(54), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (client) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(54), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(55), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (client) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(55), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(56), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (client) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(56), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(57), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (client) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(57), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(58), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Account Login (client) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(58), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050F, ZAP_ATTRIBUTE_INDEX(59), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (client) */ \ { \ - 0x0B04, ZAP_ATTRIBUTE_INDEX(59), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0B04, ZAP_ATTRIBUTE_INDEX(60), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Electrical Measurement (client) */ \ { \ - 0xF000, ZAP_ATTRIBUTE_INDEX(60), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0xF000, ZAP_ATTRIBUTE_INDEX(61), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Binding (client) */ \ { \ - 0xF004, ZAP_ATTRIBUTE_INDEX(61), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0xF004, ZAP_ATTRIBUTE_INDEX(62), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Group Key Management (client) */ \ } @@ -480,7 +486,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 57, 136 }, \ + { ZAP_CLUSTER_INDEX(0), 58, 138 }, \ } // Largest attribute size is needed for various buffers @@ -490,7 +496,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (4) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (136) +#define ATTRIBUTE_MAX_SIZE (138) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (1) diff --git a/zzz_generated/controller-clusters/zap-generated/gen_config.h b/zzz_generated/controller-clusters/zap-generated/gen_config.h index 8fdc7ca51f1d1b..06c9a4166e52e1 100644 --- a/zzz_generated/controller-clusters/zap-generated/gen_config.h +++ b/zzz_generated/controller-clusters/zap-generated/gen_config.h @@ -70,6 +70,7 @@ #define EMBER_AF_ON_OFF_SWITCH_CONFIG_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_OPERATIONAL_CREDENTIALS_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_POWER_SOURCE_CLUSTER_CLIENT_ENDPOINT_COUNT (1) +#define EMBER_AF_POWER_SOURCE_CONFIGURATION_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_PRESSURE_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_PUMP_CONFIG_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) @@ -253,6 +254,10 @@ #define ZCL_USING_POWER_SOURCE_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_POWER_SOURCE_CLIENT +// Use this macro to check if the client side of the Power Source Configuration cluster is included +#define ZCL_USING_POWER_SOURCE_CONFIGURATION_CLUSTER_CLIENT +#define EMBER_AF_PLUGIN_POWER_SOURCE_CONFIGURATION_CLIENT + // Use this macro to check if the client side of the Pressure Measurement cluster is included #define ZCL_USING_PRESSURE_MEASUREMENT_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_PRESSURE_MEASUREMENT_CLIENT diff --git a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.cpp b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.cpp index b9da448f69285f..291dc2e11d2b0f 100644 --- a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.cpp +++ b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.cpp @@ -486,139 +486,6 @@ CHIP_ERROR BridgedActionsClusterTest::WriteAttributeClusterRevision(Callback::Ca return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); } -CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributeVendorName(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::CharSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, BridgedDeviceBasic::Attributes::VendorName::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributeVendorID(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, BridgedDeviceBasic::Attributes::VendorID::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributeProductName(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::CharSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, BridgedDeviceBasic::Attributes::ProductName::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributeHardwareVersion(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, BridgedDeviceBasic::Attributes::HardwareVersion::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributeHardwareVersionString(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - chip::CharSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, BridgedDeviceBasic::Attributes::HardwareVersionString::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributeSoftwareVersion(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, BridgedDeviceBasic::Attributes::SoftwareVersion::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributeSoftwareVersionString(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - chip::CharSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, BridgedDeviceBasic::Attributes::SoftwareVersionString::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributeManufacturingDate(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - chip::CharSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, BridgedDeviceBasic::Attributes::ManufacturingDate::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributePartNumber(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::CharSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, BridgedDeviceBasic::Attributes::PartNumber::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributeProductURL(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::CharSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, BridgedDeviceBasic::Attributes::ProductURL::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributeProductLabel(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::CharSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, BridgedDeviceBasic::Attributes::ProductLabel::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributeSerialNumber(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::CharSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, BridgedDeviceBasic::Attributes::SerialNumber::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributeReachable(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, bool value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, BridgedDeviceBasic::Attributes::Reachable::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t value) { @@ -2161,6 +2028,18 @@ CHIP_ERROR PowerSourceClusterTest::WriteAttributeClusterRevision(Callback::Cance return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); } +CHIP_ERROR PowerSourceConfigurationClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PowerSourceConfiguration::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + CHIP_ERROR PressureMeasurementClusterTest::WriteAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, int16_t value) { diff --git a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h index 2d9fd597e4eb4a..99b33ce74d289a 100644 --- a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h +++ b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h @@ -206,32 +206,6 @@ class DLL_EXPORT BridgedDeviceBasicClusterTest : public BridgedDeviceBasicCluste BridgedDeviceBasicClusterTest() : BridgedDeviceBasicCluster() {} ~BridgedDeviceBasicClusterTest() {} - CHIP_ERROR WriteAttributeVendorName(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - chip::CharSpan value); - CHIP_ERROR WriteAttributeVendorID(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t value); - CHIP_ERROR WriteAttributeProductName(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - chip::CharSpan value); - CHIP_ERROR WriteAttributeHardwareVersion(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t value); - CHIP_ERROR WriteAttributeHardwareVersionString(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::CharSpan value); - CHIP_ERROR WriteAttributeSoftwareVersion(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint32_t value); - CHIP_ERROR WriteAttributeSoftwareVersionString(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::CharSpan value); - CHIP_ERROR WriteAttributeManufacturingDate(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - chip::CharSpan value); - CHIP_ERROR WriteAttributePartNumber(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - chip::CharSpan value); - CHIP_ERROR WriteAttributeProductURL(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - chip::CharSpan value); - CHIP_ERROR WriteAttributeProductLabel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - chip::CharSpan value); - CHIP_ERROR WriteAttributeSerialNumber(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - chip::CharSpan value); - CHIP_ERROR WriteAttributeReachable(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - bool value); CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t value); }; @@ -762,6 +736,16 @@ class DLL_EXPORT PowerSourceClusterTest : public PowerSourceCluster uint16_t value); }; +class DLL_EXPORT PowerSourceConfigurationClusterTest : public PowerSourceConfigurationCluster +{ +public: + PowerSourceConfigurationClusterTest() : PowerSourceConfigurationCluster() {} + ~PowerSourceConfigurationClusterTest() {} + + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + class DLL_EXPORT PressureMeasurementClusterTest : public PressureMeasurementCluster { public: diff --git a/zzz_generated/lock-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/lock-app/zap-generated/PluginApplicationCallbacks.h index c710b8c2b3a563..e3f429c3d98d83 100644 --- a/zzz_generated/lock-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/lock-app/zap-generated/PluginApplicationCallbacks.h @@ -32,6 +32,8 @@ MatterNetworkCommissioningPluginServerInitCallback(); \ MatterOnOffPluginServerInitCallback(); \ MatterOperationalCredentialsPluginServerInitCallback(); \ + MatterPowerSourcePluginServerInitCallback(); \ + MatterPowerSourceConfigurationPluginServerInitCallback(); \ MatterSoftwareDiagnosticsPluginServerInitCallback(); \ MatterThreadNetworkDiagnosticsPluginServerInitCallback(); \ MatterWiFiNetworkDiagnosticsPluginServerInitCallback(); diff --git a/zzz_generated/lock-app/zap-generated/attribute-size.cpp b/zzz_generated/lock-app/zap-generated/attribute-size.cpp index eefc399fb4e2f3..6e6e8f4466ee16 100644 --- a/zzz_generated/lock-app/zap-generated/attribute-size.cpp +++ b/zzz_generated/lock-app/zap-generated/attribute-size.cpp @@ -323,6 +323,26 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo } break; } + case 0x002E: // Power Source Configuration Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x0000: // Sources + { + entryLength = 1; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + copyListMember(dest, src, write, &entryOffset, entryLength); // INT8U + break; + } + } + break; + } case 0x0034: // Software Diagnostics Cluster { uint16_t entryOffset = kSizeLengthInBytes; @@ -599,6 +619,15 @@ uint16_t emberAfAttributeValueListSize(ClusterId clusterId, AttributeId attribut break; } break; + case 0x002E: // Power Source Configuration Cluster + switch (attributeId) + { + case 0x0000: // Sources + // uint8_t + entryLength = 1; + break; + } + break; case 0x0034: // Software Diagnostics Cluster switch (attributeId) { diff --git a/zzz_generated/lock-app/zap-generated/callback-stub.cpp b/zzz_generated/lock-app/zap-generated/callback-stub.cpp index ce041d7c344857..5eb2564220b05e 100644 --- a/zzz_generated/lock-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/lock-app/zap-generated/callback-stub.cpp @@ -59,6 +59,12 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID: emberAfOperationalCredentialsClusterInitCallback(endpoint); break; + case ZCL_POWER_SOURCE_CLUSTER_ID: + emberAfPowerSourceClusterInitCallback(endpoint); + break; + case ZCL_POWER_SOURCE_CONFIGURATION_CLUSTER_ID: + emberAfPowerSourceConfigurationClusterInitCallback(endpoint); + break; case ZCL_SOFTWARE_DIAGNOSTICS_CLUSTER_ID: emberAfSoftwareDiagnosticsClusterInitCallback(endpoint); break; @@ -124,6 +130,16 @@ void __attribute__((weak)) emberAfOperationalCredentialsClusterInitCallback(Endp // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfPowerSourceClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfPowerSourceConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfSoftwareDiagnosticsClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/lock-app/zap-generated/endpoint_config.h b/zzz_generated/lock-app/zap-generated/endpoint_config.h index 1111dc163e11b9..778521b84d1fb1 100644 --- a/zzz_generated/lock-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lock-app/zap-generated/endpoint_config.h @@ -32,12 +32,23 @@ /* 0 - SoftwareVersion, */ \ 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 0, Cluster: Power Source (server), big-endian */ \ + \ + /* 4 - Description, */ \ + 3, 'U', 'S', 'B', \ + \ + /* 8 - WiredAssessedCurrent, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* 12 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 0, Cluster: General Commissioning (server), big-endian */ \ \ - /* 4 - Breadcrumb, */ \ + /* 16 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 12 - BasicCommissioningInfoList, */ \ + /* 24 - BasicCommissioningInfoList, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -53,223 +64,231 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 266 - FeatureMap, */ \ + /* 278 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x06, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 270 - FeatureMap, */ \ + /* 282 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), big-endian */ \ \ - /* 274 - UpTime, */ \ + /* 286 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 282 - TotalOperationalHours, */ \ + /* 294 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), big-endian */ \ \ - /* 286 - CurrentHeapFree, */ \ + /* 298 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 294 - CurrentHeapUsed, */ \ + /* 306 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 302 - CurrentHeapHighWatermark, */ \ + /* 314 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 310 - FeatureMap, */ \ + /* 322 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), big-endian */ \ \ - /* 314 - NetworkName, */ \ + /* 326 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 316 - ExtendedPanId, */ \ + /* 328 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 324 - OverrunCount, */ \ + /* 336 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 332 - PartitionId, */ \ + /* 344 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 336 - TxTotalCount, */ \ + /* 348 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 340 - TxUnicastCount, */ \ + /* 352 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 344 - TxBroadcastCount, */ \ + /* 356 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 348 - TxAckRequestedCount, */ \ + /* 360 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 352 - TxAckedCount, */ \ + /* 364 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 356 - TxNoAckRequestedCount, */ \ + /* 368 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 360 - TxDataCount, */ \ + /* 372 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 364 - TxDataPollCount, */ \ + /* 376 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 368 - TxBeaconCount, */ \ + /* 380 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 372 - TxBeaconRequestCount, */ \ + /* 384 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 376 - TxOtherCount, */ \ + /* 388 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 380 - TxRetryCount, */ \ + /* 392 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 384 - TxDirectMaxRetryExpiryCount, */ \ + /* 396 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 388 - TxIndirectMaxRetryExpiryCount, */ \ + /* 400 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 392 - TxErrCcaCount, */ \ + /* 404 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 396 - TxErrAbortCount, */ \ + /* 408 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 400 - TxErrBusyChannelCount, */ \ + /* 412 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 404 - RxTotalCount, */ \ + /* 416 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 408 - RxUnicastCount, */ \ + /* 420 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 412 - RxBroadcastCount, */ \ + /* 424 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 416 - RxDataCount, */ \ + /* 428 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 420 - RxDataPollCount, */ \ + /* 432 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 424 - RxBeaconCount, */ \ + /* 436 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 428 - RxBeaconRequestCount, */ \ + /* 440 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 432 - RxOtherCount, */ \ + /* 444 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 436 - RxAddressFilteredCount, */ \ + /* 448 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 440 - RxDestAddrFilteredCount, */ \ + /* 452 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 444 - RxDuplicatedCount, */ \ + /* 456 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 448 - RxErrNoFrameCount, */ \ + /* 460 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 452 - RxErrUnknownNeighborCount, */ \ + /* 464 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 456 - RxErrInvalidSrcAddrCount, */ \ + /* 468 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 460 - RxErrSecCount, */ \ + /* 472 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 464 - RxErrFcsCount, */ \ + /* 476 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 468 - RxErrOtherCount, */ \ + /* 480 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 472 - ActiveTimestamp, */ \ + /* 484 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 480 - PendingTimestamp, */ \ + /* 492 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 488 - delay, */ \ + /* 500 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 492 - ChannelMask, */ \ + /* 504 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 499 - FeatureMap, */ \ + /* 511 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0F, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), big-endian */ \ \ - /* 503 - BeaconLostCount, */ \ + /* 515 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 507 - BeaconRxCount, */ \ + /* 519 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 511 - PacketMulticastRxCount, */ \ + /* 523 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 515 - PacketMulticastTxCount, */ \ + /* 527 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 519 - PacketUnicastRxCount, */ \ + /* 531 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 523 - PacketUnicastTxCount, */ \ + /* 535 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 527 - CurrentMaxRate, */ \ + /* 539 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 535 - OverrunCount, */ \ + /* 547 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 543 - FeatureMap, */ \ + /* 555 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), big-endian */ \ \ - /* 547 - PacketRxCount, */ \ + /* 559 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 555 - PacketTxCount, */ \ + /* 567 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 563 - TxErrCount, */ \ + /* 575 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 571 - CollisionCount, */ \ + /* 583 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 579 - OverrunCount, */ \ + /* 591 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 587 - TimeSinceReset, */ \ + /* 599 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 595 - FeatureMap, */ \ + /* 607 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 1, Cluster: On/Off (server), big-endian */ \ \ - /* 599 - FeatureMap, */ \ + /* 611 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Power Source (server), big-endian */ \ + \ + /* 615 - Description, */ \ + 7, 'B', 'a', 't', 't', 'e', 'r', 'y', \ + \ + /* 623 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x0A, \ } #else // !BIGENDIAN_CPU @@ -281,12 +300,23 @@ /* 0 - SoftwareVersion, */ \ 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 0, Cluster: Power Source (server), little-endian */ \ + \ + /* 4 - Description, */ \ + 3, 'U', 'S', 'B', \ + \ + /* 8 - WiredAssessedCurrent, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* 12 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 0, Cluster: General Commissioning (server), little-endian */ \ \ - /* 4 - Breadcrumb, */ \ + /* 16 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 12 - BasicCommissioningInfoList, */ \ + /* 24 - BasicCommissioningInfoList, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -302,228 +332,236 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 266 - FeatureMap, */ \ + /* 278 - FeatureMap, */ \ 0x06, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 270 - FeatureMap, */ \ + /* 282 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), little-endian */ \ \ - /* 274 - UpTime, */ \ + /* 286 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 282 - TotalOperationalHours, */ \ + /* 294 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), little-endian */ \ \ - /* 286 - CurrentHeapFree, */ \ + /* 298 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 294 - CurrentHeapUsed, */ \ + /* 306 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 302 - CurrentHeapHighWatermark, */ \ + /* 314 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 310 - FeatureMap, */ \ + /* 322 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), little-endian */ \ \ - /* 314 - NetworkName, */ \ + /* 326 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 316 - ExtendedPanId, */ \ + /* 328 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 324 - OverrunCount, */ \ + /* 336 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 332 - PartitionId, */ \ + /* 344 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 336 - TxTotalCount, */ \ + /* 348 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 340 - TxUnicastCount, */ \ + /* 352 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 344 - TxBroadcastCount, */ \ + /* 356 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 348 - TxAckRequestedCount, */ \ + /* 360 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 352 - TxAckedCount, */ \ + /* 364 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 356 - TxNoAckRequestedCount, */ \ + /* 368 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 360 - TxDataCount, */ \ + /* 372 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 364 - TxDataPollCount, */ \ + /* 376 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 368 - TxBeaconCount, */ \ + /* 380 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 372 - TxBeaconRequestCount, */ \ + /* 384 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 376 - TxOtherCount, */ \ + /* 388 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 380 - TxRetryCount, */ \ + /* 392 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 384 - TxDirectMaxRetryExpiryCount, */ \ + /* 396 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 388 - TxIndirectMaxRetryExpiryCount, */ \ + /* 400 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 392 - TxErrCcaCount, */ \ + /* 404 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 396 - TxErrAbortCount, */ \ + /* 408 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 400 - TxErrBusyChannelCount, */ \ + /* 412 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 404 - RxTotalCount, */ \ + /* 416 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 408 - RxUnicastCount, */ \ + /* 420 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 412 - RxBroadcastCount, */ \ + /* 424 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 416 - RxDataCount, */ \ + /* 428 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 420 - RxDataPollCount, */ \ + /* 432 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 424 - RxBeaconCount, */ \ + /* 436 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 428 - RxBeaconRequestCount, */ \ + /* 440 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 432 - RxOtherCount, */ \ + /* 444 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 436 - RxAddressFilteredCount, */ \ + /* 448 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 440 - RxDestAddrFilteredCount, */ \ + /* 452 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 444 - RxDuplicatedCount, */ \ + /* 456 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 448 - RxErrNoFrameCount, */ \ + /* 460 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 452 - RxErrUnknownNeighborCount, */ \ + /* 464 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 456 - RxErrInvalidSrcAddrCount, */ \ + /* 468 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 460 - RxErrSecCount, */ \ + /* 472 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 464 - RxErrFcsCount, */ \ + /* 476 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 468 - RxErrOtherCount, */ \ + /* 480 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 472 - ActiveTimestamp, */ \ + /* 484 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 480 - PendingTimestamp, */ \ + /* 492 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 488 - delay, */ \ + /* 500 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 492 - ChannelMask, */ \ + /* 504 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 499 - FeatureMap, */ \ + /* 511 - FeatureMap, */ \ 0x0F, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), little-endian */ \ \ - /* 503 - BeaconLostCount, */ \ + /* 515 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 507 - BeaconRxCount, */ \ + /* 519 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 511 - PacketMulticastRxCount, */ \ + /* 523 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 515 - PacketMulticastTxCount, */ \ + /* 527 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 519 - PacketUnicastRxCount, */ \ + /* 531 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 523 - PacketUnicastTxCount, */ \ + /* 535 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 527 - CurrentMaxRate, */ \ + /* 539 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 535 - OverrunCount, */ \ + /* 547 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 543 - FeatureMap, */ \ + /* 555 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), little-endian */ \ \ - /* 547 - PacketRxCount, */ \ + /* 559 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 555 - PacketTxCount, */ \ + /* 567 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 563 - TxErrCount, */ \ + /* 575 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 571 - CollisionCount, */ \ + /* 583 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 579 - OverrunCount, */ \ + /* 591 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 587 - TimeSinceReset, */ \ + /* 599 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 595 - FeatureMap, */ \ + /* 607 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: On/Off (server), little-endian */ \ \ - /* 599 - FeatureMap, */ \ + /* 611 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Power Source (server), little-endian */ \ + \ + /* 615 - Description, */ \ + 7, 'B', 'a', 't', 't', 'e', 'r', 'y', \ + \ + /* 623 - FeatureMap, */ \ + 0x0A, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (71) +#define GENERATED_DEFAULTS_COUNT (76) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -551,7 +589,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 150 +#define GENERATED_ATTRIBUTE_COUNT 167 #define GENERATED_ATTRIBUTES \ { \ \ @@ -578,23 +616,35 @@ { 0x000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Power Source Configuration (server) */ \ + { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Sources */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: Power Source (server) */ \ + { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* Status */ \ + { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* Order */ \ + { 0x0002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_LONG_DEFAULTS_INDEX(4) }, /* Description */ \ + { 0x0006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(8) }, /* WiredAssessedCurrent */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4) }, /* Breadcrumb */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* BasicCommissioningInfoList */ \ + { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(16) }, /* Breadcrumb */ \ + { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(24) }, /* BasicCommissioningInfoList */ \ { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ { 0x0003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(266) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(278) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(270) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(282) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(274) }, /* UpTime */ \ - { 0x0003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(282) }, /* TotalOperationalHours */ \ + { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(286) }, /* UpTime */ \ + { 0x0003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(294) }, /* TotalOperationalHours */ \ { 0x0004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ { 0x0005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ { 0x0006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ @@ -603,23 +653,23 @@ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ - { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(286) }, /* CurrentHeapFree */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(294) }, /* CurrentHeapUsed */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(302) }, /* CurrentHeapHighWatermark */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(310) }, /* FeatureMap */ \ + { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(298) }, /* CurrentHeapFree */ \ + { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(306) }, /* CurrentHeapUsed */ \ + { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(314) }, /* CurrentHeapHighWatermark */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(322) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { 0x0000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ - { 0x0002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(314) }, /* NetworkName */ \ + { 0x0002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(326) }, /* NetworkName */ \ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(316) }, /* ExtendedPanId */ \ + { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(328) }, /* ExtendedPanId */ \ { 0x0005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(324) }, /* OverrunCount */ \ + { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(336) }, /* OverrunCount */ \ { 0x0007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ { 0x0008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(332) }, /* PartitionId */ \ + { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(344) }, /* PartitionId */ \ { 0x000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ { 0x000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ { 0x000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ @@ -632,50 +682,50 @@ { 0x0013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ { 0x0014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ { 0x0015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ - { 0x0016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(336) }, /* TxTotalCount */ \ - { 0x0017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(340) }, /* TxUnicastCount */ \ - { 0x0018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(344) }, /* TxBroadcastCount */ \ - { 0x0019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(348) }, /* TxAckRequestedCount */ \ - { 0x001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(352) }, /* TxAckedCount */ \ - { 0x001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(356) }, /* TxNoAckRequestedCount */ \ - { 0x001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(360) }, /* TxDataCount */ \ - { 0x001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(364) }, /* TxDataPollCount */ \ - { 0x001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(368) }, /* TxBeaconCount */ \ - { 0x001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(372) }, /* TxBeaconRequestCount */ \ - { 0x0020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(376) }, /* TxOtherCount */ \ - { 0x0021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(380) }, /* TxRetryCount */ \ - { 0x0022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(384) }, /* TxDirectMaxRetryExpiryCount */ \ - { 0x0023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(388) }, /* TxIndirectMaxRetryExpiryCount */ \ - { 0x0024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(392) }, /* TxErrCcaCount */ \ - { 0x0025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(396) }, /* TxErrAbortCount */ \ - { 0x0026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(400) }, /* TxErrBusyChannelCount */ \ - { 0x0027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(404) }, /* RxTotalCount */ \ - { 0x0028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(408) }, /* RxUnicastCount */ \ - { 0x0029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(412) }, /* RxBroadcastCount */ \ - { 0x002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(416) }, /* RxDataCount */ \ - { 0x002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(420) }, /* RxDataPollCount */ \ - { 0x002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(424) }, /* RxBeaconCount */ \ - { 0x002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(428) }, /* RxBeaconRequestCount */ \ - { 0x002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(432) }, /* RxOtherCount */ \ - { 0x002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(436) }, /* RxAddressFilteredCount */ \ - { 0x0030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(440) }, /* RxDestAddrFilteredCount */ \ - { 0x0031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(444) }, /* RxDuplicatedCount */ \ - { 0x0032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(448) }, /* RxErrNoFrameCount */ \ - { 0x0033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(452) }, /* RxErrUnknownNeighborCount */ \ - { 0x0034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(456) }, /* RxErrInvalidSrcAddrCount */ \ - { 0x0035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(460) }, /* RxErrSecCount */ \ - { 0x0036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(464) }, /* RxErrFcsCount */ \ - { 0x0037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(468) }, /* RxErrOtherCount */ \ - { 0x0038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(472) }, /* ActiveTimestamp */ \ - { 0x0039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(480) }, /* PendingTimestamp */ \ - { 0x003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(488) }, /* delay */ \ + { 0x0016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(348) }, /* TxTotalCount */ \ + { 0x0017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(352) }, /* TxUnicastCount */ \ + { 0x0018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(356) }, /* TxBroadcastCount */ \ + { 0x0019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(360) }, /* TxAckRequestedCount */ \ + { 0x001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(364) }, /* TxAckedCount */ \ + { 0x001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(368) }, /* TxNoAckRequestedCount */ \ + { 0x001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(372) }, /* TxDataCount */ \ + { 0x001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(376) }, /* TxDataPollCount */ \ + { 0x001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(380) }, /* TxBeaconCount */ \ + { 0x001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(384) }, /* TxBeaconRequestCount */ \ + { 0x0020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(388) }, /* TxOtherCount */ \ + { 0x0021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(392) }, /* TxRetryCount */ \ + { 0x0022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(396) }, /* TxDirectMaxRetryExpiryCount */ \ + { 0x0023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(400) }, /* TxIndirectMaxRetryExpiryCount */ \ + { 0x0024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(404) }, /* TxErrCcaCount */ \ + { 0x0025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(408) }, /* TxErrAbortCount */ \ + { 0x0026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(412) }, /* TxErrBusyChannelCount */ \ + { 0x0027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(416) }, /* RxTotalCount */ \ + { 0x0028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(420) }, /* RxUnicastCount */ \ + { 0x0029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(424) }, /* RxBroadcastCount */ \ + { 0x002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(428) }, /* RxDataCount */ \ + { 0x002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(432) }, /* RxDataPollCount */ \ + { 0x002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(436) }, /* RxBeaconCount */ \ + { 0x002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(440) }, /* RxBeaconRequestCount */ \ + { 0x002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(444) }, /* RxOtherCount */ \ + { 0x002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(448) }, /* RxAddressFilteredCount */ \ + { 0x0030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(452) }, /* RxDestAddrFilteredCount */ \ + { 0x0031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(456) }, /* RxDuplicatedCount */ \ + { 0x0032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(460) }, /* RxErrNoFrameCount */ \ + { 0x0033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(464) }, /* RxErrUnknownNeighborCount */ \ + { 0x0034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(468) }, /* RxErrInvalidSrcAddrCount */ \ + { 0x0035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(472) }, /* RxErrSecCount */ \ + { 0x0036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(476) }, /* RxErrFcsCount */ \ + { 0x0037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(480) }, /* RxErrOtherCount */ \ + { 0x0038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(484) }, /* ActiveTimestamp */ \ + { 0x0039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(492) }, /* PendingTimestamp */ \ + { 0x003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(500) }, /* delay */ \ { 0x003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ - { 0x003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(492) }, /* ChannelMask */ \ + { 0x003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(504) }, /* ChannelMask */ \ { 0x003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* OperationalDatasetComponents */ \ { 0x003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(499) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(511) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ @@ -684,28 +734,28 @@ { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ { 0x0004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ - { 0x0005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(503) }, /* BeaconLostCount */ \ - { 0x0006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(507) }, /* BeaconRxCount */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(511) }, /* PacketMulticastRxCount */ \ - { 0x0008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(515) }, /* PacketMulticastTxCount */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(519) }, /* PacketUnicastRxCount */ \ - { 0x000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(523) }, /* PacketUnicastTxCount */ \ - { 0x000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(527) }, /* CurrentMaxRate */ \ - { 0x000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(535) }, /* OverrunCount */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(543) }, /* FeatureMap */ \ + { 0x0005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(515) }, /* BeaconLostCount */ \ + { 0x0006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(519) }, /* BeaconRxCount */ \ + { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(523) }, /* PacketMulticastRxCount */ \ + { 0x0008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(527) }, /* PacketMulticastTxCount */ \ + { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(531) }, /* PacketUnicastRxCount */ \ + { 0x000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(535) }, /* PacketUnicastTxCount */ \ + { 0x000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(539) }, /* CurrentMaxRate */ \ + { 0x000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(547) }, /* OverrunCount */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(555) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ { 0x0001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(547) }, /* PacketRxCount */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(555) }, /* PacketTxCount */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(563) }, /* TxErrCount */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(571) }, /* CollisionCount */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(579) }, /* OverrunCount */ \ + { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(559) }, /* PacketRxCount */ \ + { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(567) }, /* PacketTxCount */ \ + { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(575) }, /* TxErrCount */ \ + { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(583) }, /* CollisionCount */ \ + { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(591) }, /* OverrunCount */ \ { 0x0007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x0008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(587) }, /* TimeSinceReset */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(595) }, /* FeatureMap */ \ + { 0x0008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(599) }, /* TimeSinceReset */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(607) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ @@ -727,7 +777,7 @@ { 0x4001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OnTime */ \ { 0x4002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OffWaitTime */ \ { 0x4003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(599) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(611) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ @@ -736,6 +786,17 @@ { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + \ + /* Endpoint: 1, Cluster: Power Source (server) */ \ + { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* Status */ \ + { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* Order */ \ + { 0x0002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_LONG_DEFAULTS_INDEX(615) }, /* Description */ \ + { 0x000E, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeLevel */ \ + { 0x000F, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryReplacementNeeded */ \ + { 0x0010, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryReplaceability */ \ + { 0x0013, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryReplacementDescription */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(623) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ } // This is an array of EmberAfCluster structures. @@ -751,7 +812,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 14 +#define GENERATED_CLUSTER_COUNT 17 #define GENERATED_CLUSTERS \ { \ { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ @@ -762,44 +823,53 @@ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(17), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002E, ZAP_ATTRIBUTE_INDEX(17), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Power Source Configuration (server) */ \ + { \ + 0x002F, ZAP_ATTRIBUTE_INDEX(19), 6, 73, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Power Source (server) */ \ + { \ + 0x0030, ZAP_ATTRIBUTE_INDEX(25), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(23), 2, 6, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(31), 2, 6, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(25), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(33), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(25), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(33), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(34), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(42), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(40), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(48), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(105), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(113), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(120), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(128), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(131), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(139), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(132), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(140), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(138), \ + ZAP_ATTRIBUTE_INDEX(146), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(145), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(153), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ + { \ + 0x002F, ZAP_ATTRIBUTE_INDEX(158), 9, 133, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 1, Cluster: Power Source (server) */ \ } #define ZAP_CLUSTER_INDEX(index) ((EmberAfCluster *) (&generatedClusters[index])) @@ -807,7 +877,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 12, 937 }, { ZAP_CLUSTER_INDEX(12), 2, 13 }, \ + { ZAP_CLUSTER_INDEX(0), 14, 1012 }, { ZAP_CLUSTER_INDEX(14), 3, 146 }, \ } // Largest attribute size is needed for various buffers @@ -817,7 +887,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (246) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (950) +#define ATTRIBUTE_MAX_SIZE (1158) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/lock-app/zap-generated/gen_config.h b/zzz_generated/lock-app/zap-generated/gen_config.h index c15ef08ab8f19b..ed7b14a9aa39f9 100644 --- a/zzz_generated/lock-app/zap-generated/gen_config.h +++ b/zzz_generated/lock-app/zap-generated/gen_config.h @@ -39,6 +39,8 @@ #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OPERATIONAL_CREDENTIALS_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_POWER_SOURCE_CLUSTER_SERVER_ENDPOINT_COUNT (2) +#define EMBER_AF_POWER_SOURCE_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_SOFTWARE_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_THREAD_NETWORK_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -95,6 +97,16 @@ #define EMBER_AF_PLUGIN_OPERATIONAL_CREDENTIALS_SERVER #define EMBER_AF_PLUGIN_OPERATIONAL_CREDENTIALS +// Use this macro to check if the server side of the Power Source cluster is included +#define ZCL_USING_POWER_SOURCE_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_POWER_SOURCE_SERVER +#define EMBER_AF_PLUGIN_POWER_SOURCE + +// Use this macro to check if the server side of the Power Source Configuration cluster is included +#define ZCL_USING_POWER_SOURCE_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_POWER_SOURCE_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_POWER_SOURCE_CONFIGURATION + // Use this macro to check if the server side of the Software Diagnostics cluster is included #define ZCL_USING_SOFTWARE_DIAGNOSTICS_CLUSTER_SERVER #define EMBER_AF_PLUGIN_SOFTWARE_DIAGNOSTICS_SERVER