diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 3740ac511ff36f..721859d9022430 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -17,7 +17,7 @@ "build": { "dockerfile": "Dockerfile", "args": { - "BUILD_VERSION": "0.5.40" + "BUILD_VERSION": "0.5.43" } }, "remoteUser": "vscode", diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index 9370f617b819d5..63a7a1f4e72615 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-android:0.5.40 + image: connectedhomeip/chip-build-android:0.5.43 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml index 40e0d5355a65a2..b78dabb6281dff 100644 --- a/.github/workflows/bloat_check.yaml +++ b/.github/workflows/bloat_check.yaml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.5.40 + image: connectedhomeip/chip-build:0.5.43 steps: - name: Checkout diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 44fe6ce9cd0f43..fa74edbdb0ecd4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -32,7 +32,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.5.40 + image: connectedhomeip/chip-build:0.5.43 volumes: - "/tmp/log_output:/tmp/test_logs" options: @@ -98,7 +98,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.5.40 + image: connectedhomeip/chip-build:0.5.43 volumes: - "/tmp/log_output:/tmp/test_logs" options: @@ -205,7 +205,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.5.40 + image: connectedhomeip/chip-build:0.5.43 volumes: - "/tmp/log_output:/tmp/test_logs" options: diff --git a/.github/workflows/cirque.yaml b/.github/workflows/cirque.yaml index e6fbd6c8bd43c2..1b037fefbaecc1 100644 --- a/.github/workflows/cirque.yaml +++ b/.github/workflows/cirque.yaml @@ -29,7 +29,7 @@ jobs: timeout-minutes: 60 env: - DOCKER_RUN_VERSION: 0.5.40 + DOCKER_RUN_VERSION: 0.5.43 GITHUB_CACHE_PATH: /tmp/cirque-cache/ runs-on: ubuntu-latest @@ -38,7 +38,7 @@ jobs: # need to run with privilege, which isn't supported by job.XXX.contaner # https://github.com/actions/container-action/issues/2 # container: -# image: connectedhomeip/chip-build-cirque:0.5.40 +# image: connectedhomeip/chip-build-cirque:0.5.43 # volumes: # - "/tmp:/tmp" # - "/dev/pts:/dev/pts" diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml index 83941d82b64da9..e09fb1db8046a8 100644 --- a/.github/workflows/doxygen.yaml +++ b/.github/workflows/doxygen.yaml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: connectedhomeip/chip-build-doxygen:0.5.40 + image: connectedhomeip/chip-build-doxygen:0.5.43 if: github.actor != 'restyled-io[bot]' diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index d058866af0e6e9..624bf946713fb3 100644 --- a/.github/workflows/examples-ameba.yaml +++ b/.github/workflows/examples-ameba.yaml @@ -28,7 +28,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-ameba:0.5.40 + image: connectedhomeip/chip-build-ameba:0.5.43 options: --user root steps: diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index b34bfb0106065e..bc557d43d11438 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-efr32:0.5.40 + image: connectedhomeip/chip-build-efr32:0.5.43 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 00d86f2cdb7aca..717069b40819bd 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -32,7 +32,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32:0.5.40 + image: connectedhomeip/chip-build-esp32:0.5.43 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml index cfbefeea96d23e..aff96b707cc4c5 100644 --- a/.github/workflows/examples-infineon.yaml +++ b/.github/workflows/examples-infineon.yaml @@ -32,7 +32,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-infineon:0.5.40 + image: connectedhomeip/chip-build-infineon:0.5.43 steps: - name: Checkout diff --git a/.github/workflows/examples-k32w.yaml b/.github/workflows/examples-k32w.yaml index cada68ca75c908..b850818a530654 100644 --- a/.github/workflows/examples-k32w.yaml +++ b/.github/workflows/examples-k32w.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-k32w:0.5.40 + image: connectedhomeip/chip-build-k32w:0.5.43 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-linux-arm.yaml b/.github/workflows/examples-linux-arm.yaml index 09898224ce11af..7d83c07be51513 100644 --- a/.github/workflows/examples-linux-arm.yaml +++ b/.github/workflows/examples-linux-arm.yaml @@ -31,7 +31,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-crosscompile:0.5.40 + image: connectedhomeip/chip-build-crosscompile:0.5.43 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index 08052bdf7860fc..b13da3cf20d486 100644 --- a/.github/workflows/examples-linux-standalone.yaml +++ b/.github/workflows/examples-linux-standalone.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.5.40 + image: connectedhomeip/chip-build:0.5.43 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-mbed.yaml b/.github/workflows/examples-mbed.yaml index ebb083efb8acef..23f6af19813d2f 100644 --- a/.github/workflows/examples-mbed.yaml +++ b/.github/workflows/examples-mbed.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-mbed-os:0.5.40 + image: connectedhomeip/chip-build-mbed-os:0.5.43 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index 3ef75f5f7173da..02f49360b8ef12 100644 --- a/.github/workflows/examples-nrfconnect.yaml +++ b/.github/workflows/examples-nrfconnect.yaml @@ -80,6 +80,14 @@ jobs: nrfconnect nrf52840dk_nrf52840 lighting-app \ examples/lighting-app/nrfconnect/build/nrf52840dk_nrf52840/zephyr/zephyr.elf \ /tmp/bloat_reports/ + - name: Build example nRF Connect SDK Lighting App on nRF52840 Dongle + timeout-minutes: 10 + run: | + scripts/examples/nrfconnect_example.sh lighting-app nrf52840dongle_nrf52840 + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + nrfconnect nrf52840dongle_nrf52840 lighting-app \ + examples/lighting-app/nrfconnect/build/nrf52840dongle_nrf52840/zephyr/zephyr.elf \ + /tmp/bloat_reports/ - name: Build example nRF Connect SDK Lighting App on nRF52840 DK with RPC timeout-minutes: 10 run: | diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml index 555edda31fa26c..769fb2b3dc22d8 100644 --- a/.github/workflows/examples-qpg.yaml +++ b/.github/workflows/examples-qpg.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.5.40 + image: connectedhomeip/chip-build:0.5.43 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index 73dd6c774cd3e0..18687a9254e5c5 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -32,7 +32,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-telink:0.5.40 + image: connectedhomeip/chip-build-telink:0.5.43 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml index 06f0bfdf0dacee..265e2ff36add77 100644 --- a/.github/workflows/examples-tizen.yaml +++ b/.github/workflows/examples-tizen.yaml @@ -28,7 +28,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-tizen:0.5.40 + image: connectedhomeip/chip-build-tizen:0.5.43 options: --user root volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index 8fb83c42429701..3b55f757372b20 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32-qemu:0.5.40 + image: connectedhomeip/chip-build-esp32-qemu:0.5.43 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index a92195c022dce2..294378203b569b 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build-esp32:0.5.40 + image: connectedhomeip/chip-build-esp32:0.5.43 steps: - name: Checkout @@ -70,7 +70,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build-efr32:0.5.40 + image: connectedhomeip/chip-build-efr32:0.5.43 steps: - name: Checkout uses: actions/checkout@v2 diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 1577d0280eee0b..caefd00b4d3c72 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -43,7 +43,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.5.40 + image: connectedhomeip/chip-build:0.5.43 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" diff --git a/.github/workflows/unit_integration_test.yaml b/.github/workflows/unit_integration_test.yaml index 8d7a3044215967..f306d02ba93f0d 100644 --- a/.github/workflows/unit_integration_test.yaml +++ b/.github/workflows/unit_integration_test.yaml @@ -37,7 +37,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.5.40 + image: connectedhomeip/chip-build:0.5.43 volumes: - "/tmp/log_output:/tmp/test_logs" options: diff --git a/config/nrfconnect/chip-module/CMakeLists.txt b/config/nrfconnect/chip-module/CMakeLists.txt index 9a9ed9529afb41..857bf65ed0e21f 100644 --- a/config/nrfconnect/chip-module/CMakeLists.txt +++ b/config/nrfconnect/chip-module/CMakeLists.txt @@ -195,6 +195,11 @@ chip_gn_arg_bool ("chip_monolithic_tests" CONFIG_CHIP_BUILD_TE chip_gn_arg_bool ("chip_inet_config_enable_tcp_endpoint" CONFIG_CHIP_BUILD_TESTS) chip_gn_arg_bool ("chip_build_libshell" CONFIG_CHIP_LIB_SHELL) +if (CONFIG_CHIP_ROTATING_DEVICE_ID) + chip_gn_arg_bool ("chip_enable_rotating_device_id" "true") + chip_gn_arg_bool ("chip_enable_additional_data_advertising" "true") +endif() + if (CONFIG_CHIP_ENABLE_DNSSD_SRP) chip_gn_arg_string("chip_mdns" "platform") endif() diff --git a/config/zephyr/Kconfig b/config/zephyr/Kconfig index a390f78b429527..e3c7bdfd0a6810 100644 --- a/config/zephyr/Kconfig +++ b/config/zephyr/Kconfig @@ -108,6 +108,12 @@ config CHIP_OTA_REQUESTOR Device Firmware Upgrade by quering and downloading a new firmware image from an external OTA Provider node. +config CHIP_ROTATING_DEVICE_ID + bool "Enable rotating device ID support" + help + Enables rotating device identifier that provides a non-trackable identifier + which is unique per device and rotates at pre-defined moments. + config CHIP_OPERATIONAL_TIME_SAVE_INTERVAL int "Interval of saving node operation time to flash in hours unit" default 10 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 4c425d54ebba90..96b2b8d38b02f8 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 @@ -1357,14 +1357,14 @@ "mfgCode": null, "define": "OTA_PROVIDER_CLUSTER", "side": "client", - "enabled": 0, + "enabled": 1, "commands": [ { "name": "QueryImage", "code": 0, "mfgCode": null, "source": "client", - "incoming": 1, + "incoming": 0, "outgoing": 1 }, { @@ -1372,7 +1372,7 @@ "code": 2, "mfgCode": null, "source": "client", - "incoming": 1, + "incoming": 0, "outgoing": 1 }, { @@ -1380,8 +1380,8 @@ "code": 4, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "incoming": 0, + "outgoing": 1 } ], "attributes": [ @@ -1408,7 +1408,7 @@ "mfgCode": null, "define": "OTA_PROVIDER_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "QueryImageResponse", @@ -1626,6 +1626,57 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Power Source Configuration", "code": 46, @@ -8987,6 +9038,57 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Power Source", "code": 47, diff --git a/examples/all-clusters-app/all-clusters-common/src/ota-requestor-stub.cpp b/examples/all-clusters-app/all-clusters-common/src/ota-requestor-stub.cpp deleted file mode 100644 index ceff034374f750..00000000000000 --- a/examples/all-clusters-app/all-clusters-common/src/ota-requestor-stub.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * All rights reserved. - * - * 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. - */ - -#include -#include -#include - -using namespace chip; -using namespace chip::app; -using namespace chip::app::Clusters; -using namespace chip::app::Clusters::OtaSoftwareUpdateRequestor; - -namespace { - -class OtaSoftwareUpdateRequestorAttrAccess : public AttributeAccessInterface -{ -public: - // Register for the OTA Requestor Cluster on all endpoints. - OtaSoftwareUpdateRequestorAttrAccess() : - AttributeAccessInterface(Optional::Missing(), OtaSoftwareUpdateRequestor::Id) - {} - - CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; - CHIP_ERROR Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override; -}; - -OtaSoftwareUpdateRequestorAttrAccess gAttrAccess; - -CHIP_ERROR OtaSoftwareUpdateRequestorAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) -{ - switch (aPath.mAttributeId) - { - case Attributes::DefaultOtaProviders::Id: - return aEncoder.Encode(DataModel::List()); - default: - break; - } - - return CHIP_NO_ERROR; -} - -CHIP_ERROR OtaSoftwareUpdateRequestorAttrAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) -{ - switch (aPath.mAttributeId) - { - case Attributes::DefaultOtaProviders::Id: { - DataModel::DecodableList list; - ReturnErrorOnFailure(aDecoder.Decode(list)); - break; - } - default: - break; - } - return CHIP_NO_ERROR; -} - -} // namespace - -bool emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::DecodableType & commandData) -{ - return false; -} - -// ----------------------------------------------------------------------------- -// Plugin initialization - -void MatterOtaSoftwareUpdateRequestorPluginServerInitCallback(void) -{ - registerAttributeAccessOverride(&gAttrAccess); -} diff --git a/examples/all-clusters-app/ameba/chip_main.cmake b/examples/all-clusters-app/ameba/chip_main.cmake index fa03acfbd1673c..cb86b9f8b23d34 100755 --- a/examples/all-clusters-app/ameba/chip_main.cmake +++ b/examples/all-clusters-app/ameba/chip_main.cmake @@ -121,7 +121,6 @@ list( ${chip_dir}/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp - ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/ota-requestor-stub.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp ${chip_dir}/examples/all-clusters-app/ameba/main/chipinterface.cpp diff --git a/examples/all-clusters-app/esp32/main/CMakeLists.txt b/examples/all-clusters-app/esp32/main/CMakeLists.txt index f35386484bc48d..ae22ec44a75888 100644 --- a/examples/all-clusters-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/main/CMakeLists.txt @@ -49,6 +49,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/window-covering-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general-commissioning-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/network-commissioning-old" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/network-commissioning" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/groups-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/color-control-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/content-launch-server" @@ -58,7 +59,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/low-power-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/keypad-input-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/media-playback-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ota-provider" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ota-requestor" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/target-navigator-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thermostat-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thermostat-user-interface-configuration-server" @@ -76,6 +77,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/occupancy-sensor-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ias-zone-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ethernet-network-diagnostics-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/localization-configuration-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/wifi-network-diagnostics-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/wake-on-lan-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/pump-configuration-and-control-server" diff --git a/examples/all-clusters-app/esp32/main/main.cpp b/examples/all-clusters-app/esp32/main/main.cpp index c1ac76f8c57818..93cabf8dbbaea2 100644 --- a/examples/all-clusters-app/esp32/main/main.cpp +++ b/examples/all-clusters-app/esp32/main/main.cpp @@ -50,6 +50,11 @@ #include #include #include +#include +#include +#include +#include +#include #include #include #include @@ -62,12 +67,12 @@ #include #include #include +#include +#include +#include #include #include -#include -#include - #if CONFIG_ENABLE_PW_RPC #include "Rpc.h" #endif @@ -122,6 +127,13 @@ std::vector button_gpios = { BUTTON_1_GPIO_NUM, BUTTON_2_GPIO_NUM, B #endif +#if CONFIG_ENABLE_OTA_REQUESTOR +OTARequestor gRequestorCore; +GenericOTARequestorDriver gRequestorUser; +BDXDownloader gDownloader; +OTAImageProcessorImpl gImageProcessor; +#endif + // Pretend these are devices with endpoints with clusters with attributes typedef std::tuple Attribute; typedef std::vector Attributes; @@ -133,6 +145,16 @@ typedef std::tuple Device; typedef std::vector Devices; Devices devices; +namespace { +app::Clusters::NetworkCommissioning::Instance + sWiFiNetworkCommissioningInstance(0 /* Endpoint Id */, &(NetworkCommissioning::ESPWiFiDriver::GetInstance())); +} // namespace + +void NetWorkCommissioningInstInit() +{ + sWiFiNetworkCommissioningInstance.Init(); +} + void AddAttribute(std::string name, std::string value) { Attribute attribute = std::make_tuple(std::move(name), std::move(value)); @@ -513,10 +535,23 @@ static void InitServer(intptr_t context) // Initialize device attestation config SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); - + NetWorkCommissioningInstInit(); SetupPretendDevices(); } +static void InitOTARequestor(void) +{ +#if CONFIG_ENABLE_OTA_REQUESTOR + SetRequestorInstance(&gRequestorCore); + gRequestorCore.SetServerInstance(&Server::GetInstance()); + gRequestorCore.SetOtaRequestorDriver(&gRequestorUser); + gImageProcessor.SetOTADownloader(&gDownloader); + gDownloader.SetImageProcessorDelegate(&gImageProcessor); + gRequestorUser.Init(&gRequestorCore, &gImageProcessor); + gRequestorCore.SetBDXDownloader(&gDownloader); +#endif +} + extern "C" void app_main() { ESP_LOGI(TAG, "All Clusters Demo!"); @@ -575,6 +610,8 @@ extern "C" void app_main() // Print QR Code URL PrintOnboardingCodes(chip::RendezvousInformationFlags(CONFIG_RENDEZVOUS_MODE)); + InitOTARequestor(); + #if CONFIG_HAVE_DISPLAY std::string qrCodeText; diff --git a/examples/all-clusters-app/linux/BUILD.gn b/examples/all-clusters-app/linux/BUILD.gn index 9f2870d976d65b..3e700fd1af5b5e 100644 --- a/examples/all-clusters-app/linux/BUILD.gn +++ b/examples/all-clusters-app/linux/BUILD.gn @@ -18,7 +18,6 @@ import("//build_overrides/chip.gni") executable("chip-all-clusters-app") { sources = [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/ota-requestor-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "include/tv-callbacks.cpp", "include/tv-callbacks.h", diff --git a/examples/all-clusters-app/mbed/CMakeLists.txt b/examples/all-clusters-app/mbed/CMakeLists.txt index 03798b5d4d2258..809b98c0b5e5d5 100644 --- a/examples/all-clusters-app/mbed/CMakeLists.txt +++ b/examples/all-clusters-app/mbed/CMakeLists.txt @@ -43,7 +43,6 @@ target_include_directories(${APP_TARGET} PRIVATE ${CHIP_ROOT}/src/app ${CHIP_ROOT}/third_party/nlio/repo/include ${GEN_DIR}/all-clusters-app - ${GEN_DIR}/ota-provider-app ${GEN_DIR}/app-common ) @@ -68,7 +67,6 @@ target_sources(${APP_TARGET} PRIVATE ${CHIP_ROOT}/src/app/server/CommissioningWindowManager.cpp ${CHIP_ROOT}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp - ${CHIP_ROOT}/examples/all-clusters-app/all-clusters-common/src/ota-requestor-stub.cpp ${CHIP_ROOT}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp ${APP_UTIL}/DataModelHandler.cpp @@ -111,13 +109,13 @@ target_sources(${APP_TARGET} PRIVATE ${APP_CLUSTERS}/keypad-input-server/keypad-input-server.cpp ${APP_CLUSTERS}/level-control/level-control.cpp ${APP_CLUSTERS}/low-power-server/low-power-server.cpp + ${APP_CLUSTERS}/localization-configuration-server/localization-configuration-server.cpp ${APP_CLUSTERS}/media-input-server/media-input-server.cpp ${APP_CLUSTERS}/media-playback-server/media-playback-server.cpp ${APP_CLUSTERS}/mode-select-server/mode-select-server.cpp ${APP_CLUSTERS}/network-commissioning-old/network-commissioning-ember.cpp ${APP_CLUSTERS}/network-commissioning-old/network-commissioning-old.cpp ${APP_CLUSTERS}/on-off-server/on-off-server.cpp - ${APP_CLUSTERS}/ota-provider/ota-provider.cpp ${APP_CLUSTERS}/scenes/scenes.cpp ${APP_CLUSTERS}/switch-server/switch-server.cpp ${APP_CLUSTERS}/target-navigator-server/target-navigator-server.cpp @@ -140,6 +138,9 @@ target_sources(${APP_TARGET} PRIVATE ${APP_CLUSTERS}/general-diagnostics-server/general-diagnostics-server.cpp ${APP_CLUSTERS}/group-key-mgmt-server/group-key-mgmt-server.cpp ${APP_CLUSTERS}/power-source-configuration-server/power-source-configuration-server.cpp + ${APP_CLUSTERS}/ota-requestor/ota-requestor-server.cpp + ${APP_CLUSTERS}/ota-requestor/BDXDownloader.cpp + ${APP_CLUSTERS}/ota-requestor/OTARequestor.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/all-clusters-app/mbed/mbed_app.json b/examples/all-clusters-app/mbed/mbed_app.json index be14989fe20fb1..6271cbc091cf58 100644 --- a/examples/all-clusters-app/mbed/mbed_app.json +++ b/examples/all-clusters-app/mbed/mbed_app.json @@ -18,8 +18,7 @@ "MXCRYPTO_DISABLED", "NL_ASSERT_LOG=NL_ASSERT_LOG_DEFAULT", "NL_ASSERT_EXPECT_FLAGS=NL_ASSERT_FLAG_LOG", - "WHD_PRINT_DISABLE", - "MBED_CONF_LWIP_NETBUF_RECVINFO_ENABLED" + "WHD_PRINT_DISABLE" ] } }, diff --git a/examples/all-clusters-app/p6/BUILD.gn b/examples/all-clusters-app/p6/BUILD.gn index ccd4ac152789de..5b99c3f3b3b6f6 100644 --- a/examples/all-clusters-app/p6/BUILD.gn +++ b/examples/all-clusters-app/p6/BUILD.gn @@ -61,7 +61,6 @@ p6_executable("clusters_app") { sources = [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/ota-requestor-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${examples_plat_dir}/LEDWidget.cpp", "${examples_plat_dir}/init_p6Platform.cpp", diff --git a/examples/bridge-app/bridge-common/bridge-app.zap b/examples/bridge-app/bridge-common/bridge-app.zap index 79aa436e01699c..8797f9f2f9e7dc 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -365,6 +365,57 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "General Commissioning", "code": 48, @@ -4493,5 +4544,6 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/bridge-app/esp32/main/CMakeLists.txt b/examples/bridge-app/esp32/main/CMakeLists.txt index ee2ca2f5cab616..697feecf78abb7 100644 --- a/examples/bridge-app/esp32/main/CMakeLists.txt +++ b/examples/bridge-app/esp32/main/CMakeLists.txt @@ -30,6 +30,7 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/level-control" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/diagnostic-logs-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ethernet-network-diagnostics-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/localization-configuration-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/fixed-label-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/user-label-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thread-network-diagnostics-server" diff --git a/examples/chip-tool/BUILD.gn b/examples/chip-tool/BUILD.gn index 4b06c0eaba8589..7b2fb7081f1d00 100644 --- a/examples/chip-tool/BUILD.gn +++ b/examples/chip-tool/BUILD.gn @@ -37,6 +37,8 @@ config("config") { static_library("chip-tool-utils") { sources = [ + "${chip_root}/src/app/tests/suites/include/ConstraintsChecker.h", + "${chip_root}/src/app/tests/suites/include/ValueChecker.h", "commands/clusters/ModelCommand.cpp", "commands/common/CHIPCommand.cpp", "commands/common/CHIPCommand.h", @@ -63,6 +65,7 @@ static_library("chip-tool-utils") { deps = [ "${chip_root}/src/app/server", + "${chip_root}/src/app/tests/suites/commands/log", "${chip_root}/src/app/tests/suites/pics", "${chip_root}/src/controller/data_model", "${chip_root}/src/lib", @@ -87,6 +90,7 @@ executable("chip-tool") { deps = [ ":chip-tool-utils", "${chip_root}/src/app/server", + "${chip_root}/src/app/tests/suites/commands/log", "${chip_root}/src/app/tests/suites/pics", "${chip_root}/src/controller/data_model", "${chip_root}/src/lib", diff --git a/examples/chip-tool/commands/common/CommandInvoker.h b/examples/chip-tool/commands/common/CommandInvoker.h index e51f141a50ea5b..fa16362d3e696a 100644 --- a/examples/chip-tool/commands/common/CommandInvoker.h +++ b/examples/chip-tool/commands/common/CommandInvoker.h @@ -115,9 +115,11 @@ class CommandInvoker final : public ResponseReceiverSendCommandRequest(session)); + ReturnErrorOnFailure(commandSender->SendCommandRequest(session.Value())); commandSender.release(); + exchangeManager->GetSessionManager()->RemoveGroupSession(session.Value()->AsGroupSession()); + return CHIP_NO_ERROR; } }; diff --git a/examples/chip-tool/commands/tests/TestCommand.cpp b/examples/chip-tool/commands/tests/TestCommand.cpp index 70af22f64663cb..72d4fdc870d40d 100644 --- a/examples/chip-tool/commands/tests/TestCommand.cpp +++ b/examples/chip-tool/commands/tests/TestCommand.cpp @@ -65,20 +65,6 @@ CHIP_ERROR TestCommand::Wait(chip::System::Clock::Timeout duration) return chip::DeviceLayer::SystemLayer().StartTimer(duration, OnWaitForMsFn, this); } -CHIP_ERROR TestCommand::Log(const char * message) -{ - ChipLogDetail(chipTool, "%s", message); - ReturnErrorOnFailure(ContinueOnChipMainThread()); - return CHIP_NO_ERROR; -} - -CHIP_ERROR TestCommand::UserPrompt(const char * message) -{ - ChipLogDetail(chipTool, "USER_PROMPT: %s", message); - ReturnErrorOnFailure(ContinueOnChipMainThread()); - return CHIP_NO_ERROR; -} - void TestCommand::Exit(std::string message) { ChipLogError(chipTool, " ***** Test Failure: %s\n", message.c_str()); @@ -94,103 +80,3 @@ void TestCommand::ThrowSuccessResponse() { Exit("Expecting failure response but got a success response"); } - -bool TestCommand::CheckConstraintType(const char * itemName, const char * current, const char * expected) -{ - ChipLogError(chipTool, "Warning: %s type checking is not implemented yet. Expected type: '%s'", itemName, expected); - return true; -} - -bool TestCommand::CheckConstraintFormat(const char * itemName, const char * current, const char * expected) -{ - ChipLogError(chipTool, "Warning: %s format checking is not implemented yet. Expected format: '%s'", itemName, expected); - return true; -} - -bool TestCommand::CheckConstraintStartsWith(const char * itemName, const chip::Span current, const char * expected) -{ - std::string value(current.data(), current.size()); - if (value.rfind(expected, 0) != 0) - { - Exit(std::string(itemName) + " (\"" + value + "\") does not starts with: \"" + std::string(expected) + "\""); - return false; - } - - return true; -} - -bool TestCommand::CheckConstraintEndsWith(const char * itemName, const chip::Span current, const char * expected) -{ - std::string value(current.data(), current.size()); - if (value.find(expected, value.size() - strlen(expected)) == std::string::npos) - { - Exit(std::string(itemName) + " (\"" + value + "\") does not ends with: \"" + std::string(expected) + "\""); - return false; - } - - return true; -} - -bool TestCommand::CheckConstraintMinLength(const char * itemName, uint64_t current, uint64_t expected) -{ - if (current < expected) - { - Exit(std::string(itemName) + " length < minLength: " + std::to_string(current) + " < " + std::to_string(expected)); - return false; - } - - return true; -} - -bool TestCommand::CheckConstraintMaxLength(const char * itemName, uint64_t current, uint64_t expected) -{ - if (current > expected) - { - Exit(std::string(itemName) + " length > minLength: " + std::to_string(current) + " > " + std::to_string(expected)); - return false; - } - - return true; -} - -bool TestCommand::CheckValueAsString(const char * itemName, chip::ByteSpan current, chip::ByteSpan expected) -{ - if (!current.data_equal(expected)) - { - Exit(std::string(itemName) + " value mismatch, expecting " + - std::string(chip::Uint8::to_const_char(expected.data()), expected.size())); - return false; - } - - return true; -} - -bool TestCommand::CheckValueAsString(const char * itemName, chip::CharSpan current, chip::CharSpan expected) -{ - if (!current.data_equal(expected)) - { - Exit(std::string(itemName) + " value mismatch, expected '" + std::string(expected.data(), expected.size()) + "' but got '" + - std::string(current.data(), current.size()) + "'"); - return false; - } - - return true; -} - -bool TestCommand::ShouldSkip(const char * expression) -{ - // If there is no PICS configuration file, considers that nothing should be skipped. - if (!PICS.HasValue()) - { - return false; - } - - std::map pics(PICS.Value()); - bool shouldSkip = !PICSBooleanExpressionParser::Eval(expression, pics); - if (shouldSkip) - { - ChipLogProgress(chipTool, " **** Skipping: %s == false\n", expression); - ContinueOnChipMainThread(); - } - return shouldSkip; -} diff --git a/examples/chip-tool/commands/tests/TestCommand.h b/examples/chip-tool/commands/tests/TestCommand.h index 3926ea24816486..28e203b9139ace 100644 --- a/examples/chip-tool/commands/tests/TestCommand.h +++ b/examples/chip-tool/commands/tests/TestCommand.h @@ -19,19 +19,16 @@ #pragma once #include "../common/CHIPCommand.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include #include -#include #include -constexpr uint16_t kTimeoutInSeconds = 30; +constexpr uint16_t kTimeoutInSeconds = 90; -class TestCommand : public CHIPCommand +class TestCommand : public CHIPCommand, public ValueChecker, public ConstraintsChecker, public PICSChecker, public LogCommands { public: TestCommand(const char * commandName) : @@ -43,6 +40,8 @@ class TestCommand : public CHIPCommand AddArgument("PICS", &mPICSFilePath); } + ~TestCommand(){}; + /////////// CHIPCommand Interface ///////// CHIP_ERROR RunCommand() override; chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(kTimeoutInSeconds); } @@ -53,8 +52,6 @@ class TestCommand : public CHIPCommand CHIP_ERROR Wait(chip::System::Clock::Timeout ms); CHIP_ERROR WaitForMs(uint16_t ms) { return Wait(chip::System::Clock::Milliseconds32(ms)); } CHIP_ERROR WaitForCommissionee(); - CHIP_ERROR Log(const char * message); - CHIP_ERROR UserPrompt(const char * message); protected: std::map mDevices; @@ -64,224 +61,15 @@ class TestCommand : public CHIPCommand static void OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR error); static void OnWaitForMsFn(chip::System::Layer * systemLayer, void * context); - CHIP_ERROR ContinueOnChipMainThread() { return WaitForMs(0); }; + CHIP_ERROR ContinueOnChipMainThread() override { return WaitForMs(0); }; - void Exit(std::string message); + void Exit(std::string message) override; void ThrowFailureResponse(); void ThrowSuccessResponse(); - bool CheckConstraintType(const char * itemName, const char * current, const char * expected); - bool CheckConstraintFormat(const char * itemName, const char * current, const char * expected); - bool CheckConstraintMinLength(const char * itemName, uint64_t current, uint64_t expected); - bool CheckConstraintMaxLength(const char * itemName, uint64_t current, uint64_t expected); - bool CheckConstraintStartsWith(const char * itemName, const chip::Span current, const char * expected); - bool CheckConstraintEndsWith(const char * itemName, const chip::Span current, const char * expected); - template - bool CheckConstraintMinValue(const char * itemName, T current, T expected) - { - if (current < expected) - { - Exit(std::string(itemName) + " value < minValue: " + std::to_string(current) + " < " + std::to_string(expected)); - return false; - } - - return true; - } - template - bool CheckConstraintMinValue(const char * itemName, const chip::app::DataModel::Nullable & current, U expected) - { - if (current.IsNull()) - { - return true; - } - return CheckConstraintMinValue(itemName, current.Value(), static_cast(expected)); - } - template - bool CheckConstraintMaxValue(const char * itemName, T current, T expected) - { - if (current > expected) - { - Exit(std::string(itemName) + " value > maxValue: " + std::to_string(current) + " > " + std::to_string(expected)); - return false; - } - - return true; - } - template - bool CheckConstraintMaxValue(const char * itemName, const chip::app::DataModel::Nullable & current, U expected) - { - if (current.IsNull()) - { - return true; - } - return CheckConstraintMaxValue(itemName, current.Value(), static_cast(expected)); - } - template - bool CheckConstraintNotValue(const char * itemName, T current, U expected) - { - if (current == expected) - { - Exit(std::string(itemName) + " got unexpected value: " + std::to_string(current)); - return false; - } - - return true; - } - template - bool CheckConstraintNotValue(const char * itemName, const chip::app::DataModel::Nullable & current, U expected) - { - if (current.IsNull()) - { - return true; - } - return CheckConstraintNotValue(itemName, current.Value(), expected); - } - - bool CheckConstraintNotValue(const char * itemName, chip::CharSpan current, chip::CharSpan expected) - { - if (current.data_equal(expected)) - { - Exit(std::string(itemName) + " got unexpected value: " + std::string(current.data(), current.size())); - return false; - } - - return true; - } - - bool CheckConstraintNotValue(const char * itemName, chip::ByteSpan current, chip::ByteSpan expected) - { - if (current.data_equal(expected)) - { - Exit(std::string(itemName) + " got unexpected value of size: " + std::to_string(current.size())); - return false; - } - - return true; - } - - // Allow a different expected type from the actual value type, because if T - // is short the literal we are using is not short-typed. - template ::value, int> = 0> - bool CheckValue(const char * itemName, T current, U expected) - { - if (current != expected) - { - Exit(std::string(itemName) + " value mismatch: expected " + std::to_string(expected) + " but got " + - std::to_string(current)); - return false; - } - - return true; - } - - template - bool CheckValue(const char * itemName, chip::BitFlags current, U expected) - { - return CheckValue(itemName, current.Raw(), expected); - } - - template ::value, int> = 0> - bool CheckValue(const char * itemName, T current, U expected) - { - return CheckValue(itemName, chip::to_underlying(current), expected); - } - - /** - * Check that the next list item, which is at index "index", exists and - * decodes properly. - */ - template - bool CheckNextListItemDecodes(const char * listName, typename std::remove_reference_t::Iterator & iter, size_t index) - { - bool hasValue = iter.Next(); - if (iter.GetStatus() != CHIP_NO_ERROR) - { - Exit(std::string(listName) + " value mismatch: error '" + iter.GetStatus().AsString() + "'decoding item at index " + - std::to_string(index)); - return false; - } - - if (hasValue) - { - return true; - } - - Exit(std::string(listName) + " value mismatch: should have value at index " + std::to_string(index) + - " but doesn't (actual value too short)"); - return false; - } - - /** - * Check that there are no more list items now that we have seen - * "expectedCount" of them. - */ - template - bool CheckNoMoreListItems(const char * listName, typename std::remove_reference_t::Iterator & iter, - size_t expectedCount) - { - bool hasValue = iter.Next(); - if (iter.GetStatus() != CHIP_NO_ERROR) - { - Exit(std::string(listName) + " value mismatch: error '" + iter.GetStatus().AsString() + - "'decoding item after we have seen " + std::to_string(expectedCount) + " items"); - return false; - } - - if (!hasValue) - { - return true; - } - - Exit(std::string(listName) + " value mismatch: expected only " + std::to_string(expectedCount) + - " items, but have more than that (actual value too long)"); - return false; - } - - bool CheckValueAsString(const char * itemName, chip::ByteSpan current, chip::ByteSpan expected); - - bool CheckValueAsString(const char * itemName, chip::CharSpan current, chip::CharSpan expected); - - template - bool CheckValuePresent(const char * itemName, const chip::Optional & value) - { - if (value.HasValue()) - { - return true; - } - - Exit(std::string(itemName) + " expected to have value but doesn't"); - return false; - } - - template - bool CheckValueNull(const char * itemName, const chip::app::DataModel::Nullable & value) - { - if (value.IsNull()) - { - return true; - } - - Exit(std::string(itemName) + " expected to be null but isn't"); - return false; - } - - template - bool CheckValueNonNull(const char * itemName, const chip::app::DataModel::Nullable & value) - { - if (!value.IsNull()) - { - return true; - } - - Exit(std::string(itemName) + " expected to not be null but is"); - return false; - } - chip::Callback::Callback mOnDeviceConnectedCallback; chip::Callback::Callback mOnDeviceConnectionFailureCallback; - bool ShouldSkip(const char * expression); - void Wait() { if (mDelayInMs.HasValue()) @@ -293,5 +81,4 @@ class TestCommand : public CHIPCommand chip::Optional mPICSFilePath; chip::Optional mEndpointId; chip::Optional mTimeout; - chip::Optional> PICS; }; diff --git a/examples/chip-tool/templates/commands.zapt b/examples/chip-tool/templates/commands.zapt index 52b80012429e8f..e8d04e9c789e16 100644 --- a/examples/chip-tool/templates/commands.zapt +++ b/examples/chip-tool/templates/commands.zapt @@ -22,9 +22,17 @@ // generated ones, so are placed here. namespace { +{{#zcl_structs}} +{{#if has_more_than_one_cluster}} +CHIP_ERROR LogValue(const char * label, size_t indent, {{zapTypeToDecodableClusterObjectType name ns="detail" isArgument=true}} value); +{{/if}} +{{/zcl_structs}} + {{#zcl_clusters}} {{#zcl_structs}} +{{#unless has_more_than_one_cluster}} CHIP_ERROR LogValue(const char * label, size_t indent, {{zapTypeToDecodableClusterObjectType name ns=parent.name isArgument=true}} value); +{{/unless}} {{/zcl_structs}} {{/zcl_clusters}} @@ -145,24 +153,17 @@ CHIP_ERROR LogValue(const char * label, size_t indent, const chip::Optional & // be logging. #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-function" +{{#zcl_structs}} +{{#if has_more_than_one_cluster}} +{{> log_struct_value ns="detail"}} +{{/if}} +{{/zcl_structs}} + {{#zcl_clusters}} {{#zcl_structs}} -CHIP_ERROR LogValue(const char * label, size_t indent, {{zapTypeToDecodableClusterObjectType name ns=parent.name isArgument=true}} value) -{ - ChipLogProgress(chipTool, "%s%s: {", IndentStr(indent).c_str(), label); -{{#zcl_struct_items}} - { - CHIP_ERROR err = LogValue("{{asUpperCamelCase label}}", indent + 1, value.{{asLowerCamelCase label}}); - if (err != CHIP_NO_ERROR) - { - ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for '{{asUpperCamelCase label}}'", IndentStr(indent + 1).c_str()); - return err; - } - } -{{/zcl_struct_items}} - ChipLogProgress(chipTool, "%s}", IndentStr(indent).c_str()); - return CHIP_NO_ERROR; -} +{{#unless has_more_than_one_cluster}} +{{> log_struct_value ns=parent.name}} +{{/unless}} {{/zcl_structs}} {{/zcl_clusters}} #pragma GCC diagnostic pop diff --git a/examples/chip-tool/templates/partials/log_struct_value.zapt b/examples/chip-tool/templates/partials/log_struct_value.zapt new file mode 100644 index 00000000000000..33d6b9561cebe1 --- /dev/null +++ b/examples/chip-tool/templates/partials/log_struct_value.zapt @@ -0,0 +1,16 @@ +CHIP_ERROR LogValue(const char * label, size_t indent, {{zapTypeToDecodableClusterObjectType name ns=ns isArgument=true}} value) +{ + ChipLogProgress(chipTool, "%s%s: {", IndentStr(indent).c_str(), label); +{{#zcl_struct_items}} + { + CHIP_ERROR err = LogValue("{{asUpperCamelCase label}}", indent + 1, value.{{asLowerCamelCase label}}); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for '{{asUpperCamelCase label}}'", IndentStr(indent + 1).c_str()); + return err; + } + } +{{/zcl_struct_items}} + ChipLogProgress(chipTool, "%s}", IndentStr(indent).c_str()); + return CHIP_NO_ERROR; +} diff --git a/examples/chip-tool/templates/partials/test_cluster.zapt b/examples/chip-tool/templates/partials/test_cluster.zapt index 0a0a24fdf81835..360fa4656998a8 100644 --- a/examples/chip-tool/templates/partials/test_cluster.zapt +++ b/examples/chip-tool/templates/partials/test_cluster.zapt @@ -41,7 +41,14 @@ class {{filename}}: public TestCommand {{#chip_tests_items}} case {{index}}: ChipLogProgress(chipTool, " ***** Test Step {{index}} : {{label}}\n"); - err = {{#if PICS}}ShouldSkip("{{PICS}}") ? CHIP_NO_ERROR : {{/if}}Test{{asUpperCamelCase label}}_{{index}}(); + {{#if PICS}} + if (ShouldSkip("{{PICS}}")) + { + NextTest(); + return; + } + {{/if}} + err = Test{{asUpperCamelCase label}}_{{index}}(); break; {{/chip_tests_items}} } @@ -325,18 +332,23 @@ class {{filename}}: public TestCommand {{~#*inline "item"}}{{asLowerCamelCase name}}{{/inline}} VerifyOrReturn(CheckValuePresent("{{> item}}", {{> item}})); {{/if}} - {{#if expectedConstraints.type}}VerifyOrReturn(CheckConstraintType("{{>item}}", "", "{{expectedConstraints.type}}"));{{/if}} - {{~#if expectedConstraints.format}}VerifyOrReturn(CheckConstraintFormat("{{>item}}", "", "{{expectedConstraints.format}}"));{{/if}} - {{~#if expectedConstraints.startsWith}}VerifyOrReturn(CheckConstraintStartsWith("{{>item}}", {{>item}}, "{{expectedConstraints.startsWith}}"));{{/if}} - {{~#if expectedConstraints.endsWith}}VerifyOrReturn(CheckConstraintEndsWith("{{>item}}", {{>item}}, "{{expectedConstraints.endsWith}}"));{{/if}} - {{~#if expectedConstraints.minLength}}VerifyOrReturn(CheckConstraintMinLength("{{>item}}", {{>item}}.size(), {{expectedConstraints.minLength}}));{{/if}} - {{~#if expectedConstraints.maxLength}}VerifyOrReturn(CheckConstraintMaxLength("{{>item}}", {{>item}}.size(), {{expectedConstraints.maxLength}}));{{/if}} - {{~#if expectedConstraints.minValue}}VerifyOrReturn(CheckConstraintMinValue<{{chipType}}>("{{>item}}", {{>item}}, {{asTypedLiteral expectedConstraints.minValue type}}));{{/if}} - {{~#if expectedConstraints.maxValue}}VerifyOrReturn(CheckConstraintMaxValue<{{chipType}}>("{{>item}}", {{>item}}, {{asTypedLiteral expectedConstraints.maxValue type}}));{{/if}} - {{~#if expectedConstraints.notValue}} - VerifyOrReturn(CheckConstraintNotValue("{{>item}}", {{>item}}, {{asTypedLiteral expectedConstraints.notValue type}})); - {{else if (isLiteralNull expectedConstraints.notValue)}} + {{#if (hasProperty expectedConstraints "type")}}VerifyOrReturn(CheckConstraintType("{{>item}}", "", "{{expectedConstraints.type}}"));{{/if}} + {{~#if (hasProperty expectedConstraints "format")}}VerifyOrReturn(CheckConstraintFormat("{{>item}}", "", "{{expectedConstraints.format}}"));{{/if}} + {{~#if (hasProperty expectedConstraints "startsWith")}}VerifyOrReturn(CheckConstraintStartsWith("{{>item}}", {{>item}}, "{{expectedConstraints.startsWith}}"));{{/if}} + {{~#if (hasProperty expectedConstraints "endsWith")}}VerifyOrReturn(CheckConstraintEndsWith("{{>item}}", {{>item}}, "{{expectedConstraints.endsWith}}"));{{/if}} + {{~#if (hasProperty expectedConstraints "isUpperCase")}}VerifyOrReturn(CheckConstraintIsUpperCase("{{>item}}", {{>item}}, {{expectedConstraints.isUpperCase}}));{{/if}} + {{~#if (hasProperty expectedConstraints "isLowerCase")}}VerifyOrReturn(CheckConstraintIsLowerCase("{{>item}}", {{>item}}, {{expectedConstraints.isLowerCase}}));{{/if}} + {{~#if (hasProperty expectedConstraints "isHexString")}}VerifyOrReturn(CheckConstraintIsHexString("{{>item}}", {{>item}}, {{expectedConstraints.isHexString}}));{{/if}} + {{~#if (hasProperty expectedConstraints "minLength")}}VerifyOrReturn(CheckConstraintMinLength("{{>item}}", {{>item}}.size(), {{expectedConstraints.minLength}}));{{/if}} + {{~#if (hasProperty expectedConstraints "maxLength")}}VerifyOrReturn(CheckConstraintMaxLength("{{>item}}", {{>item}}.size(), {{expectedConstraints.maxLength}}));{{/if}} + {{~#if (hasProperty expectedConstraints "minValue")}}VerifyOrReturn(CheckConstraintMinValue<{{chipType}}>("{{>item}}", {{>item}}, {{asTypedLiteral expectedConstraints.minValue type}}));{{/if}} + {{~#if (hasProperty expectedConstraints "maxValue")}}VerifyOrReturn(CheckConstraintMaxValue<{{chipType}}>("{{>item}}", {{>item}}, {{asTypedLiteral expectedConstraints.maxValue type}}));{{/if}} + {{~#if (hasProperty expectedConstraints "notValue")}} + {{#if (isLiteralNull expectedConstraints.notValue)}} VerifyOrReturn(CheckValueNonNull("{{>item}}", {{>item}})); + {{else}} + VerifyOrReturn(CheckConstraintNotValue("{{>item}}", {{>item}}, {{asTypedLiteral expectedConstraints.notValue type}})); + {{/if}} {{/if}} {{/if}} diff --git a/examples/chip-tool/templates/partials/test_cluster_value_equals.zapt b/examples/chip-tool/templates/partials/test_cluster_value_equals.zapt index 34c9a09757914b..2f2d6b8a80415e 100644 --- a/examples/chip-tool/templates/partials/test_cluster_value_equals.zapt +++ b/examples/chip-tool/templates/partials/test_cluster_value_equals.zapt @@ -23,7 +23,7 @@ type/optionality/nullability information for them for our recursive call. }} {{#zcl_struct_items_by_struct_name type}} - {{#if (expectedValueHasProp ../expected label)}} + {{#if (hasProperty ../expected label)}} {{>valueEquals label=(concat ../label "." (asLowerCamelCase label)) actual=(concat ../actual "." (asLowerCamelCase label)) expected=(lookup ../expected label) depth=(incrementDepth depth)}} {{/if}} {{/zcl_struct_items_by_struct_name}} diff --git a/examples/chip-tool/templates/templates.json b/examples/chip-tool/templates/templates.json index e56bcf9f99c1f5..cda0394f4b7ea4 100644 --- a/examples/chip-tool/templates/templates.json +++ b/examples/chip-tool/templates/templates.json @@ -35,6 +35,10 @@ { "name": "valueEquals", "path": "partials/test_cluster_value_equals.zapt" + }, + { + "name": "log_struct_value", + "path": "partials/log_struct_value.zapt" } ], "templates": [ diff --git a/examples/door-lock-app/door-lock-common/door-lock-app.zap b/examples/door-lock-app/door-lock-common/door-lock-app.zap index fee9a5287e34e7..2005037317d9cf 100644 --- a/examples/door-lock-app/door-lock-common/door-lock-app.zap +++ b/examples/door-lock-app/door-lock-common/door-lock-app.zap @@ -1159,6 +1159,57 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Power Source Configuration", "code": 46, diff --git a/examples/lighting-app/efr32/args.gni b/examples/lighting-app/efr32/args.gni index 1b73ad66dcea58..0f2b60d59f6054 100644 --- a/examples/lighting-app/efr32/args.gni +++ b/examples/lighting-app/efr32/args.gni @@ -22,3 +22,4 @@ pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" pw_assert_BACKEND = "$dir_pw_assert_log" chip_enable_openthread = true chip_openthread_ftd = true +chip_system_config_use_open_thread_udp = true diff --git a/examples/lighting-app/esp32/main/CMakeLists.txt b/examples/lighting-app/esp32/main/CMakeLists.txt index f4a667cd42fb53..fa544eadb52424 100644 --- a/examples/lighting-app/esp32/main/CMakeLists.txt +++ b/examples/lighting-app/esp32/main/CMakeLists.txt @@ -42,6 +42,7 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general-commissioning-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general-diagnostics-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/identify-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/localization-configuration-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/level-control" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/network-commissioning-old" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/occupancy-sensor-server" diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index a0f66f9986e364..bc7f5e82de85cd 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -1344,6 +1344,57 @@ ], "attributes": [] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "General Commissioning", "code": 48, @@ -6686,5 +6737,6 @@ "endpointVersion": 1, "deviceIdentifier": 259 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/lighting-app/mbed/CMakeLists.txt b/examples/lighting-app/mbed/CMakeLists.txt index e79b8e443772e9..5c90f5e4a644a3 100644 --- a/examples/lighting-app/mbed/CMakeLists.txt +++ b/examples/lighting-app/mbed/CMakeLists.txt @@ -80,6 +80,7 @@ target_sources(${APP_TARGET} PRIVATE ${CHIP_ROOT}/src/app/clusters/identify-server/identify-server.cpp ${CHIP_ROOT}/src/app/clusters/diagnostic-logs-server/diagnostic-logs-server.cpp ${CHIP_ROOT}/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp + ${CHIP_ROOT}/src/app/clusters/localization-configuration-server/localization-configuration-server.cpp ${CHIP_ROOT}/src/app/clusters/fixed-label-server/fixed-label-server.cpp ${CHIP_ROOT}/src/app/clusters/user-label-server/user-label-server.cpp ${CHIP_ROOT}/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-server.cpp diff --git a/examples/lighting-app/mbed/mbed_app.json b/examples/lighting-app/mbed/mbed_app.json index aaad97efcdf73f..ae32541fccad62 100644 --- a/examples/lighting-app/mbed/mbed_app.json +++ b/examples/lighting-app/mbed/mbed_app.json @@ -18,8 +18,7 @@ "MXCRYPTO_DISABLED", "NL_ASSERT_LOG=NL_ASSERT_LOG_DEFAULT", "NL_ASSERT_EXPECT_FLAGS=NL_ASSERT_FLAG_LOG", - "WHD_PRINT_DISABLE", - "MBED_CONF_LWIP_NETBUF_RECVINFO_ENABLED" + "WHD_PRINT_DISABLE" ], "target.components_add": ["capsense"], "lighting-state-led": "P9_6", diff --git a/examples/lighting-app/nrfconnect/CMakeLists.txt b/examples/lighting-app/nrfconnect/CMakeLists.txt index 718ed198c3d727..ce3632847361a9 100644 --- a/examples/lighting-app/nrfconnect/CMakeLists.txt +++ b/examples/lighting-app/nrfconnect/CMakeLists.txt @@ -26,7 +26,7 @@ include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake) # Load NCS/Zephyr build system set(CONF_FILE ${CHIP_ROOT}/config/nrfconnect/app/sample-defaults.conf prj.conf) -if (EXISTS boards/${BOARD}.conf) +if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/boards/${BOARD}.conf) list(APPEND CONF_FILE boards/${BOARD}.conf) endif() diff --git a/examples/lighting-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf b/examples/lighting-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf index bd8daf3a18feac..eedaf10f20db02 100644 --- a/examples/lighting-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf +++ b/examples/lighting-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf @@ -19,11 +19,9 @@ CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y # Configure shell and logging over USB -CONFIG_USB=y -CONFIG_USB_UART_CONSOLE=y +CONFIG_USB_DEVICE_STACK=y CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_UART_LINE_CTRL=y -CONFIG_UART_SHELL_ON_DEV_NAME="CDC_ACM_0" CONFIG_SHELL_BACKEND_SERIAL_INIT_PRIORITY=51 # The minimal logging mode does not work properly with the USB CDC device, so use the deferred mode diff --git a/examples/lighting-app/nrfconnect/boards/nrf52840dongle_nrf52840.overlay b/examples/lighting-app/nrfconnect/boards/nrf52840dongle_nrf52840.overlay new file mode 100644 index 00000000000000..5ccdd5561121ca --- /dev/null +++ b/examples/lighting-app/nrfconnect/boards/nrf52840dongle_nrf52840.overlay @@ -0,0 +1,28 @@ +/* + * 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. + */ + +/ { + chosen { + zephyr,shell-uart = &cdc_acm_uart0; + }; +}; + +&zephyr_udc0 { + cdc_acm_uart0: cdc_acm_uart0 { + compatible = "zephyr,cdc-acm-uart"; + label = "CDC_ACM_0"; + }; +}; diff --git a/examples/lighting-app/nrfconnect/main/main.cpp b/examples/lighting-app/nrfconnect/main/main.cpp index 1d2ae1530b813d..2ec7a58ff062a0 100644 --- a/examples/lighting-app/nrfconnect/main/main.cpp +++ b/examples/lighting-app/nrfconnect/main/main.cpp @@ -28,7 +28,7 @@ #include "Rpc.h" #endif -#ifdef CONFIG_USB +#ifdef CONFIG_USB_DEVICE_STACK #include #endif @@ -47,7 +47,7 @@ int main(void) int ret = 0; CHIP_ERROR err = CHIP_NO_ERROR; -#ifdef CONFIG_USB +#ifdef CONFIG_USB_DEVICE_STACK ret = usb_enable(nullptr); if (ret) { diff --git a/examples/lighting-app/telink/CMakeLists.txt b/examples/lighting-app/telink/CMakeLists.txt index 2f367d1c761593..0dfdd67b0cf741 100644 --- a/examples/lighting-app/telink/CMakeLists.txt +++ b/examples/lighting-app/telink/CMakeLists.txt @@ -80,6 +80,7 @@ target_sources(app PRIVATE ${CHIP_ROOT}/src/app/clusters/identify-server/identify-server.cpp ${CHIP_ROOT}/src/app/clusters/diagnostic-logs-server/diagnostic-logs-server.cpp ${CHIP_ROOT}/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp + ${CHIP_ROOT}/src/app/clusters/localization-configuration-server/localization-configuration-server.cpp ${CHIP_ROOT}/src/app/clusters/fixed-label-server/fixed-label-server.cpp ${CHIP_ROOT}/src/app/clusters/user-label-server/user-label-server.cpp ${CHIP_ROOT}/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-server.cpp diff --git a/examples/lock-app/esp32/main/CMakeLists.txt b/examples/lock-app/esp32/main/CMakeLists.txt index 2360ce4384e07a..353812d4dc7ed2 100644 --- a/examples/lock-app/esp32/main/CMakeLists.txt +++ b/examples/lock-app/esp32/main/CMakeLists.txt @@ -138,6 +138,7 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/descriptor" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/diagnostic-logs-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ethernet-network-diagnostics-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/localization-configuration-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/fixed-label-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thread-network-diagnostics-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/wifi-network-diagnostics-server" diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index fa00c5ce5fdd29..3a4a932f72b95f 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -1159,6 +1159,57 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Power Source Configuration", "code": 46, diff --git a/examples/lock-app/mbed/CMakeLists.txt b/examples/lock-app/mbed/CMakeLists.txt index c7ad27a340177e..a6821cdf28e0d0 100644 --- a/examples/lock-app/mbed/CMakeLists.txt +++ b/examples/lock-app/mbed/CMakeLists.txt @@ -78,6 +78,7 @@ target_sources(${APP_TARGET} PRIVATE ${CHIP_ROOT}/src/app/clusters/descriptor/descriptor.cpp ${CHIP_ROOT}/src/app/clusters/diagnostic-logs-server/diagnostic-logs-server.cpp ${CHIP_ROOT}/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp + ${CHIP_ROOT}/src/app/clusters/localization-configuration-server/localization-configuration-server.cpp ${CHIP_ROOT}/src/app/clusters/fixed-label-server/fixed-label-server.cpp ${CHIP_ROOT}/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-server.cpp ${CHIP_ROOT}/src/app/clusters/wifi-network-diagnostics-server/wifi-network-diagnostics-server.cpp diff --git a/examples/lock-app/mbed/mbed_app.json b/examples/lock-app/mbed/mbed_app.json index 45a384f057cf72..27ec18a15a4763 100644 --- a/examples/lock-app/mbed/mbed_app.json +++ b/examples/lock-app/mbed/mbed_app.json @@ -18,8 +18,7 @@ "MXCRYPTO_DISABLED", "NL_ASSERT_LOG=NL_ASSERT_LOG_DEFAULT", "NL_ASSERT_EXPECT_FLAGS=NL_ASSERT_FLAG_LOG", - "WHD_PRINT_DISABLE", - "MBED_CONF_LWIP_NETBUF_RECVINFO_ENABLED" + "WHD_PRINT_DISABLE" ], "target.components_add": ["capsense"], "lock-state-led": "P9_6", diff --git a/examples/lock-app/nrfconnect/CMakeLists.txt b/examples/lock-app/nrfconnect/CMakeLists.txt index b2a9f7de892e5a..0e72c2478f052a 100644 --- a/examples/lock-app/nrfconnect/CMakeLists.txt +++ b/examples/lock-app/nrfconnect/CMakeLists.txt @@ -25,7 +25,7 @@ include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake) # Load NCS/Zephyr build system set(CONF_FILE ${CHIP_ROOT}/config/nrfconnect/app/sample-defaults.conf prj.conf) -if (EXISTS boards/${BOARD}.conf) +if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/boards/${BOARD}.conf) list(APPEND CONF_FILE boards/${BOARD}.conf) endif() diff --git a/examples/minimal-mdns/client.cpp b/examples/minimal-mdns/client.cpp index 246a97252e6009..1a98bc539764df 100644 --- a/examples/minimal-mdns/client.cpp +++ b/examples/minimal-mdns/client.cpp @@ -301,6 +301,8 @@ void BroadcastPacket(mdns::Minimal::ServerBase * server) } } +mdns::Minimal::Server<20> gMdnsServer; + } // namespace int main(int argc, char ** args) @@ -324,17 +326,16 @@ int main(int argc, char ** args) printf("Running...\n"); - mdns::Minimal::Server<20> mdnsServer; ReportDelegate reporter; CHIP_ERROR err; - mdnsServer.SetDelegate(&reporter); + gMdnsServer.SetDelegate(&reporter); { MdnsExample::AllInterfaces allInterfaces(gOptions.enableIpV4); - err = mdnsServer.Listen(chip::DeviceLayer::UDPEndPointManager(), &allInterfaces, gOptions.listenPort); + err = gMdnsServer.Listen(chip::DeviceLayer::UDPEndPointManager(), &allInterfaces, gOptions.listenPort); if (err != CHIP_NO_ERROR) { printf("Server failed to listen on all interfaces: %s\n", chip::ErrorStr(err)); @@ -342,11 +343,15 @@ int main(int argc, char ** args) } } - BroadcastPacket(&mdnsServer); + BroadcastPacket(&gMdnsServer); err = DeviceLayer::SystemLayer().StartTimer( chip::System::Clock::Milliseconds32(gOptions.runtimeMs), [](System::Layer *, void *) { + // Close all sockets BEFORE system layer is shut down, otherwise + // attempts to free UDP sockets with system layer down will segfault + gMdnsServer.Shutdown(); + DeviceLayer::PlatformMgr().StopEventLoopTask(); DeviceLayer::PlatformMgr().Shutdown(); }, diff --git a/examples/ota-provider-app/esp32/main/CMakeLists.txt b/examples/ota-provider-app/esp32/main/CMakeLists.txt index ee8077e9c8ff7a..2d673860ea9668 100644 --- a/examples/ota-provider-app/esp32/main/CMakeLists.txt +++ b/examples/ota-provider-app/esp32/main/CMakeLists.txt @@ -34,6 +34,7 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/descriptor" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/diagnostic-logs-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ethernet-network-diagnostics-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/localization-configuration-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/fixed-label-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/user-label-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thread-network-diagnostics-server" diff --git a/examples/ota-provider-app/ota-provider-common/OTAProviderExample.cpp b/examples/ota-provider-app/ota-provider-common/OTAProviderExample.cpp index 43a9d06efc75ed..b6a026c47078a7 100644 --- a/examples/ota-provider-app/ota-provider-common/OTAProviderExample.cpp +++ b/examples/ota-provider-app/ota-provider-common/OTAProviderExample.cpp @@ -114,7 +114,7 @@ EmberAfStatus OTAProviderExample::HandleQueryImage(chip::app::CommandHandler * c { // TODO: This uses the current node as the provider to supply the OTA image. This can be configurable such that the provider // supplying the response is not the provider supplying the OTA image. - FabricIndex fabricIndex = commandObj->GetExchangeContext()->GetSessionHandle()->AsSecureSession()->GetFabricIndex(); + FabricIndex fabricIndex = commandObj->GetAccessingFabricIndex(); FabricInfo * fabricInfo = Server::GetInstance().GetFabricTable().FindFabricWithIndex(fabricIndex); NodeId nodeId = fabricInfo->GetPeerId().GetNodeId(); diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap b/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap index 87d608abc236eb..ac517f02102643 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap @@ -1107,6 +1107,57 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "General Commissioning", "code": 48, @@ -3813,5 +3864,6 @@ "endpointVersion": 1, "deviceIdentifier": 22 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/ota-requestor-app/esp32/main/CMakeLists.txt b/examples/ota-requestor-app/esp32/main/CMakeLists.txt index 4b65e80c847aba..e0287765287da3 100644 --- a/examples/ota-requestor-app/esp32/main/CMakeLists.txt +++ b/examples/ota-requestor-app/esp32/main/CMakeLists.txt @@ -34,6 +34,7 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/descriptor" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/diagnostic-logs-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ethernet-network-diagnostics-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/localization-configuration-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/fixed-label-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/user-label-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thread-network-diagnostics-server" diff --git a/examples/ota-requestor-app/ota-requestor-common/BUILD.gn b/examples/ota-requestor-app/ota-requestor-common/BUILD.gn index 1d5d7bf413cd30..4ba7b05ddb2b2e 100644 --- a/examples/ota-requestor-app/ota-requestor-common/BUILD.gn +++ b/examples/ota-requestor-app/ota-requestor-common/BUILD.gn @@ -30,15 +30,6 @@ chip_data_model("ota-requestor-common") { deps = [ "${chip_root}/src/lib" ] - sources = [ - "${chip_root}/src/app/clusters/ota-requestor/BDXDownloader.cpp", - "${chip_root}/src/app/clusters/ota-requestor/BDXDownloader.h", - "${chip_root}/src/app/clusters/ota-requestor/OTARequestor.cpp", - "${chip_root}/src/app/clusters/ota-requestor/ota-requestor-server.cpp", - ] - - is_server = true - public_configs = [ ":config" ] is_server = true diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap index 9cb1e4a6837e87..61f9c57ef951e1 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap @@ -1206,6 +1206,57 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "General Commissioning", "code": 48, @@ -3912,5 +3963,6 @@ "endpointVersion": 1, "deviceIdentifier": 22 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/pigweed-app/nrfconnect/CMakeLists.txt b/examples/pigweed-app/nrfconnect/CMakeLists.txt index 361ecc1b09aaca..596336d4886eb8 100644 --- a/examples/pigweed-app/nrfconnect/CMakeLists.txt +++ b/examples/pigweed-app/nrfconnect/CMakeLists.txt @@ -29,6 +29,10 @@ endif() list(APPEND ZEPHYR_EXTRA_MODULES ${CHIP_ROOT}/config/nrfconnect/chip-module) find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) +if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/boards/${BOARD}.conf) + list(APPEND CONF_FILE boards/${BOARD}.conf) +endif() + project(chip-nrf52840-pigweed-example) include(${CHIP_ROOT}/config/nrfconnect/app/enable-gnu-std.cmake) diff --git a/examples/placeholder/linux/BUILD.gn b/examples/placeholder/linux/BUILD.gn index 3ca3b3adef5096..1917652769dc64 100644 --- a/examples/placeholder/linux/BUILD.gn +++ b/examples/placeholder/linux/BUILD.gn @@ -41,6 +41,7 @@ executable("chip-${chip_tests_zap_config}") { deps = [ ":configuration", "${chip_root}/examples/platform/linux:app-main", + "${chip_root}/src/app/tests/suites/commands/log", "${chip_root}/src/app/tests/suites/pics", "${chip_root}/src/lib", ] diff --git a/examples/placeholder/linux/include/TestCommand.h b/examples/placeholder/linux/include/TestCommand.h index f3032560f48cb9..40e111fc3cd737 100644 --- a/examples/placeholder/linux/include/TestCommand.h +++ b/examples/placeholder/linux/include/TestCommand.h @@ -23,8 +23,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -34,7 +34,7 @@ constexpr const char kIdentityAlpha[] = ""; constexpr const char kIdentityBeta[] = ""; constexpr const char kIdentityGamma[] = ""; -class TestCommand +class TestCommand : public PICSChecker, public LogCommands { public: TestCommand(const char * commandName) : mCommandPath(0, 0, 0), mAttributePath(0, 0, 0) {} @@ -60,16 +60,8 @@ class TestCommand return 0; } - CHIP_ERROR Log(const char * message) + CHIP_ERROR ContinueOnChipMainThread() override { - ChipLogProgress(chipTool, "%s", message); - NextTest(); - return CHIP_NO_ERROR; - } - - CHIP_ERROR UserPrompt(const char * message) - { - ChipLogProgress(chipTool, "USER_PROMPT: %s", message); NextTest(); return CHIP_NO_ERROR; } @@ -125,26 +117,6 @@ class TestCommand mAttributePath = chip::app::ConcreteAttributePath(0, 0, 0); } - bool ShouldSkip(const char * expression) - { - // If there is no PICS configuration file, considers that nothing should be skipped. - if (!PICS.HasValue()) - { - return false; - } - - std::map pics(PICS.Value()); - bool shouldSkip = !PICSBooleanExpressionParser::Eval(expression, pics); - if (shouldSkip) - { - ChipLogProgress(chipTool, " **** Skipping: %s == false\n", expression); - NextTest(); - } - return shouldSkip; - } - - chip::Optional> PICS; - std::atomic_bool isRunning{ true }; protected: diff --git a/examples/platform/efr32/project_include/OpenThreadConfig.h b/examples/platform/efr32/project_include/OpenThreadConfig.h index eea8f866a14f8a..1e8721c6d24401 100644 --- a/examples/platform/efr32/project_include/OpenThreadConfig.h +++ b/examples/platform/efr32/project_include/OpenThreadConfig.h @@ -61,6 +61,9 @@ #define OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE 0 #define OPENTHREAD_CONFIG_TCP_ENABLE 0 +// Support udp multicast by enabling Multicast Listener Registration (MLR) +#define OPENTHREAD_CONFIG_MLR_ENABLE 1 + // Use the SiLabs-supplied default platform configuration for remainder // of OpenThread config options. // diff --git a/examples/pump-app/nrfconnect/CMakeLists.txt b/examples/pump-app/nrfconnect/CMakeLists.txt index 2fb43b984c0ec3..0b720f209c1eab 100644 --- a/examples/pump-app/nrfconnect/CMakeLists.txt +++ b/examples/pump-app/nrfconnect/CMakeLists.txt @@ -25,7 +25,7 @@ include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake) # Load NCS/Zephyr build system set(CONF_FILE ${CHIP_ROOT}/config/nrfconnect/app/sample-defaults.conf prj.conf) -if (EXISTS boards/${BOARD}.conf) +if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/boards/${BOARD}.conf) list(APPEND CONF_FILE boards/${BOARD}.conf) endif() diff --git a/examples/pump-app/pump-common/pump-app.zap b/examples/pump-app/pump-common/pump-app.zap index 724aa5e0b7b721..aa5acc9e5c7880 100644 --- a/examples/pump-app/pump-common/pump-app.zap +++ b/examples/pump-app/pump-common/pump-app.zap @@ -1073,6 +1073,57 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "General Commissioning", "code": 48, @@ -6202,5 +6253,6 @@ "endpointVersion": 1, "deviceIdentifier": 771 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/pump-controller-app/nrfconnect/CMakeLists.txt b/examples/pump-controller-app/nrfconnect/CMakeLists.txt index ca973b463c1fe7..cbae1f77e94f4f 100644 --- a/examples/pump-controller-app/nrfconnect/CMakeLists.txt +++ b/examples/pump-controller-app/nrfconnect/CMakeLists.txt @@ -25,7 +25,7 @@ include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake) # Load NCS/Zephyr build system set(CONF_FILE ${CHIP_ROOT}/config/nrfconnect/app/sample-defaults.conf prj.conf) -if (EXISTS boards/${BOARD}.conf) +if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/boards/${BOARD}.conf) list(APPEND CONF_FILE boards/${BOARD}.conf) endif() diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap index 9f86d51aaeba81..5c5dabed60e3e5 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap @@ -1073,6 +1073,57 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "General Commissioning", "code": 48, @@ -5947,5 +5998,6 @@ "endpointVersion": 1, "deviceIdentifier": 772 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/shell/mbed/mbed_app.json b/examples/shell/mbed/mbed_app.json index c7281d23ee5fc2..1a6b662db9abcf 100644 --- a/examples/shell/mbed/mbed_app.json +++ b/examples/shell/mbed/mbed_app.json @@ -18,8 +18,7 @@ "MXCRYPTO_DISABLED", "NL_ASSERT_LOG=NL_ASSERT_LOG_DEFAULT", "NL_ASSERT_EXPECT_FLAGS=NL_ASSERT_FLAG_LOG", - "WHD_PRINT_DISABLE", - "MBED_CONF_LWIP_NETBUF_RECVINFO_ENABLED" + "WHD_PRINT_DISABLE" ] } }, diff --git a/examples/shell/nrfconnect/CMakeLists.txt b/examples/shell/nrfconnect/CMakeLists.txt index c4da56a1880efe..9940b0973bd046 100644 --- a/examples/shell/nrfconnect/CMakeLists.txt +++ b/examples/shell/nrfconnect/CMakeLists.txt @@ -25,6 +25,10 @@ set(CONF_FILE ${CHIP_ROOT}/config/nrfconnect/app/sample-defaults.conf prj.conf) list(APPEND ZEPHYR_EXTRA_MODULES ${CHIP_ROOT}/config/nrfconnect/chip-module) find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) +if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/boards/${BOARD}.conf) + list(APPEND CONF_FILE boards/${BOARD}.conf) +endif() + project(chip-nrfconnect-shell-example) include(${CHIP_ROOT}/config/nrfconnect/app/enable-gnu-std.cmake) diff --git a/examples/shell/shell_common/BUILD.gn b/examples/shell/shell_common/BUILD.gn index efd1a154fedabc..484c3dbbbde058 100644 --- a/examples/shell/shell_common/BUILD.gn +++ b/examples/shell/shell_common/BUILD.gn @@ -74,7 +74,6 @@ static_library("shell_common") { sources += [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/ota-requestor-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", ] diff --git a/examples/temperature-measurement-app/esp32/main/CMakeLists.txt b/examples/temperature-measurement-app/esp32/main/CMakeLists.txt index 47439a37fe78a9..0c6ff31b1961cc 100644 --- a/examples/temperature-measurement-app/esp32/main/CMakeLists.txt +++ b/examples/temperature-measurement-app/esp32/main/CMakeLists.txt @@ -34,6 +34,7 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/descriptor" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/diagnostic-logs-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ethernet-network-diagnostics-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/localization-configuration-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/fixed-label-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/user-label-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thread-network-diagnostics-server" diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap b/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap index ce9e32d49f441e..503fdb2e7bb73e 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap @@ -767,6 +767,57 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "General Commissioning", "code": 48, @@ -3357,5 +3408,6 @@ "endpointVersion": 1, "deviceIdentifier": 22 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index 9df9f49d2c2020..4eabfcd62e8e4d 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -1356,6 +1356,57 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "General Commissioning", "code": 48, @@ -12390,7 +12441,7 @@ "enabled": 0, "commands": [ { - "name": "ChangeChannel", + "name": "ChangeChannelRequest", "code": 0, "mfgCode": null, "source": "client", @@ -12398,15 +12449,7 @@ "outgoing": 1 }, { - "name": "ChangeChannelByNumber", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "SkipChannel", + "name": "ChangeChannelByNumberRequest", "code": 2, "mfgCode": null, "source": "client", @@ -12439,16 +12482,7 @@ "define": "CHANNEL_CLUSTER", "side": "server", "enabled": 0, - "commands": [ - { - "name": "ChangeChannelResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - } - ], + "commands": [], "attributes": [ { "name": "channel list", @@ -12554,16 +12588,7 @@ "define": "TARGET_NAVIGATOR_CLUSTER", "side": "server", "enabled": 0, - "commands": [ - { - "name": "NavigateTargetResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - } - ], + "commands": [], "attributes": [ { "name": "target navigator list", @@ -12606,7 +12631,7 @@ "enabled": 0, "commands": [ { - "name": "MediaPlay", + "name": "PlayRequest", "code": 0, "mfgCode": null, "source": "client", @@ -12614,7 +12639,7 @@ "outgoing": 1 }, { - "name": "MediaPause", + "name": "PauseRequest", "code": 1, "mfgCode": null, "source": "client", @@ -12622,7 +12647,7 @@ "outgoing": 1 }, { - "name": "MediaStop", + "name": "StopRequest", "code": 2, "mfgCode": null, "source": "client", @@ -12630,7 +12655,7 @@ "outgoing": 1 }, { - "name": "MediaStartOver", + "name": "StartOverRequest", "code": 3, "mfgCode": null, "source": "client", @@ -12638,7 +12663,7 @@ "outgoing": 1 }, { - "name": "MediaPrevious", + "name": "PreviousRequest", "code": 4, "mfgCode": null, "source": "client", @@ -12646,7 +12671,7 @@ "outgoing": 1 }, { - "name": "MediaNext", + "name": "NextRequest", "code": 5, "mfgCode": null, "source": "client", @@ -12654,7 +12679,7 @@ "outgoing": 1 }, { - "name": "MediaRewind", + "name": "RewindRequest", "code": 6, "mfgCode": null, "source": "client", @@ -12662,7 +12687,7 @@ "outgoing": 1 }, { - "name": "MediaFastForward", + "name": "FastForwardRequest", "code": 7, "mfgCode": null, "source": "client", @@ -12670,7 +12695,7 @@ "outgoing": 1 }, { - "name": "MediaSkipForward", + "name": "SkipForwardRequest", "code": 8, "mfgCode": null, "source": "client", @@ -12678,20 +12703,12 @@ "outgoing": 1 }, { - "name": "MediaSkipBackward", + "name": "SkipBackwardRequest", "code": 9, "mfgCode": null, "source": "client", "incoming": 0, "outgoing": 1 - }, - { - "name": "MediaSeek", - "code": 10, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 } ], "attributes": [ @@ -12719,88 +12736,7 @@ "define": "MEDIA_PLAYBACK_CLUSTER", "side": "server", "enabled": 0, - "commands": [ - { - "name": "MediaPlayResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MediaPauseResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MediaStopResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MediaStartOverResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MediaPreviousResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MediaNextResponse", - "code": 5, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MediaRewindResponse", - "code": 6, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MediaFastForwardResponse", - "code": 7, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MediaSkipForwardResponse", - "code": 8, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MediaSkipBackwardResponse", - "code": 9, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - } - ], + "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -12828,7 +12764,7 @@ "enabled": 0, "commands": [ { - "name": "SelectInput", + "name": "SelectInputRequest", "code": 0, "mfgCode": null, "source": "client", @@ -12836,7 +12772,7 @@ "outgoing": 1 }, { - "name": "ShowInputStatus", + "name": "ShowInputStatusRequest", "code": 1, "mfgCode": null, "source": "client", @@ -12844,7 +12780,7 @@ "outgoing": 1 }, { - "name": "HideInputStatus", + "name": "HideInputStatusRequest", "code": 2, "mfgCode": null, "source": "client", @@ -12852,7 +12788,7 @@ "outgoing": 1 }, { - "name": "RenameInput", + "name": "RenameInputRequest", "code": 3, "mfgCode": null, "source": "client", @@ -12989,7 +12925,7 @@ "enabled": 0, "commands": [ { - "name": "SendKey", + "name": "SendKeyRequest", "code": 0, "mfgCode": null, "source": "client", @@ -13022,16 +12958,7 @@ "define": "KEYPAD_INPUT_CLUSTER", "side": "server", "enabled": 0, - "commands": [ - { - "name": "SendKeyResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - } - ], + "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -13059,7 +12986,7 @@ "enabled": 0, "commands": [ { - "name": "LaunchContent", + "name": "LaunchContentRequest", "code": 0, "mfgCode": null, "source": "client", @@ -13067,7 +12994,7 @@ "outgoing": 1 }, { - "name": "LaunchURL", + "name": "LaunchURLRequest", "code": 1, "mfgCode": null, "source": "client", @@ -13100,24 +13027,7 @@ "define": "CONTENT_LAUNCH_CLUSTER", "side": "server", "enabled": 0, - "commands": [ - { - "name": "LaunchContentResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "LaunchURLResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - } - ], + "commands": [], "attributes": [ { "name": "accept header list", @@ -13175,7 +13085,7 @@ "enabled": 0, "commands": [ { - "name": "SelectOutput", + "name": "SelectOutputRequest", "code": 0, "mfgCode": null, "source": "client", @@ -13183,7 +13093,7 @@ "outgoing": 1 }, { - "name": "RenameOutput", + "name": "RenameOutputRequest", "code": 1, "mfgCode": null, "source": "client", @@ -13259,7 +13169,7 @@ "enabled": 0, "commands": [ { - "name": "LaunchApp", + "name": "LaunchAppRequest", "code": 0, "mfgCode": null, "source": "client", @@ -13292,16 +13202,7 @@ "define": "APPLICATION_LAUNCHER_CLUSTER", "side": "server", "enabled": 0, - "commands": [ - { - "name": "LaunchAppResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - } - ], + "commands": [], "attributes": [ { "name": "application launcher list", @@ -13486,20 +13387,12 @@ "enabled": 0, "commands": [ { - "name": "GetSetupPIN", + "name": "GetSetupPINRequest", "code": 0, "mfgCode": null, "source": "client", "incoming": 0, "outgoing": 1 - }, - { - "name": "Login", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 } ], "attributes": [ @@ -13527,16 +13420,7 @@ "define": "ACCOUNT_LOGIN_CLUSTER", "side": "server", "enabled": 0, - "commands": [ - { - "name": "GetSetupPINResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - } - ], + "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -13955,5 +13839,6 @@ "endpointVersion": 1, "deviceIdentifier": 769 } - ] -} + ], + "log": [] +} \ No newline at end of file diff --git a/examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/service/MatterServant.java b/examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/service/MatterServant.java index fffb60be46040b..d6798354058b93 100644 --- a/examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/service/MatterServant.java +++ b/examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/service/MatterServant.java @@ -10,6 +10,7 @@ import chip.platform.PreferencesConfigurationManager; import chip.platform.PreferencesKeyValueStoreManager; import com.tcl.chip.tvapp.ChannelManagerStub; +import com.tcl.chip.tvapp.Clusters; import com.tcl.chip.tvapp.ContentLaunchManagerStub; import com.tcl.chip.tvapp.KeypadInputManagerStub; import com.tcl.chip.tvapp.LowPowerManagerStub; @@ -33,14 +34,33 @@ public static MatterServant get() { } public void init(@NonNull Context context) { - TvApp tvApp = new TvApp(); - tvApp.setKeypadInputManager(new KeypadInputManagerStub()); - tvApp.setWakeOnLanManager(new WakeOnLanManagerStub()); - tvApp.setMediaInputManager(new MediaInputManagerStub()); - tvApp.setContentLaunchManager(new ContentLaunchManagerStub()); - tvApp.setLowPowerManager(new LowPowerManagerStub()); - tvApp.setMediaPlaybackManager(new MediaPlaybackManagerStub()); - tvApp.setChannelManager(new ChannelManagerStub()); + TvApp tvApp = + new TvApp( + (app, clusterId, endpoint) -> { + switch (clusterId) { + case Clusters.ClusterId_KeypadInput: + app.setKeypadInputManager(endpoint, new KeypadInputManagerStub(endpoint)); + break; + case Clusters.ClusterId_WakeOnLan: + app.setWakeOnLanManager(endpoint, new WakeOnLanManagerStub(endpoint)); + break; + case Clusters.ClusterId_MediaInput: + app.setMediaInputManager(endpoint, new MediaInputManagerStub(endpoint)); + break; + case Clusters.ClusterId_ContentLauncher: + app.setContentLaunchManager(endpoint, new ContentLaunchManagerStub(endpoint)); + break; + case Clusters.ClusterId_LowPower: + app.setLowPowerManager(endpoint, new LowPowerManagerStub(endpoint)); + break; + case Clusters.ClusterId_MediaPlayback: + app.setMediaPlaybackManager(endpoint, new MediaPlaybackManagerStub(endpoint)); + break; + case Clusters.ClusterId_Channel: + app.setChannelManager(endpoint, new ChannelManagerStub(endpoint)); + break; + } + }); Context applicationContext = context.getApplicationContext(); AndroidChipPlatform chipPlatform = diff --git a/examples/tv-app/android/BUILD.gn b/examples/tv-app/android/BUILD.gn index d77831c649d5fa..da112196c57e6a 100644 --- a/examples/tv-app/android/BUILD.gn +++ b/examples/tv-app/android/BUILD.gn @@ -87,6 +87,7 @@ android_library("java") { "java/src/com/tcl/chip/tvapp/ChannelLineupInfo.java", "java/src/com/tcl/chip/tvapp/ChannelManager.java", "java/src/com/tcl/chip/tvapp/ChannelManagerStub.java", + "java/src/com/tcl/chip/tvapp/Clusters.java", "java/src/com/tcl/chip/tvapp/ContentLaunchBrandingInformation.java", "java/src/com/tcl/chip/tvapp/ContentLaunchManager.java", "java/src/com/tcl/chip/tvapp/ContentLaunchManagerStub.java", @@ -101,7 +102,9 @@ android_library("java") { "java/src/com/tcl/chip/tvapp/MediaInputManagerStub.java", "java/src/com/tcl/chip/tvapp/MediaPlaybackManager.java", "java/src/com/tcl/chip/tvapp/MediaPlaybackManagerStub.java", + "java/src/com/tcl/chip/tvapp/MediaPlaybackPosition.java", "java/src/com/tcl/chip/tvapp/TvApp.java", + "java/src/com/tcl/chip/tvapp/TvAppCallback.java", "java/src/com/tcl/chip/tvapp/WakeOnLanManager.java", "java/src/com/tcl/chip/tvapp/WakeOnLanManagerStub.java", ] diff --git a/examples/tv-app/android/java/ChannelManager.cpp b/examples/tv-app/android/java/ChannelManager.cpp index cd0b2f79fd4a0c..fa4969e489b2c8 100644 --- a/examples/tv-app/android/java/ChannelManager.cpp +++ b/examples/tv-app/android/java/ChannelManager.cpp @@ -16,6 +16,9 @@ */ #include "ChannelManager.h" +#include "TvApp-JNI.h" +#include +#include #include #include #include @@ -24,13 +27,31 @@ using namespace chip; using namespace chip::app::Clusters::Channel; -namespace { -static ChannelManager channelManager; -} // namespace +/** @brief Channel Cluster Init + * + * This function is called when a specific cluster is initialized. It gives the + * application an opportunity to take care of cluster initialization procedures. + * It is called exactly once for each endpoint where cluster is present. + * + * @param endpoint Ver.: always + * + */ +void emberAfChannelClusterInitCallback(EndpointId endpoint) +{ + ChipLogProgress(Zcl, "TV Android App: Channel::PostClusterInit"); + TvAppJNIMgr().PostClusterInit(chip::app::Clusters::Channel::Id, endpoint); +} -std::list ChannelManager::HandleGetChannelList() +void ChannelManager::NewManager(jint endpoint, jobject manager) +{ + ChipLogProgress(Zcl, "TV Android App: Channel::SetDefaultDelegate"); + ChannelManager * mgr = new ChannelManager(); + mgr->InitializeWithObjects(manager); + chip::app::Clusters::Channel::SetDefaultDelegate(static_cast(endpoint), mgr); +} + +CHIP_ERROR ChannelManager::HandleGetChannelList(chip::app::AttributeValueEncoder & aEncoder) { - std::list list; CHIP_ERROR err = CHIP_NO_ERROR; JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -39,9 +60,17 @@ std::list ChannelManag VerifyOrExit(mGetChannelListMethod != nullptr, err = CHIP_ERROR_INCORRECT_STATE); VerifyOrExit(env != NULL, err = CHIP_JNI_ERROR_NO_ENV); - { + return aEncoder.EncodeList([this, env](const auto & encoder) -> CHIP_ERROR { jobjectArray channelInfoList = (jobjectArray) env->CallObjectMethod(mChannelManagerObject, mGetChannelListMethod); - jint length = env->GetArrayLength(channelInfoList); + if (env->ExceptionCheck()) + { + ChipLogError(Zcl, "Java exception in ChannelManager::HandleGetChannelList"); + env->ExceptionDescribe(); + env->ExceptionClear(); + return CHIP_ERROR_INCORRECT_STATE; + } + + jint length = env->GetArrayLength(channelInfoList); for (jint i = 0; i < length; i++) { @@ -62,7 +91,7 @@ std::list ChannelManag if (jname != NULL) { JniUtfString name(env, jname); - channelInfo.callSign = name.charSpan(); + channelInfo.name = name.charSpan(); } jfieldID getJaffiliateCallSignField = env->GetFieldID(channelClass, "affiliateCallSign", "Ljava/lang/String;"); @@ -70,7 +99,7 @@ std::list ChannelManag if (jaffiliateCallSign != NULL) { JniUtfString affiliateCallSign(env, jaffiliateCallSign); - channelInfo.callSign = affiliateCallSign.charSpan(); + channelInfo.affiliateCallSign = affiliateCallSign.charSpan(); } jfieldID majorNumField = env->GetFieldID(channelClass, "majorNumber", "I"); @@ -79,10 +108,13 @@ std::list ChannelManag jfieldID minorNumField = env->GetFieldID(channelClass, "minorNumber", "I"); jint jminorNum = env->GetIntField(channelObject, minorNumField); - channelInfo.majorNumber = static_cast(jminorNum); - list.push_back(channelInfo); + channelInfo.minorNumber = static_cast(jminorNum); + + ReturnErrorOnFailure(encoder.Encode(channelInfo)); } - } + + return CHIP_NO_ERROR; + }); exit: if (err != CHIP_NO_ERROR) @@ -90,10 +122,10 @@ std::list ChannelManag ChipLogError(Zcl, "ChannelManager::getChannelList status error: %s", err.AsString()); } - return list; + return err; } -chip::app::Clusters::Channel::Structs::LineupInfo::Type ChannelManager::HandleGetLineup() +CHIP_ERROR ChannelManager::HandleGetLineup(chip::app::AttributeValueEncoder & aEncoder) { chip::app::Clusters::Channel::Structs::LineupInfo::Type lineupInfo; CHIP_ERROR err = CHIP_NO_ERROR; @@ -135,6 +167,8 @@ chip::app::Clusters::Channel::Structs::LineupInfo::Type ChannelManager::HandleGe jfieldID lineupInfoTypeFild = env->GetFieldID(channelLineupClazz, "lineupInfoTypeEnum", "I"); jint jlineupInfoType = (env->GetIntField(channelLineupObject, lineupInfoTypeFild)); lineupInfo.lineupInfoType = static_cast(jlineupInfoType); + + err = aEncoder.Encode(lineupInfo); } exit: @@ -143,10 +177,10 @@ chip::app::Clusters::Channel::Structs::LineupInfo::Type ChannelManager::HandleGe ChipLogError(Zcl, "ChannelManager::getChannelLineup status error: %s", err.AsString()); } - return lineupInfo; + return err; } -chip::app::Clusters::Channel::Structs::ChannelInfo::Type ChannelManager::HandleGetCurrentChannel() +CHIP_ERROR ChannelManager::HandleGetCurrentChannel(chip::app::AttributeValueEncoder & aEncoder) { chip::app::Clusters::Channel::Structs::ChannelInfo::Type channelInfo; CHIP_ERROR err = CHIP_NO_ERROR; @@ -173,7 +207,7 @@ chip::app::Clusters::Channel::Structs::ChannelInfo::Type ChannelManager::HandleG if (jname != NULL) { JniUtfString name(env, jname); - channelInfo.callSign = name.charSpan(); + channelInfo.name = name.charSpan(); } jfieldID getJaffiliateCallSignField = env->GetFieldID(channelClass, "affiliateCallSign", "Ljava/lang/String;"); @@ -181,7 +215,7 @@ chip::app::Clusters::Channel::Structs::ChannelInfo::Type ChannelManager::HandleG if (jaffiliateCallSign != NULL) { JniUtfString affiliateCallSign(env, jaffiliateCallSign); - channelInfo.callSign = affiliateCallSign.charSpan(); + channelInfo.affiliateCallSign = affiliateCallSign.charSpan(); } jfieldID majorNumField = env->GetFieldID(channelClass, "majorNumber", "I"); @@ -190,7 +224,9 @@ chip::app::Clusters::Channel::Structs::ChannelInfo::Type ChannelManager::HandleG jfieldID minorNumField = env->GetFieldID(channelClass, "minorNumber", "I"); jint jminorNum = env->GetIntField(channelInfoObject, minorNumField); - channelInfo.majorNumber = static_cast(jminorNum); + channelInfo.minorNumber = static_cast(jminorNum); + + err = aEncoder.Encode(channelInfo); } exit: @@ -199,10 +235,12 @@ chip::app::Clusters::Channel::Structs::ChannelInfo::Type ChannelManager::HandleG ChipLogError(Zcl, "ChannelManager::HandleGetCurrentChannel status error: %s", err.AsString()); } - return channelInfo; + return err; } -Commands::ChangeChannelResponse::Type ChannelManager::HandleChangeChannel(const chip::CharSpan & match) +void ChannelManager::HandleChangeChannel( + const chip::CharSpan & match, + chip::app::CommandResponseHelper & responser) { std::string name(match.data(), match.size()); JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -225,11 +263,15 @@ Commands::ChangeChannelResponse::Type ChannelManager::HandleChangeChannel(const ChipLogError(DeviceLayer, "Java exception in ChannelManager::HandleChangeChannel"); env->ExceptionDescribe(); env->ExceptionClear(); - return response; + goto exit; } jclass channelClass = env->GetObjectClass(channelObject); + jfieldID getErrorTypeField = env->GetFieldID(channelClass, "errorType", "I"); + jint jerrorType = env->GetIntField(channelObject, getErrorTypeField); + response.errorType = static_cast(jerrorType); + jfieldID getCallSignField = env->GetFieldID(channelClass, "callSign", "Ljava/lang/String;"); jstring jcallSign = static_cast(env->GetObjectField(channelObject, getCallSignField)); if (jcallSign != NULL) @@ -243,14 +285,14 @@ Commands::ChangeChannelResponse::Type ChannelManager::HandleChangeChannel(const if (jname != NULL) { JniUtfString junitname(env, jname); - response.channelMatch.callSign = junitname.charSpan(); + response.channelMatch.name = junitname.charSpan(); } jfieldID getJaffiliateCallSignField = env->GetFieldID(channelClass, "affiliateCallSign", "Ljava/lang/String;"); jstring jaffiliateCallSign = static_cast(env->GetObjectField(channelObject, getJaffiliateCallSignField)); if (jaffiliateCallSign != NULL) { JniUtfString affiliateCallSign(env, jaffiliateCallSign); - response.channelMatch.callSign = affiliateCallSign.charSpan(); + response.channelMatch.affiliateCallSign = affiliateCallSign.charSpan(); } jfieldID majorNumField = env->GetFieldID(channelClass, "majorNumber", "I"); @@ -259,12 +301,13 @@ Commands::ChangeChannelResponse::Type ChannelManager::HandleChangeChannel(const jfieldID minorNumField = env->GetFieldID(channelClass, "minorNumber", "I"); jint jminorNum = env->GetIntField(channelObject, minorNumField); - response.channelMatch.majorNumber = static_cast(jminorNum); + response.channelMatch.minorNumber = static_cast(jminorNum); + + responser.Success(response); } exit: - - return response; + return; } bool ChannelManager::HandleChangeChannelByNumber(const uint16_t & majorNumber, const uint16_t & minorNumber) @@ -372,20 +415,3 @@ void ChannelManager::InitializeWithObjects(jobject managerObject) env->ExceptionClear(); } } - -ChannelManager ChannelManager::sInstance; - -/** @brief Channel Cluster Init - * - * This function is called when a specific cluster is initialized. It gives the - * application an opportunity to take care of cluster initialization procedures. - * It is called exactly once for each endpoint where cluster is present. - * - * @param endpoint Ver.: always - * - */ -void emberAfChannelClusterInitCallback(EndpointId endpoint) -{ - ChipLogProgress(Zcl, "TV Android App: Channel::SetDefaultDelegate"); - chip::app::Clusters::Channel::SetDefaultDelegate(endpoint, &channelManager); -} diff --git a/examples/tv-app/android/java/ChannelManager.h b/examples/tv-app/android/java/ChannelManager.h index 0ed1659d7e51e8..e898c56c7e5093 100644 --- a/examples/tv-app/android/java/ChannelManager.h +++ b/examples/tv-app/android/java/ChannelManager.h @@ -23,20 +23,20 @@ class ChannelManager : public chip::app::Clusters::Channel::Delegate { public: + static void NewManager(jint endpoint, jobject manager); void InitializeWithObjects(jobject managerObject); - std::list HandleGetChannelList() override; - chip::app::Clusters::Channel::Structs::LineupInfo::Type HandleGetLineup() override; - chip::app::Clusters::Channel::Structs::ChannelInfo::Type HandleGetCurrentChannel() override; + virtual CHIP_ERROR HandleGetChannelList(chip::app::AttributeValueEncoder & aEncoder) override; + virtual CHIP_ERROR HandleGetLineup(chip::app::AttributeValueEncoder & aEncoder) override; + virtual CHIP_ERROR HandleGetCurrentChannel(chip::app::AttributeValueEncoder & aEncoder) override; - chip::app::Clusters::Channel::Commands::ChangeChannelResponse::Type HandleChangeChannel(const chip::CharSpan & match) override; + virtual void HandleChangeChannel( + const chip::CharSpan & match, + chip::app::CommandResponseHelper & responser) override; bool HandleChangeChannelByNumber(const uint16_t & majorNumber, const uint16_t & minorNumber) override; bool HandleSkipChannel(const uint16_t & count) override; private: - friend ChannelManager & ChannelMgr(); - - static ChannelManager sInstance; jobject mChannelManagerObject = nullptr; jmethodID mGetChannelListMethod = nullptr; jmethodID mGetLineupMethod = nullptr; @@ -46,8 +46,3 @@ class ChannelManager : public chip::app::Clusters::Channel::Delegate jmethodID mChangeChannelByNumberMethod = nullptr; jmethodID mSkipChannelMethod = nullptr; }; - -inline class ChannelManager & ChannelMgr() -{ - return ChannelManager::sInstance; -} diff --git a/examples/tv-app/android/java/ContentLauncherManager.cpp b/examples/tv-app/android/java/ContentLauncherManager.cpp index 4298fe24c1d364..e5fa67e9d6916b 100644 --- a/examples/tv-app/android/java/ContentLauncherManager.cpp +++ b/examples/tv-app/android/java/ContentLauncherManager.cpp @@ -17,7 +17,8 @@ */ #include "ContentLauncherManager.h" - +#include "TvApp-JNI.h" +#include #include #include #include @@ -28,21 +29,23 @@ using namespace std; using namespace chip; using namespace chip::app::Clusters::ContentLauncher; -ContentLauncherManager ContentLauncherManager::sInstance; - -namespace { -static ContentLauncherManager contentLauncherManager; -} // namespace - void emberAfContentLauncherClusterInitCallback(EndpointId endpoint) { - ChipLogProgress(Zcl, "TV Linux App: ContentLauncher::SetDelegate"); - chip::app::Clusters::ContentLauncher::SetDelegate(endpoint, &contentLauncherManager); + ChipLogProgress(Zcl, "TV Android App: ContentLauncher::PostClusterInit"); + TvAppJNIMgr().PostClusterInit(chip::app::Clusters::ContentLauncher::Id, endpoint); +} + +void ContentLauncherManager::NewManager(jint endpoint, jobject manager) +{ + ChipLogProgress(Zcl, "TV Android App: ContentLauncher::SetDefaultDelegate"); + ContentLauncherManager * mgr = new ContentLauncherManager(); + mgr->InitializeWithObjects(manager); + chip::app::Clusters::ContentLauncher::SetDelegate(static_cast(endpoint), mgr); } -Commands::LaunchResponse::Type ContentLauncherManager::HandleLaunchContent(chip::EndpointId endpointId, - const std::list & parameterList, - bool autoplay, const chip::CharSpan & data) +void ContentLauncherManager::HandleLaunchContent( + const std::list & parameterList, bool autoplay, const chip::CharSpan & data, + chip::app::CommandResponseHelper & responser) { Commands::LaunchResponse::Type response; CHIP_ERROR err = CHIP_NO_ERROR; @@ -59,8 +62,8 @@ Commands::LaunchResponse::Type ContentLauncherManager::HandleLaunchContent(chip: // Todo: make parameterList java jobjectArray parameterArray = nullptr; - jobject resp = - env->CallObjectMethod(mContentLauncherManagerObject, mLaunchContentMethod, parameterArray, autoplay, jData.jniValue()); + jobject resp = env->CallObjectMethod(mContentLauncherManagerObject, mLaunchContentMethod, parameterArray, + static_cast(autoplay), jData.jniValue()); if (env->ExceptionCheck()) { ChipLogError(Zcl, "Java exception in ContentLauncherManager::LaunchContent"); @@ -83,6 +86,8 @@ Commands::LaunchResponse::Type ContentLauncherManager::HandleLaunchContent(chip: response.status = static_cast(status); response.data = dataStr.charSpan(); + + err = responser.Success(response); } exit: @@ -90,13 +95,12 @@ Commands::LaunchResponse::Type ContentLauncherManager::HandleLaunchContent(chip: { ChipLogError(Zcl, "ContentLauncherManager::LaunchContent status error: %s", err.AsString()); } - - return response; } -Commands::LaunchResponse::Type ContentLauncherManager::HandleLaunchUrl(const chip::CharSpan & contentUrl, - const chip::CharSpan & displayString, - const std::list & brandingInformation) +void ContentLauncherManager::HandleLaunchUrl( + const chip::CharSpan & contentUrl, const chip::CharSpan & displayString, + const std::list & brandingInformation, + chip::app::CommandResponseHelper & responser) { Commands::LaunchResponse::Type response; CHIP_ERROR err = CHIP_NO_ERROR; @@ -138,6 +142,8 @@ Commands::LaunchResponse::Type ContentLauncherManager::HandleLaunchUrl(const chi response.status = static_cast(status); response.data = dataStr.charSpan(); + + err = responser.Success(response); } exit: @@ -145,11 +151,9 @@ Commands::LaunchResponse::Type ContentLauncherManager::HandleLaunchUrl(const chi { ChipLogError(Zcl, "ContentLauncherManager::LaunchUrl status error: %s", err.AsString()); } - - return response; } -std::list ContentLauncherManager::HandleGetAcceptHeaderList() +CHIP_ERROR ContentLauncherManager::HandleGetAcceptHeaderList(chip::app::AttributeValueEncoder & aEncoder) { CHIP_ERROR err = CHIP_NO_ERROR; JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -160,7 +164,7 @@ std::list ContentLauncherManager::HandleGetAcceptHeaderList() VerifyOrExit(mGetAcceptHeaderMethod != nullptr, err = CHIP_ERROR_INCORRECT_STATE); VerifyOrExit(env != NULL, err = CHIP_JNI_ERROR_NO_ENV); - { + return aEncoder.EncodeList([this, env](const auto & encoder) -> CHIP_ERROR { jobjectArray acceptedHeadersArray = (jobjectArray) env->CallObjectMethod(mContentLauncherManagerObject, mGetAcceptHeaderMethod); if (env->ExceptionCheck()) @@ -168,20 +172,19 @@ std::list ContentLauncherManager::HandleGetAcceptHeaderList() ChipLogError(Zcl, "Java exception in ContentLauncherManager::GetAcceptHeader"); env->ExceptionDescribe(); env->ExceptionClear(); - err = CHIP_ERROR_INCORRECT_STATE; - goto exit; + return CHIP_ERROR_INCORRECT_STATE; } jint size = env->GetArrayLength(acceptedHeadersArray); for (int i = 0; i < size; i++) { - - jstring jAcceptedHeader = (jstring) env->GetObjectArrayElement(acceptedHeadersArray, i); - const char * convertedValue = (env)->GetStringUTFChars(jAcceptedHeader, JNI_FALSE); - std::string acceptedHeader = std::string(convertedValue, strlen(convertedValue)); - acceptedHeadersList.push_front(acceptedHeader); + jstring jAcceptedHeader = (jstring) env->GetObjectArrayElement(acceptedHeadersArray, i); + JniUtfString acceptedHeader(env, jAcceptedHeader); + ReturnErrorOnFailure(encoder.Encode(acceptedHeader.charSpan())); } - } + + return CHIP_NO_ERROR; + }); exit: if (err != CHIP_NO_ERROR) @@ -189,7 +192,7 @@ std::list ContentLauncherManager::HandleGetAcceptHeaderList() ChipLogError(Zcl, "ContentLauncherManager::GetAcceptHeader status error: %s", err.AsString()); } - return acceptedHeadersList; + return err; } uint32_t ContentLauncherManager::HandleGetSupportedStreamingProtocols() @@ -204,8 +207,8 @@ uint32_t ContentLauncherManager::HandleGetSupportedStreamingProtocols() VerifyOrExit(env != NULL, err = CHIP_JNI_ERROR_NO_ENV); { - jint jSupportedStreamingProtocols = - env->CallIntMethod(mContentLauncherManagerObject, mGetSupportedStreamingProtocolsMethod); + jlong jSupportedStreamingProtocols = + env->CallLongMethod(mContentLauncherManagerObject, mGetSupportedStreamingProtocolsMethod); supportedStreamingProtocols = (uint32_t) jSupportedStreamingProtocols; if (env->ExceptionCheck()) { @@ -244,7 +247,7 @@ void ContentLauncherManager::InitializeWithObjects(jobject managerObject) env->ExceptionClear(); } - mGetSupportedStreamingProtocolsMethod = env->GetMethodID(ContentLauncherClass, "getSupportedStreamingProtocols", "()[I"); + mGetSupportedStreamingProtocolsMethod = env->GetMethodID(ContentLauncherClass, "getSupportedStreamingProtocols", "()J"); if (mGetSupportedStreamingProtocolsMethod == nullptr) { ChipLogError(Zcl, "Failed to access ContentLauncherManager 'getSupportedStreamingProtocols' method"); @@ -253,7 +256,7 @@ void ContentLauncherManager::InitializeWithObjects(jobject managerObject) mLaunchContentMethod = env->GetMethodID( ContentLauncherClass, "launchContent", - "([Lcom/tcl/chip/tvapp/ContentLaunchSearchParameter;ZLjava/lang/String;)Lcom/tcl/chip/tvapp/LaunchResponse;"); + "([Lcom/tcl/chip/tvapp/ContentLaunchSearchParameter;ZLjava/lang/String;)Lcom/tcl/chip/tvapp/ContentLaunchResponse;"); if (mLaunchContentMethod == nullptr) { ChipLogError(Zcl, "Failed to access ContentLauncherManager 'launchContent' method"); @@ -262,7 +265,7 @@ void ContentLauncherManager::InitializeWithObjects(jobject managerObject) mLaunchUrlMethod = env->GetMethodID(ContentLauncherClass, "launchUrl", "(Ljava/lang/String;Ljava/lang/String;Lcom/tcl/chip/tvapp/" - "ContentLaunchBrandingInformation;)Lcom/tcl/chip/tvapp/LaunchResponse;"); + "ContentLaunchBrandingInformation;)Lcom/tcl/chip/tvapp/ContentLaunchResponse;"); if (mLaunchUrlMethod == nullptr) { ChipLogError(AppServer, "Failed to access 'launchUrl' method"); diff --git a/examples/tv-app/android/java/ContentLauncherManager.h b/examples/tv-app/android/java/ContentLauncherManager.h index 8ef2bc0fa8287d..22d4a099f58144 100644 --- a/examples/tv-app/android/java/ContentLauncherManager.h +++ b/examples/tv-app/android/java/ContentLauncherManager.h @@ -29,29 +29,24 @@ class ContentLauncherManager : public chip::app::Clusters::ContentLauncher::Delegate { public: + static void NewManager(jint endpoint, jobject manager); void InitializeWithObjects(jobject managerObject); - chip::app::Clusters::ContentLauncher::Commands::LaunchResponse::Type - HandleLaunchContent(chip::EndpointId endpointId, const std::list & parameterList, bool autoplay, - const chip::CharSpan & data) override; - chip::app::Clusters::ContentLauncher::Commands::LaunchResponse::Type - HandleLaunchUrl(const chip::CharSpan & contentUrl, const chip::CharSpan & displayString, - const std::list & brandingInformation) override; - std::list HandleGetAcceptHeaderList() override; + void + HandleLaunchContent(const std::list & parameterList, bool autoplay, const chip::CharSpan & data, + chip::app::CommandResponseHelper & + responser) override; + void HandleLaunchUrl(const chip::CharSpan & contentUrl, const chip::CharSpan & displayString, + const std::list & brandingInformation, + chip::app::CommandResponseHelper & + responser) override; + CHIP_ERROR HandleGetAcceptHeaderList(chip::app::AttributeValueEncoder & aEncoder) override; uint32_t HandleGetSupportedStreamingProtocols() override; private: - friend ContentLauncherManager & ContentLauncherMgr(); - - static ContentLauncherManager sInstance; jobject mContentLauncherManagerObject = nullptr; jmethodID mGetAcceptHeaderMethod = nullptr; jmethodID mGetSupportedStreamingProtocolsMethod = nullptr; jmethodID mLaunchContentMethod = nullptr; jmethodID mLaunchUrlMethod = nullptr; }; - -inline ContentLauncherManager & ContentLauncherMgr() -{ - return ContentLauncherManager::sInstance; -} diff --git a/examples/tv-app/android/java/KeypadInputManager.cpp b/examples/tv-app/android/java/KeypadInputManager.cpp index 40dc3a31132ad2..dbe9db273bb392 100644 --- a/examples/tv-app/android/java/KeypadInputManager.cpp +++ b/examples/tv-app/android/java/KeypadInputManager.cpp @@ -17,18 +17,27 @@ */ #include "KeypadInputManager.h" - +#include "TvApp-JNI.h" +#include #include #include using namespace chip; using namespace chip::app::Clusters::KeypadInput; -KeypadInputManager KeypadInputManager::sInstance; +void emberAfKeypadInputClusterInitCallback(EndpointId endpoint) +{ + ChipLogProgress(Zcl, "TV Android App: KeypadInput::PostClusterInit"); + TvAppJNIMgr().PostClusterInit(chip::app::Clusters::KeypadInput::Id, endpoint); +} -namespace { -static KeypadInputManager keypadInputManager; -} // namespace +void KeypadInputManager::NewManager(jint endpoint, jobject manager) +{ + ChipLogProgress(Zcl, "TV Android App: KeypadInput::SetDefaultDelegate"); + KeypadInputManager * mgr = new KeypadInputManager(); + mgr->InitializeWithObjects(manager); + chip::app::Clusters::KeypadInput::SetDefaultDelegate(static_cast(endpoint), mgr); +} Commands::SendKeyResponse::Type KeypadInputManager::HandleSendKey(const CecKeyCode & keyCode) { @@ -50,7 +59,7 @@ Commands::SendKeyResponse::Type KeypadInputManager::HandleSendKey(const CecKeyCo exit: if (err != CHIP_NO_ERROR) { - response.status = chip::app::Clusters::KeypadInput::StatusEnum::kSuccess; + response.status = chip::app::Clusters::KeypadInput::StatusEnum::kInvalidKeyInCurrentState; } else { @@ -77,9 +86,3 @@ void KeypadInputManager::InitializeWithObjects(jobject managerObject) env->ExceptionClear(); } } - -void emberAfKeypadInputClusterInitCallback(EndpointId endpoint) -{ - ChipLogProgress(Zcl, "TV Android App: KeypadInput::SetDefaultDelegate"); - chip::app::Clusters::KeypadInput::SetDefaultDelegate(endpoint, &keypadInputManager); -} diff --git a/examples/tv-app/android/java/KeypadInputManager.h b/examples/tv-app/android/java/KeypadInputManager.h index cb90df01c04e28..a623a5e335e46c 100644 --- a/examples/tv-app/android/java/KeypadInputManager.h +++ b/examples/tv-app/android/java/KeypadInputManager.h @@ -24,19 +24,13 @@ class KeypadInputManager : public chip::app::Clusters::KeypadInput::Delegate { public: + static void NewManager(jint endpoint, jobject manager); void InitializeWithObjects(jobject managerObject); + chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::Type HandleSendKey(const chip::app::Clusters::KeypadInput::CecKeyCode & keyCode) override; private: - friend KeypadInputManager & KeypadInputMgr(); - - static KeypadInputManager sInstance; jobject mKeypadInputManagerObject = nullptr; jmethodID mSendKeyMethod = nullptr; }; - -inline KeypadInputManager & KeypadInputMgr() -{ - return KeypadInputManager::sInstance; -} diff --git a/examples/tv-app/android/java/LowPowerManager.cpp b/examples/tv-app/android/java/LowPowerManager.cpp index 741c0e6437d82e..b7f8f56a40b93a 100644 --- a/examples/tv-app/android/java/LowPowerManager.cpp +++ b/examples/tv-app/android/java/LowPowerManager.cpp @@ -17,6 +17,8 @@ */ #include "LowPowerManager.h" +#include "TvApp-JNI.h" +#include #include #include #include @@ -26,11 +28,19 @@ using namespace chip; using namespace chip::app::Clusters::LowPower; -LowPowerManager LowPowerManager::sInstance; +void emberAfLowPowerClusterInitCallback(EndpointId endpoint) +{ + ChipLogProgress(Zcl, "TV Android App: LowPower::PostClusterInit"); + TvAppJNIMgr().PostClusterInit(chip::app::Clusters::LowPower::Id, endpoint); +} -namespace { -static LowPowerManager lowPowerManager; -} // namespace +void LowPowerManager::NewManager(jint endpoint, jobject manager) +{ + ChipLogProgress(Zcl, "TV Android App: LowPower::SetDefaultDelegate"); + LowPowerManager * mgr = new LowPowerManager(); + mgr->InitializeWithObjects(manager); + chip::app::Clusters::LowPower::SetDefaultDelegate(static_cast(endpoint), mgr); +} void LowPowerManager::InitializeWithObjects(jobject managerObject) { @@ -74,9 +84,3 @@ bool LowPowerManager::HandleSleep() exit: return static_cast(ret); } - -void emberAfLowPowerClusterInitCallback(EndpointId endpoint) -{ - ChipLogProgress(Zcl, "TV Android App: LowPower::SetDefaultDelegate"); - chip::app::Clusters::LowPower::SetDefaultDelegate(endpoint, &lowPowerManager); -} diff --git a/examples/tv-app/android/java/LowPowerManager.h b/examples/tv-app/android/java/LowPowerManager.h index 24e00fe8f2bd54..df191be746b7d8 100644 --- a/examples/tv-app/android/java/LowPowerManager.h +++ b/examples/tv-app/android/java/LowPowerManager.h @@ -26,18 +26,12 @@ class LowPowerManager : public chip::app::Clusters::LowPower::Delegate { public: + static void NewManager(jint endpoint, jobject manager); void InitializeWithObjects(jobject managerObject); + bool HandleSleep() override; private: - friend LowPowerManager & LowPowerMgr(); - - static LowPowerManager sInstance; jobject mLowPowerManagerObject = nullptr; jmethodID mSleepMethod = nullptr; }; - -inline LowPowerManager & LowPowerMgr() -{ - return LowPowerManager::sInstance; -} diff --git a/examples/tv-app/android/java/MediaInputManager.cpp b/examples/tv-app/android/java/MediaInputManager.cpp index 6ee85c2e259074..610a60dd3c749a 100644 --- a/examples/tv-app/android/java/MediaInputManager.cpp +++ b/examples/tv-app/android/java/MediaInputManager.cpp @@ -16,7 +16,8 @@ */ #include "MediaInputManager.h" - +#include "TvApp-JNI.h" +#include #include #include #include @@ -25,12 +26,6 @@ using namespace chip; using namespace chip::app::Clusters::MediaInput; -MediaInputManager MediaInputManager::sInstance; - -namespace { -static MediaInputManager mediaInputManager; -} // namespace - /** @brief Media Input Cluster Init * * This function is called when a specific cluster is initialized. It gives the @@ -41,14 +36,21 @@ static MediaInputManager mediaInputManager; * */ void emberAfMediaInputClusterInitCallback(EndpointId endpoint) +{ + ChipLogProgress(Zcl, "TV Android App: MediaInput::PostClusterInit"); + TvAppJNIMgr().PostClusterInit(chip::app::Clusters::MediaInput::Id, endpoint); +} + +void MediaInputManager::NewManager(jint endpoint, jobject manager) { ChipLogProgress(Zcl, "TV Android App: MediaInput::SetDefaultDelegate"); - chip::app::Clusters::MediaInput::SetDefaultDelegate(endpoint, &mediaInputManager); + MediaInputManager * mgr = new MediaInputManager(); + mgr->InitializeWithObjects(manager); + chip::app::Clusters::MediaInput::SetDefaultDelegate(static_cast(endpoint), mgr); } -std::list MediaInputManager::HandleGetInputList() +CHIP_ERROR MediaInputManager::HandleGetInputList(chip::app::AttributeValueEncoder & aEncoder) { - std::list list; CHIP_ERROR err = CHIP_NO_ERROR; JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -57,14 +59,14 @@ std::list MediaInputM VerifyOrExit(mGetInputListMethod != nullptr, err = CHIP_ERROR_INCORRECT_STATE); VerifyOrExit(env != NULL, err = CHIP_JNI_ERROR_NO_ENV); - { + return aEncoder.EncodeList([this, env](const auto & encoder) -> CHIP_ERROR { jobjectArray inputArray = (jobjectArray) env->CallObjectMethod(mMediaInputManagerObject, mGetInputListMethod); if (env->ExceptionCheck()) { ChipLogError(AppServer, "Java exception in MediaInputManager::HandleGetInputList"); env->ExceptionDescribe(); env->ExceptionClear(); - return list; + return CHIP_ERROR_INCORRECT_STATE; } jint size = env->GetArrayLength(inputArray); @@ -86,32 +88,34 @@ std::list MediaInputM jfieldID nameId = env->GetFieldID(inputClass, "name", "Ljava/lang/String;"); jstring jname = static_cast(env->GetObjectField(inputObj, nameId)); + JniUtfString name(env, jname); if (jname != NULL) { - JniUtfString name(env, jname); mediaInput.name = name.charSpan(); } jfieldID descriptionId = env->GetFieldID(inputClass, "description", "Ljava/lang/String;"); jstring jdescription = static_cast(env->GetObjectField(inputObj, descriptionId)); + JniUtfString description(env, jdescription); if (jdescription != NULL) { - JniUtfString description(env, jdescription); mediaInput.description = description.charSpan(); } - list.push_back(mediaInput); + ReturnErrorOnFailure(encoder.Encode(mediaInput)); } - } + + return CHIP_NO_ERROR; + }); exit: if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "MediaInputManager::HandleGetInputList status error: %s", err.AsString()); + ChipLogError(Zcl, "MediaInputManager::GetInputList status error: %s", err.AsString()); } - return list; + return err; } uint8_t MediaInputManager::HandleGetCurrentInput() @@ -219,6 +223,7 @@ bool MediaInputManager::HandleHideInputStatus() bool MediaInputManager::HandleRenameInput(const uint8_t index, const chip::CharSpan & name) { + std::string inputname(name.data(), name.size()); jboolean ret = JNI_FALSE; JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -228,7 +233,7 @@ bool MediaInputManager::HandleRenameInput(const uint8_t index, const chip::CharS VerifyOrExit(env != NULL, ChipLogError(Zcl, "env null")); { - UtfString jniInputname(env, name.data()); + UtfString jniInputname(env, inputname.data()); env->ExceptionClear(); ret = env->CallBooleanMethod(mMediaInputManagerObject, mRenameInputMethod, static_cast(index), jniInputname.jniValue()); @@ -256,7 +261,7 @@ void MediaInputManager::InitializeWithObjects(jobject managerObject) jclass MediaInputManagerClass = env->GetObjectClass(managerObject); VerifyOrReturn(MediaInputManagerClass != nullptr, ChipLogError(Zcl, "Failed to get MediaInputManager Java class")); - mGetInputListMethod = env->GetMethodID(MediaInputManagerClass, "getInputList", "()[Lcom/tcl/chip/tvapp/InputInfo;"); + mGetInputListMethod = env->GetMethodID(MediaInputManagerClass, "getInputList", "()[Lcom/tcl/chip/tvapp/MediaInputInfo;"); if (mGetInputListMethod == nullptr) { ChipLogError(Zcl, "Failed to access MediaInputManager 'getInputList' method"); diff --git a/examples/tv-app/android/java/MediaInputManager.h b/examples/tv-app/android/java/MediaInputManager.h index 8651e3321cecc6..e93e956c249e07 100644 --- a/examples/tv-app/android/java/MediaInputManager.h +++ b/examples/tv-app/android/java/MediaInputManager.h @@ -18,14 +18,17 @@ #pragma once +#include #include #include class MediaInputManager : public chip::app::Clusters::MediaInput::Delegate { public: + static void NewManager(jint endpoint, jobject manager); void InitializeWithObjects(jobject managerObject); - std::list HandleGetInputList() override; + + CHIP_ERROR HandleGetInputList(chip::app::AttributeValueEncoder & aEncoder) override; uint8_t HandleGetCurrentInput() override; bool HandleSelectInput(const uint8_t index) override; bool HandleShowInputStatus() override; @@ -33,9 +36,6 @@ class MediaInputManager : public chip::app::Clusters::MediaInput::Delegate bool HandleRenameInput(const uint8_t index, const chip::CharSpan & name) override; private: - friend MediaInputManager & MediaInputMgr(); - - static MediaInputManager sInstance; jobject mMediaInputManagerObject = nullptr; jmethodID mGetInputListMethod = nullptr; jmethodID mGetCurrentInputMethod = nullptr; @@ -44,8 +44,3 @@ class MediaInputManager : public chip::app::Clusters::MediaInput::Delegate jmethodID mHideInputStatusMethod = nullptr; jmethodID mRenameInputMethod = nullptr; }; - -inline class MediaInputManager & MediaInputMgr() -{ - return MediaInputManager::sInstance; -} diff --git a/examples/tv-app/android/java/MediaPlaybackManager.cpp b/examples/tv-app/android/java/MediaPlaybackManager.cpp index 8e3d6b6a12222d..02e6707bdf2628 100644 --- a/examples/tv-app/android/java/MediaPlaybackManager.cpp +++ b/examples/tv-app/android/java/MediaPlaybackManager.cpp @@ -16,6 +16,10 @@ */ #include "MediaPlaybackManager.h" +#include "TvApp-JNI.h" +#include +#include +#include #include #include #include @@ -25,12 +29,6 @@ using namespace chip; using namespace chip::app::Clusters::MediaPlayback; -MediaPlaybackManager MediaPlaybackManager::sInstance; - -namespace { -static MediaPlaybackManager mediaPlaybackManager; -} // namespace - /** @brief Media PlayBack Cluster Init * * This function is called when a specific cluster is initialized. It gives the @@ -41,106 +39,182 @@ static MediaPlaybackManager mediaPlaybackManager; * */ void emberAfMediaPlaybackClusterInitCallback(chip::EndpointId endpoint) +{ + ChipLogProgress(Zcl, "TV Android App: MediaPlayback::PostClusterInit"); + TvAppJNIMgr().PostClusterInit(chip::app::Clusters::MediaPlayback::Id, endpoint); +} + +void MediaPlaybackManager::NewManager(jint endpoint, jobject manager) { ChipLogProgress(Zcl, "TV Android App: MediaPlayback::SetDefaultDelegate"); - chip::app::Clusters::MediaPlayback::SetDefaultDelegate(endpoint, &mediaPlaybackManager); + MediaPlaybackManager * mgr = new MediaPlaybackManager(); + mgr->InitializeWithObjects(manager); + chip::app::Clusters::MediaPlayback::SetDefaultDelegate(static_cast(endpoint), mgr); } PlaybackStateEnum MediaPlaybackManager::HandleGetCurrentState() { - return PlaybackStateEnum::kPlaying; + uint64_t ret = HandleMediaRequestGetAttribute(MEDIA_PLAYBACK_ATTRIBUTE_PLAYBACK_STATE); + return static_cast(ret); } uint64_t MediaPlaybackManager::HandleGetStartTime() { - return 0; + return HandleMediaRequestGetAttribute(MEDIA_PLAYBACK_ATTRIBUTE_START_TIME); } uint64_t MediaPlaybackManager::HandleGetDuration() { - return 0; -} - -Structs::PlaybackPosition::Type MediaPlaybackManager::HandleGetSampledPosition() -{ - Structs::PlaybackPosition::Type sampledPosition; - sampledPosition.updatedAt = 0; - sampledPosition.position = 0; - return sampledPosition; + return HandleMediaRequestGetAttribute(MEDIA_PLAYBACK_ATTRIBUTE_DURATION); } float MediaPlaybackManager::HandleGetPlaybackSpeed() { - return 0; + uint64_t ret = HandleMediaRequestGetAttribute(MEDIA_PLAYBACK_ATTRIBUTE_SPEED); + return static_cast(ret) / 10000.0f; } uint64_t MediaPlaybackManager::HandleGetSeekRangeStart() { - return 0; + return HandleMediaRequestGetAttribute(MEDIA_PLAYBACK_ATTRIBUTE_SEEK_RANGE_START); } uint64_t MediaPlaybackManager::HandleGetSeekRangeEnd() { - return 0; + return HandleMediaRequestGetAttribute(MEDIA_PLAYBACK_ATTRIBUTE_SEEK_RANGE_END); } Commands::PlaybackResponse::Type MediaPlaybackManager::HandlePlay() { - return MediaPlaybackMgr().HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_PLAY, 0); + return HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_PLAY, 0); } Commands::PlaybackResponse::Type MediaPlaybackManager::HandlePause() { - return MediaPlaybackMgr().HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_PAUSE, 0); + return HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_PAUSE, 0); } Commands::PlaybackResponse::Type MediaPlaybackManager::HandleStop() { - return MediaPlaybackMgr().HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_STOP, 0); + return HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_STOP, 0); } Commands::PlaybackResponse::Type MediaPlaybackManager::HandleFastForward() { - return MediaPlaybackMgr().HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_FAST_FORWARD, 0); + return HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_FAST_FORWARD, 0); } Commands::PlaybackResponse::Type MediaPlaybackManager::HandlePrevious() { - return MediaPlaybackMgr().HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_PREVIOUS, 0); + return HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_PREVIOUS, 0); } Commands::PlaybackResponse::Type MediaPlaybackManager::HandleRewind() { - return MediaPlaybackMgr().HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_REWIND, 0); + return HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_REWIND, 0); } Commands::PlaybackResponse::Type MediaPlaybackManager::HandleSkipBackward(const uint64_t & deltaPositionMilliseconds) { - return MediaPlaybackMgr().HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_SKIP_BACKWARD, deltaPositionMilliseconds); + return HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_SKIP_BACKWARD, deltaPositionMilliseconds); } Commands::PlaybackResponse::Type MediaPlaybackManager::HandleSkipForward(const uint64_t & deltaPositionMilliseconds) { - return MediaPlaybackMgr().HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_SKIP_FORWARD, deltaPositionMilliseconds); + return HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_SKIP_FORWARD, deltaPositionMilliseconds); } Commands::PlaybackResponse::Type MediaPlaybackManager::HandleSeekRequest(const uint64_t & positionMilliseconds) { - return MediaPlaybackMgr().HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_SEEK, positionMilliseconds); + return HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_SEEK, positionMilliseconds); } Commands::PlaybackResponse::Type MediaPlaybackManager::HandleNext() { - return MediaPlaybackMgr().HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_NEXT, 0); + return HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_NEXT, 0); } Commands::PlaybackResponse::Type MediaPlaybackManager::HandleStartOverRequest() { - return MediaPlaybackMgr().HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_START_OVER, 0); + return HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_START_OVER, 0); +} + +void MediaPlaybackManager::InitializeWithObjects(jobject managerObject) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Failed to GetEnvForCurrentThread for MediaPlaybackManager")); + + mMediaPlaybackManagerObject = env->NewGlobalRef(managerObject); + VerifyOrReturn(mMediaPlaybackManagerObject != nullptr, ChipLogError(Zcl, "Failed to NewGlobalRef MediaPlaybackManager")); + + jclass mMediaPlaybackManagerClass = env->GetObjectClass(managerObject); + VerifyOrReturn(mMediaPlaybackManagerClass != nullptr, ChipLogError(Zcl, "Failed to get MediaPlaybackManager Java class")); + + mGetAttributeMethod = env->GetMethodID(mMediaPlaybackManagerClass, "getAttributes", "(I)J"); + if (mGetAttributeMethod == nullptr) + { + ChipLogError(Zcl, "Failed to access MediaPlaybackManager 'getAttributes' method"); + env->ExceptionClear(); + } + + mRequestMethod = env->GetMethodID(mMediaPlaybackManagerClass, "request", "(IJ)I"); + if (mRequestMethod == nullptr) + { + ChipLogError(Zcl, "Failed to access MediaPlaybackManager 'request' method"); + env->ExceptionClear(); + } + + mGetPositionMethod = + env->GetMethodID(mMediaPlaybackManagerClass, "getPosition", "()[Lcom/tcl/chip/tvapp/MediaPlaybackPosition;"); + if (mGetPositionMethod == nullptr) + { + ChipLogError(Zcl, "Failed to access MediaPlaybackManager 'getPosition' method"); + env->ExceptionClear(); + } +} + +uint64_t MediaPlaybackManager::HandleMediaRequestGetAttribute(MediaPlaybackRequestAttribute attribute) +{ + uint64_t ret = std::numeric_limits::max(); + jlong jAttributeValue = -1; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + + ChipLogProgress(Zcl, "Received MediaPlaybackManager::HandleMediaRequestGetAttribute:%d", attribute); + VerifyOrExit(mMediaPlaybackManagerObject != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(mGetAttributeMethod != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(env != NULL, err = CHIP_JNI_ERROR_NO_ENV); + + jAttributeValue = env->CallLongMethod(mMediaPlaybackManagerObject, mGetAttributeMethod, static_cast(attribute)); + if (env->ExceptionCheck()) + { + ChipLogError(AppServer, "Java exception in MediaPlaybackManager::GetAttribute"); + env->ExceptionDescribe(); + env->ExceptionClear(); + goto exit; + } + + if (jAttributeValue >= 0) + { + ret = static_cast(jAttributeValue); + } + else + { + err = CHIP_ERROR_INCORRECT_STATE; + } + +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "MediaPlaybackManager::GetAttribute status error: %s", err.AsString()); + } + + return ret; } Commands::PlaybackResponse::Type MediaPlaybackManager::HandleMediaRequest(MediaPlaybackRequest mediaPlaybackRequest, uint64_t deltaPositionMilliseconds) + { Commands::PlaybackResponse::Type response; @@ -164,38 +238,56 @@ Commands::PlaybackResponse::Type MediaPlaybackManager::HandleMediaRequest(MediaP env->ExceptionClear(); response.status = StatusEnum::kInvalidStateForCommand; } + response.status = static_cast(ret); exit: if (err != CHIP_NO_ERROR) { response.status = StatusEnum::kInvalidStateForCommand; + ChipLogError(Zcl, "MediaPlaybackManager::HandleMediaRequest status error: %s", err.AsString()); } return response; } -void MediaPlaybackManager::InitializeWithObjects(jobject managerObject) +Structs::PlaybackPosition::Type MediaPlaybackManager::HandleGetSampledPosition() { - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Failed to GetEnvForCurrentThread for MediaPlaybackManager")); + Structs::PlaybackPosition::Type response; + response.updatedAt = 0; + response.position = 0; - mMediaPlaybackManagerObject = env->NewGlobalRef(managerObject); - VerifyOrReturn(mMediaPlaybackManagerObject != nullptr, ChipLogError(Zcl, "Failed to NewGlobalRef MediaPlaybackManager")); + jobject positionObj; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jclass mMediaPlaybackManagerClass = env->GetObjectClass(managerObject); - VerifyOrReturn(mMediaPlaybackManagerClass != nullptr, ChipLogError(Zcl, "Failed to get MediaPlaybackManager Java class")); + ChipLogProgress(Zcl, "MediaPlaybackManager::HandleGetSampledPosition"); + VerifyOrExit(mMediaPlaybackManagerObject != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(mGetPositionMethod != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(env != NULL, err = CHIP_JNI_ERROR_NO_ENV); - mGetAttributeMethod = env->GetMethodID(mMediaPlaybackManagerClass, "getAttributes", "(I)J"); - if (mGetAttributeMethod == nullptr) + env->ExceptionClear(); + positionObj = env->CallObjectMethod(mMediaPlaybackManagerObject, mGetPositionMethod); + if (env->ExceptionCheck()) { - ChipLogError(Zcl, "Failed to access MediaPlaybackManager 'getMediaPlaybackAttribute' method"); + ChipLogError(AppServer, "Java exception in MediaPlaybackManager::HandleGetSampledPosition"); + env->ExceptionDescribe(); env->ExceptionClear(); + goto exit; } - mRequestMethod = env->GetMethodID(mMediaPlaybackManagerClass, "request", "(IJ)I"); - if (mRequestMethod == nullptr) { - ChipLogError(Zcl, "Failed to access MediaPlaybackManager 'proxyMediaPlaybackRequest' method"); - env->ExceptionClear(); + jclass inputClass = env->GetObjectClass(positionObj); + jfieldID positionId = env->GetFieldID(inputClass, "position", "J"); + jfieldID updatedAtId = env->GetFieldID(inputClass, "updatedAt", "J"); + response.position = static_cast(env->GetIntField(positionObj, positionId)); + response.updatedAt = static_cast(env->GetIntField(positionObj, updatedAtId)); } + +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "MediaPlaybackManager::GetAttribute status error: %s", err.AsString()); + } + + return response; } diff --git a/examples/tv-app/android/java/MediaPlaybackManager.h b/examples/tv-app/android/java/MediaPlaybackManager.h index 12aaeab077bfa0..a9479011294c26 100644 --- a/examples/tv-app/android/java/MediaPlaybackManager.h +++ b/examples/tv-app/android/java/MediaPlaybackManager.h @@ -19,8 +19,20 @@ #pragma once #include +#include #include +enum MediaPlaybackRequestAttribute : uint8_t +{ + MEDIA_PLAYBACK_ATTRIBUTE_PLAYBACK_STATE = 0, + MEDIA_PLAYBACK_ATTRIBUTE_START_TIME = 1, + MEDIA_PLAYBACK_ATTRIBUTE_DURATION = 2, + MEDIA_PLAYBACK_ATTRIBUTE_SPEED = 3, + MEDIA_PLAYBACK_ATTRIBUTE_SEEK_RANGE_END = 4, + MEDIA_PLAYBACK_ATTRIBUTE_SEEK_RANGE_START = 5, + MEDIA_PLAYBACK_ATTRIBUTE_COUNT, +}; + enum MediaPlaybackRequest : uint8_t { MEDIA_PLAYBACK_REQUEST_PLAY = 0, @@ -39,7 +51,9 @@ enum MediaPlaybackRequest : uint8_t class MediaPlaybackManager : public chip::app::Clusters::MediaPlayback::Delegate { public: + static void NewManager(jint endpoint, jobject manager); void InitializeWithObjects(jobject managerObject); + chip::app::Clusters::MediaPlayback::PlaybackStateEnum HandleGetCurrentState() override; uint64_t HandleGetStartTime() override; uint64_t HandleGetDuration() override; @@ -62,19 +76,14 @@ class MediaPlaybackManager : public chip::app::Clusters::MediaPlayback::Delegate HandleSeekRequest(const uint64_t & positionMilliseconds) override; chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Type HandleNext() override; chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Type HandleStartOverRequest() override; - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Type - HandleMediaRequest(MediaPlaybackRequest mediaPlaybackRequest, uint64_t deltaPositionMilliseconds); private: - friend MediaPlaybackManager & MediaPlaybackMgr(); - - static MediaPlaybackManager sInstance; jobject mMediaPlaybackManagerObject = nullptr; jmethodID mRequestMethod = nullptr; jmethodID mGetAttributeMethod = nullptr; -}; + jmethodID mGetPositionMethod = nullptr; -inline MediaPlaybackManager & MediaPlaybackMgr() -{ - return MediaPlaybackManager::sInstance; -} + uint64_t HandleMediaRequestGetAttribute(MediaPlaybackRequestAttribute attribute); + chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Type + HandleMediaRequest(MediaPlaybackRequest mediaPlaybackRequest, uint64_t deltaPositionMilliseconds); +}; diff --git a/examples/tv-app/android/java/TVApp-JNI.cpp b/examples/tv-app/android/java/TVApp-JNI.cpp index 6a637c0e168688..f8a1100f5f11ba 100644 --- a/examples/tv-app/android/java/TVApp-JNI.cpp +++ b/examples/tv-app/android/java/TVApp-JNI.cpp @@ -16,6 +16,7 @@ * */ +#include "TvApp-JNI.h" #include "ChannelManager.h" #include "ContentLauncherManager.h" #include "KeypadInputManager.h" @@ -27,9 +28,48 @@ #include #include #include +#include + +using namespace chip; #define JNI_METHOD(RETURN, METHOD_NAME) extern "C" JNIEXPORT RETURN JNICALL Java_com_tcl_chip_tvapp_TvApp_##METHOD_NAME +TvAppJNI TvAppJNI::sInstance; + +void TvAppJNI::InitializeWithObjects(jobject app) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Failed to GetEnvForCurrentThread for TvAppJNI")); + + mTvAppObject = env->NewGlobalRef(app); + VerifyOrReturn(mTvAppObject != nullptr, ChipLogError(Zcl, "Failed to NewGlobalRef TvAppJNI")); + + jclass managerClass = env->GetObjectClass(mTvAppObject); + VerifyOrReturn(managerClass != nullptr, ChipLogError(Zcl, "Failed to get TvAppJNI Java class")); + + mPostClusterInitMethod = env->GetMethodID(managerClass, "postClusterInit", "(II)V"); + if (mPostClusterInitMethod == nullptr) + { + ChipLogError(Zcl, "Failed to access ChannelManager 'postClusterInit' method"); + env->ExceptionClear(); + } +} + +void TvAppJNI::PostClusterInit(int clusterId, int endpoint) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Failed to GetEnvForCurrentThread for TvAppJNI::PostClusterInit")); + VerifyOrReturn(mTvAppObject != nullptr, ChipLogError(Zcl, "TvAppJNI::mTvAppObject null")); + VerifyOrReturn(mPostClusterInitMethod != nullptr, ChipLogError(Zcl, "TvAppJNI::mPostClusterInitMethod null")); + + env->CallVoidMethod(mTvAppObject, mPostClusterInitMethod, static_cast(clusterId), static_cast(endpoint)); + if (env->ExceptionCheck()) + { + ChipLogError(Zcl, "Failed to call TvAppJNI 'postClusterInit' method"); + env->ExceptionClear(); + } +} + jint JNI_OnLoad(JavaVM * jvm, void * reserved) { return AndroidAppServerJNI_OnLoad(jvm, reserved); @@ -40,37 +80,42 @@ void JNI_OnUnload(JavaVM * jvm, void * reserved) return AndroidAppServerJNI_OnUnload(jvm, reserved); } -JNI_METHOD(void, setKeypadInputManager)(JNIEnv *, jobject, jobject manager) +JNI_METHOD(void, nativeInit)(JNIEnv *, jobject app) +{ + TvAppJNIMgr().InitializeWithObjects(app); +} + +JNI_METHOD(void, setKeypadInputManager)(JNIEnv *, jobject, jint endpoint, jobject manager) { - KeypadInputMgr().InitializeWithObjects(manager); + KeypadInputManager::NewManager(endpoint, manager); } -JNI_METHOD(void, setWakeOnLanManager)(JNIEnv *, jobject, jobject manager) +JNI_METHOD(void, setWakeOnLanManager)(JNIEnv *, jobject, jint endpoint, jobject manager) { - WakeOnLanMgr().InitializeWithObjects(manager); + WakeOnLanManager::NewManager(endpoint, manager); } -JNI_METHOD(void, setMediaInputManager)(JNIEnv *, jobject, jobject manager) +JNI_METHOD(void, setMediaInputManager)(JNIEnv *, jobject, jint endpoint, jobject manager) { - MediaInputMgr().InitializeWithObjects(manager); + MediaInputManager::NewManager(endpoint, manager); } -JNI_METHOD(void, setContentLaunchManager)(JNIEnv *, jobject, jobject manager) +JNI_METHOD(void, setContentLaunchManager)(JNIEnv *, jobject, jint endpoint, jobject manager) { - ContentLauncherMgr().InitializeWithObjects(manager); + ContentLauncherManager::NewManager(endpoint, manager); } -JNI_METHOD(void, setLowPowerManager)(JNIEnv *, jobject, jobject manager) +JNI_METHOD(void, setLowPowerManager)(JNIEnv *, jobject, jint endpoint, jobject manager) { - LowPowerMgr().InitializeWithObjects(manager); + LowPowerManager::NewManager(endpoint, manager); } -JNI_METHOD(void, setMediaPlaybackManager)(JNIEnv *, jobject, jobject manager) +JNI_METHOD(void, setMediaPlaybackManager)(JNIEnv *, jobject, jint endpoint, jobject manager) { - MediaPlaybackMgr().InitializeWithObjects(manager); + MediaPlaybackManager::NewManager(endpoint, manager); } -JNI_METHOD(void, setChannelManager)(JNIEnv *, jobject, jobject manager) +JNI_METHOD(void, setChannelManager)(JNIEnv *, jobject, jint endpoint, jobject manager) { - ChannelMgr().InitializeWithObjects(manager); + ChannelManager::NewManager(endpoint, manager); } diff --git a/examples/tv-app/android/java/TvApp-JNI.h b/examples/tv-app/android/java/TvApp-JNI.h new file mode 100644 index 00000000000000..36033727a42817 --- /dev/null +++ b/examples/tv-app/android/java/TvApp-JNI.h @@ -0,0 +1,40 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * 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. + */ + +#pragma once + +#include + +class TvAppJNI +{ +public: + void InitializeWithObjects(jobject app); + void PostClusterInit(int clusterId, int endpoint); + +private: + friend TvAppJNI & TvAppJNIMgr(); + + static TvAppJNI sInstance; + jobject mTvAppObject = nullptr; + jmethodID mPostClusterInitMethod = nullptr; +}; + +inline class TvAppJNI & TvAppJNIMgr() +{ + return TvAppJNI::sInstance; +} diff --git a/examples/tv-app/android/java/WakeOnLanManager.cpp b/examples/tv-app/android/java/WakeOnLanManager.cpp index 8c9c7f26bbace1..99b4dc089dc250 100644 --- a/examples/tv-app/android/java/WakeOnLanManager.cpp +++ b/examples/tv-app/android/java/WakeOnLanManager.cpp @@ -17,7 +17,8 @@ */ #include "WakeOnLanManager.h" - +#include "TvApp-JNI.h" +#include #include #include #include @@ -25,12 +26,6 @@ using namespace chip; using namespace chip::app::Clusters::WakeOnLan; -WakeOnLanManager WakeOnLanManager::sInstance; - -namespace { -static WakeOnLanManager wakeOnLanManager; -} // namespace - /** @brief Wake On LAN Cluster Init * * This function is called when a specific cluster is initialized. It gives the @@ -42,13 +37,21 @@ static WakeOnLanManager wakeOnLanManager; */ void emberAfWakeOnLanClusterInitCallback(chip::EndpointId endpoint) { - ChipLogProgress(Zcl, "TV Android App: WakeOnLan::SetDefaultDelegate"); - chip::app::Clusters::WakeOnLan::SetDefaultDelegate(endpoint, &wakeOnLanManager); + ChipLogProgress(Zcl, "TV Android App: WakeOnLan::PostClusterInit"); + TvAppJNIMgr().PostClusterInit(chip::app::Clusters::WakeOnLan::Id, endpoint); } -chip::CharSpan WakeOnLanManager::HandleGetMacAddress() +void WakeOnLanManager::NewManager(jint endpoint, jobject manager) { + ChipLogProgress(Zcl, "TV Android App: WakeOnLan::SetDefaultDelegate"); + WakeOnLanManager * mgr = new WakeOnLanManager(); + mgr->InitializeWithObjects(manager); + chip::app::Clusters::WakeOnLan::SetDefaultDelegate(static_cast(endpoint), mgr); +} +CHIP_ERROR WakeOnLanManager::HandleGetMacAddress(chip::app::AttributeValueEncoder & aEncoder) +{ + jobject javaMac; CHIP_ERROR err = CHIP_NO_ERROR; JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); chip::CharSpan macValue; @@ -58,27 +61,25 @@ chip::CharSpan WakeOnLanManager::HandleGetMacAddress() VerifyOrExit(mGetMacMethod != nullptr, err = CHIP_ERROR_INCORRECT_STATE); VerifyOrExit(env != NULL, err = CHIP_JNI_ERROR_NO_ENV); + env->ExceptionClear(); + javaMac = env->CallObjectMethod(mWakeOnLanManagerObject, mGetMacMethod); + if (env->ExceptionCheck()) { + ChipLogError(DeviceLayer, "Java exception in WakeOnLanManager::getMac"); + env->ExceptionDescribe(); env->ExceptionClear(); - jobject javaMac = env->CallObjectMethod(mWakeOnLanManagerObject, mGetMacMethod, static_cast(1)); - if (env->ExceptionCheck()) - { - ChipLogError(DeviceLayer, "Java exception in WakeOnLanManager::getMac"); - env->ExceptionDescribe(); - env->ExceptionClear(); - return macValue; - } - - macValue = chip::JniUtfString(env, static_cast(javaMac)).charSpan(); + goto exit; } + macValue = chip::JniUtfString(env, static_cast(javaMac)).charSpan(); + exit: if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "WakeOnLanManager::HandleGetMacAddress status error: %s", err.AsString()); } - return macValue; + return aEncoder.Encode(macValue); } void WakeOnLanManager::InitializeWithObjects(jobject managerObject) @@ -92,7 +93,7 @@ void WakeOnLanManager::InitializeWithObjects(jobject managerObject) jclass WakeOnLanManagerClass = env->GetObjectClass(managerObject); VerifyOrReturn(WakeOnLanManagerClass != nullptr, ChipLogError(Zcl, "Failed to get WakeOnLanManager Java class")); - mGetMacMethod = env->GetMethodID(WakeOnLanManagerClass, "getMac", "(I)Ljava/lang/String;"); + mGetMacMethod = env->GetMethodID(WakeOnLanManagerClass, "getMac", "()Ljava/lang/String;"); if (mGetMacMethod == nullptr) { ChipLogError(Zcl, "Failed to access WakeOnLanManager 'getMac' method"); diff --git a/examples/tv-app/android/java/WakeOnLanManager.h b/examples/tv-app/android/java/WakeOnLanManager.h index 69327737a45335..f837572c377168 100644 --- a/examples/tv-app/android/java/WakeOnLanManager.h +++ b/examples/tv-app/android/java/WakeOnLanManager.h @@ -24,18 +24,12 @@ class WakeOnLanManager : public chip::app::Clusters::WakeOnLan::Delegate { public: + static void NewManager(jint endpoint, jobject manager); void InitializeWithObjects(jobject managerObject); - chip::CharSpan HandleGetMacAddress() override; -private: - friend WakeOnLanManager & WakeOnLanMgr(); + CHIP_ERROR HandleGetMacAddress(chip::app::AttributeValueEncoder & aEncoder) override; - static WakeOnLanManager sInstance; +private: jobject mWakeOnLanManagerObject = nullptr; jmethodID mGetMacMethod = nullptr; }; - -inline WakeOnLanManager & WakeOnLanMgr() -{ - return WakeOnLanManager::sInstance; -} diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ChannelInfo.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ChannelInfo.java index b383b789a9d78c..b291deb7e6f488 100644 --- a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ChannelInfo.java +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ChannelInfo.java @@ -18,16 +18,21 @@ package com.tcl.chip.tvapp; public class ChannelInfo { - public int majorNumber; - public int minorNumber; - public String name; - public String callSign; - public String affiliateCallSign; - public ChannelInfo() {} + public static final int kNoError = -1; // todo: what will be the value of no error? + public static final int kMultipleMatches = 0; + public static final int kNoMatches = 1; + + private int errorType; + private int majorNumber; + private int minorNumber; + private String name; + private String callSign; + private String affiliateCallSign; public ChannelInfo( int majorNumber, int minorNumber, String name, String callSign, String affiliateCallSign) { + this.errorType = kNoError; this.majorNumber = majorNumber; this.minorNumber = minorNumber; this.name = name; @@ -35,10 +40,16 @@ public ChannelInfo( this.affiliateCallSign = affiliateCallSign; } + public ChannelInfo(int errorType) { + this.errorType = errorType; + } + @Override public String toString() { return "ChannelInfo{" - + "majorNumber=" + + "errorType=" + + errorType + + ", majorNumber=" + majorNumber + ", minorNumber=" + minorNumber diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ChannelManagerStub.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ChannelManagerStub.java index 2b76098750595b..c1ed8d0e07f8a5 100644 --- a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ChannelManagerStub.java +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ChannelManagerStub.java @@ -20,46 +20,73 @@ import android.util.Log; public class ChannelManagerStub implements ChannelManager { - private static final String TAG = "ChannelManagerStub"; + private static final String TAG = ChannelManagerStub.class.getSimpleName(); + + private int endpoint; + + public ChannelManagerStub(int endpoint) { + this.endpoint = endpoint; + } @Override public ChannelInfo[] getChannelList() { - ChannelInfo ChannelInfo1 = new ChannelInfo(1, 1, "HDMI1", "callSign1", "affiliateCallSign1"); - ChannelInfo ChannelInfo2 = new ChannelInfo(2, 2, "HDMI2", "callSign2", "affiliateCallSign2"); - Log.d(TAG, "getChannelList"); + ChannelInfo ChannelInfo1 = new ChannelInfo(1, 11, "HDMI1", "callSign1", "affiliateCallSign1"); + ChannelInfo ChannelInfo2 = new ChannelInfo(2, 22, "HDMI2", "callSign2", "affiliateCallSign2"); + Log.d(TAG, "getChannelList at " + endpoint); return new ChannelInfo[] {ChannelInfo1, ChannelInfo2}; } @Override public ChannelLineupInfo getLineup() { ChannelLineupInfo lineupInfo = new ChannelLineupInfo("operator", "lineup", "postalCode"); - Log.d(TAG, "getChannelLineup: " + lineupInfo); + Log.d(TAG, "getChannelLineup: " + lineupInfo + " at " + endpoint); return lineupInfo; } @Override public ChannelInfo getCurrentChannel() { - Log.d(TAG, "getCurrentChannel: "); + Log.d(TAG, "getCurrentChannel: at " + endpoint); return new ChannelInfo(1, 1, "HDMI", "callSign", "affiliateCallSign"); } @Override public ChannelInfo changeChannel(String match) { - Log.d(TAG, "changeChannel: " + match); - return new ChannelInfo(1, 1, "HDMI", "callSign", "affiliateCallSign"); + Log.d(TAG, "changeChannel: " + match + " at " + endpoint); + if ("no".equals(match)) { + return new ChannelInfo(ChannelInfo.kNoMatches); + } else if ("multiple".equals(match)) { + return new ChannelInfo(ChannelInfo.kMultipleMatches); + } else { + return new ChannelInfo(1, 1, "HDMI", "callSign", "affiliateCallSign"); + } } @Override public boolean changeChannelByNumber(int majorNumber, int minorNumber) { Log.d( TAG, - "changeChannelByNumber: majorNumber = " + majorNumber + " minorNumber = " + minorNumber); + "changeChannelByNumber: majorNumber = " + + majorNumber + + " minorNumber = " + + minorNumber + + " at " + + endpoint); + + // for failed test + if (majorNumber == 1 && minorNumber == 1) { + return false; + } return true; } @Override public boolean skipChannel(int count) { - Log.d(TAG, "skipChannel: count = " + count); + Log.d(TAG, "skipChannel: count = " + count + " at " + endpoint); + + // for failed test + if (count == 100) { + return false; + } return true; } } diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/Clusters.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/Clusters.java new file mode 100644 index 00000000000000..37fd495fcff7e6 --- /dev/null +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/Clusters.java @@ -0,0 +1,138 @@ +/* + * + * 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. + */ +package com.tcl.chip.tvapp; + +public class Clusters { + + public static final int ClusterId_PowerConfiguration = 0x00000001; + public static final int ClusterId_DeviceTemperatureConfiguration = 0x00000002; + public static final int ClusterId_Identify = 0x00000003; + public static final int ClusterId_Groups = 0x00000004; + public static final int ClusterId_Scenes = 0x00000005; + public static final int ClusterId_OnOff = 0x00000006; + public static final int ClusterId_OnOffSwitchConfiguration = 0x00000007; + public static final int ClusterId_LevelControl = 0x00000008; + public static final int ClusterId_Alarms = 0x00000009; + public static final int ClusterId_Time = 0x0000000A; + public static final int ClusterId_BinaryInputBasic = 0x0000000F; + public static final int ClusterId_PowerProfile = 0x0000001A; + public static final int ClusterId_ApplianceControl = 0x0000001B; + public static final int ClusterId_PulseWidthModulation = 0x0000001C; + public static final int ClusterId_Descriptor = 0x0000001D; + public static final int ClusterId_Binding = 0x0000001E; + public static final int ClusterId_AccessControl = 0x0000001F; + public static final int ClusterId_PollControl = 0x00000020; + public static final int ClusterId_BridgedActions = 0x00000025; + public static final int ClusterId_Basic = 0x00000028; + public static final int ClusterId_OtaSoftwareUpdateProvider = 0x00000029; + public static final int ClusterId_OtaSoftwareUpdateRequestor = 0x0000002A; + public static final int ClusterId_LocalizationConfiguration = 0x0000002B; + public static final int ClusterId_LocalizationTimeFormat = 0x0000002C; + public static final int ClusterId_LocalizationUnit = 0x0000002D; + public static final int ClusterId_PowerSourceConfiguration = 0x0000002E; + public static final int ClusterId_PowerSource = 0x0000002F; + public static final int ClusterId_GeneralCommissioning = 0x00000030; + public static final int ClusterId_NetworkCommissioning = 0x00000031; + public static final int ClusterId_DiagnosticLogs = 0x00000032; + public static final int ClusterId_GeneralDiagnostics = 0x00000033; + public static final int ClusterId_SoftwareDiagnostics = 0x00000034; + public static final int ClusterId_ThreadNetworkDiagnostics = 0x00000035; + public static final int ClusterId_WiFiNetworkDiagnostics = 0x00000036; + public static final int ClusterId_EthernetNetworkDiagnostics = 0x00000037; + public static final int ClusterId_TimeSynchronization = 0x00000038; + public static final int ClusterId_BridgedDeviceBasic = 0x00000039; + public static final int ClusterId_Switch = 0x0000003B; + public static final int ClusterId_AdministratorCommissioning = 0x0000003C; + public static final int ClusterId_OperationalCredentials = 0x0000003E; + public static final int ClusterId_GroupKeyManagement = 0x0000003F; + public static final int ClusterId_FixedLabel = 0x00000040; + public static final int ClusterId_UserLabel = 0x00000041; + public static final int ClusterId_ProxyConfiguration = 0x00000042; + public static final int ClusterId_ProxyDiscovery = 0x00000043; + public static final int ClusterId_ProxyValid = 0x00000044; + public static final int ClusterId_BooleanState = 0x00000045; + public static final int ClusterId_ModeSelect = 0x00000050; + public static final int ClusterId_ShadeConfiguration = 0x00000100; + public static final int ClusterId_DoorLock = 0x00000101; + public static final int ClusterId_WindowCovering = 0x00000102; + public static final int ClusterId_BarrierControl = 0x00000103; + public static final int ClusterId_PumpConfigurationAndControl = 0x00000200; + public static final int ClusterId_Thermostat = 0x00000201; + public static final int ClusterId_FanControl = 0x00000202; + public static final int ClusterId_DehumidificationControl = 0x00000203; + public static final int ClusterId_ThermostatUserInterfaceConfiguration = 0x00000204; + public static final int ClusterId_ColorControl = 0x00000300; + public static final int ClusterId_BallastConfiguration = 0x00000301; + public static final int ClusterId_IlluminanceMeasurement = 0x00000400; + public static final int ClusterId_TemperatureMeasurement = 0x00000402; + public static final int ClusterId_PressureMeasurement = 0x00000403; + public static final int ClusterId_FlowMeasurement = 0x00000404; + public static final int ClusterId_RelativeHumidityMeasurement = 0x00000405; + public static final int ClusterId_OccupancySensing = 0x00000406; + public static final int ClusterId_CarbonMonoxideConcentrationMeasurement = 0x0000040C; + public static final int ClusterId_CarbonDioxideConcentrationMeasurement = 0x0000040D; + public static final int ClusterId_EthyleneConcentrationMeasurement = 0x0000040E; + public static final int ClusterId_EthyleneOxideConcentrationMeasurement = 0x0000040F; + public static final int ClusterId_HydrogenConcentrationMeasurement = 0x00000410; + public static final int ClusterId_HydrogenSulphideConcentrationMeasurement = 0x00000411; + public static final int ClusterId_NitricOxideConcentrationMeasurement = 0x00000412; + public static final int ClusterId_NitrogenDioxideConcentrationMeasurement = 0x00000413; + public static final int ClusterId_OxygenConcentrationMeasurement = 0x00000414; + public static final int ClusterId_OzoneConcentrationMeasurement = 0x00000415; + public static final int ClusterId_SulfurDioxideConcentrationMeasurement = 0x00000416; + public static final int ClusterId_DissolvedOxygenConcentrationMeasurement = 0x00000417; + public static final int ClusterId_BromateConcentrationMeasurement = 0x00000418; + public static final int ClusterId_ChloraminesConcentrationMeasurement = 0x00000419; + public static final int ClusterId_ChlorineConcentrationMeasurement = 0x0000041A; + public static final int ClusterId_FecalColiformAndEColiConcentrationMeasurement = 0x0000041B; + public static final int ClusterId_FluorideConcentrationMeasurement = 0x0000041C; + public static final int ClusterId_HaloaceticAcidsConcentrationMeasurement = 0x0000041D; + public static final int ClusterId_TotalTrihalomethanesConcentrationMeasurement = 0x0000041E; + public static final int ClusterId_TotalColiformBacteriaConcentrationMeasurement = 0x0000041F; + public static final int ClusterId_TurbidityConcentrationMeasurement = 0x00000420; + public static final int ClusterId_CopperConcentrationMeasurement = 0x00000421; + public static final int ClusterId_LeadConcentrationMeasurement = 0x00000422; + public static final int ClusterId_ManganeseConcentrationMeasurement = 0x00000423; + public static final int ClusterId_SulfateConcentrationMeasurement = 0x00000424; + public static final int ClusterId_BromodichloromethaneConcentrationMeasurement = 0x00000425; + public static final int ClusterId_BromoformConcentrationMeasurement = 0x00000426; + public static final int ClusterId_ChlorodibromomethaneConcentrationMeasurement = 0x00000427; + public static final int ClusterId_ChloroformConcentrationMeasurement = 0x00000428; + public static final int ClusterId_SodiumConcentrationMeasurement = 0x00000429; + public static final int ClusterId_IasZone = 0x00000500; + public static final int ClusterId_IasAce = 0x00000501; + public static final int ClusterId_IasWd = 0x00000502; + public static final int ClusterId_WakeOnLan = 0x00000503; + public static final int ClusterId_Channel = 0x00000504; + public static final int ClusterId_TargetNavigator = 0x00000505; + public static final int ClusterId_MediaPlayback = 0x00000506; + public static final int ClusterId_MediaInput = 0x00000507; + public static final int ClusterId_LowPower = 0x00000508; + public static final int ClusterId_KeypadInput = 0x00000509; + public static final int ClusterId_ContentLauncher = 0x0000050A; + public static final int ClusterId_AudioOutput = 0x0000050B; + public static final int ClusterId_ApplicationLauncher = 0x0000050C; + public static final int ClusterId_ApplicationBasic = 0x0000050D; + public static final int ClusterId_AccountLogin = 0x0000050E; + public static final int ClusterId_TestCluster = 0x0000050F; + public static final int ClusterId_Messaging = 0x00000703; + public static final int ClusterId_ApplianceIdentification = 0x00000B00; + public static final int ClusterId_MeterIdentification = 0x00000B01; + public static final int ClusterId_ApplianceEventsAndAlert = 0x00000B02; + public static final int ClusterId_ApplianceStatistics = 0x00000B03; + public static final int ClusterId_ElectricalMeasurement = 0x00000B04; +} diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchManager.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchManager.java index fe50a7a8420d0d..be39112f59602d 100755 --- a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchManager.java +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchManager.java @@ -20,8 +20,8 @@ public interface ContentLaunchManager { - int STREAMING_TYPE_DASH = 0; - int STREAMING_TYPE_HLS = 1; + int STREAMING_TYPE_DASH = 1; + int STREAMING_TYPE_HLS = 2; /** * @return The list of content types supported by the Video Player or Content App in the form of @@ -30,7 +30,7 @@ public interface ContentLaunchManager { String[] getAcceptHeader(); /** @return The list information about supported streaming protocols in STREAMING_TYPE_XXX. */ - int[] getSupportedStreamingProtocols(); + long getSupportedStreamingProtocols(); /** * Launch the specified content with optional search criteria. diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchManagerStub.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchManagerStub.java index 347b670cc58acf..8bf1628296157a 100644 --- a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchManagerStub.java +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchManagerStub.java @@ -6,6 +6,12 @@ public class ContentLaunchManagerStub implements ContentLaunchManager { private final String TAG = ContentLaunchManagerStub.class.getSimpleName(); + private int endpoint; + + public ContentLaunchManagerStub(int endpoint) { + this.endpoint = endpoint; + } + @Override public String[] getAcceptHeader() { String[] headers = @@ -17,26 +23,32 @@ public String[] getAcceptHeader() { } @Override - public int[] getSupportedStreamingProtocols() { - int[] types = new int[] {STREAMING_TYPE_DASH, STREAMING_TYPE_HLS}; - return types; + public long getSupportedStreamingProtocols() { + long protocols = STREAMING_TYPE_DASH | STREAMING_TYPE_HLS; + return protocols; } @Override public ContentLaunchResponse launchContent( ContentLaunchSearchParameter[] search, boolean autoplay, String data) { - Log.d(TAG, "launchContent:" + data + " autoplay=" + autoplay); - ContentLaunchResponse resp = - new ContentLaunchResponse(ContentLaunchResponse.STATUS_SUCCESS, "Example data in Java"); - return resp; + Log.d(TAG, "launchContent:" + data + " autoplay=" + autoplay + " at " + endpoint); + + if ("err".equals(data)) { + return new ContentLaunchResponse( + ContentLaunchResponse.STATUS_URL_NOT_AVAILABLE, "Error data in Java"); + } + return new ContentLaunchResponse(ContentLaunchResponse.STATUS_SUCCESS, "Example data in Java"); } @Override public ContentLaunchResponse launchUrl( String url, String display, ContentLaunchBrandingInformation branding) { - Log.d(TAG, "launchUrl:" + url + " display=" + display); - ContentLaunchResponse resp = - new ContentLaunchResponse(ContentLaunchResponse.STATUS_SUCCESS, "Example data in Java"); - return resp; + Log.d(TAG, "launchUrl:" + url + " display=" + display + " at " + endpoint); + + if ("err".equals(display)) { + return new ContentLaunchResponse( + ContentLaunchResponse.STATUS_URL_NOT_AVAILABLE, "Error data in Java"); + } + return new ContentLaunchResponse(ContentLaunchResponse.STATUS_SUCCESS, "Example data in Java"); } } diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/KeypadInputManagerStub.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/KeypadInputManagerStub.java index 0c5d2f9734efaf..c25acd003dc9f8 100644 --- a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/KeypadInputManagerStub.java +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/KeypadInputManagerStub.java @@ -23,10 +23,19 @@ public class KeypadInputManagerStub implements KeypadInputManager { private final String TAG = KeypadInputManagerStub.class.getSimpleName(); + private int endpoint; + + public KeypadInputManagerStub(int endpoint) { + this.endpoint = endpoint; + } @Override public int sendKey(int keyCode) { - Log.d(TAG, "sendKey:" + keyCode); + Log.d(TAG, "sendKey:" + keyCode + " at " + endpoint); + + if (keyCode == KeypadInputManager.KEY_CODE_F4_YELLOW) { + return KEY_STATUS_UNSUPPORTED_KEY; + } return KEY_STATUS_SUCCESS; } } diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/LowPowerManagerStub.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/LowPowerManagerStub.java index 8dd9e2f8caab87..1885dc2f82cedf 100644 --- a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/LowPowerManagerStub.java +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/LowPowerManagerStub.java @@ -6,9 +6,15 @@ public class LowPowerManagerStub implements LowPowerManager { private final String TAG = LowPowerManagerStub.class.getSimpleName(); + private int endpoint; + + public LowPowerManagerStub(int endpoint) { + this.endpoint = endpoint; + } + @Override public boolean sleep() { - Log.d(TAG, "sleep"); + Log.d(TAG, "sleep at " + endpoint); return true; } } diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaInputManagerStub.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaInputManagerStub.java index e3c2919e36c512..a3ffc0a995717a 100755 --- a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaInputManagerStub.java +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaInputManagerStub.java @@ -23,9 +23,15 @@ public class MediaInputManagerStub implements MediaInputManager { private final String TAG = MediaInputManagerStub.class.getSimpleName(); + private int endpoint; + + public MediaInputManagerStub(int endpoint) { + this.endpoint = endpoint; + } + @Override public MediaInputInfo[] getInputList() { - MediaInputInfo[] info = new MediaInputInfo[2]; + MediaInputInfo[] info = new MediaInputInfo[3]; info[0] = new MediaInputInfo(); info[0].name = "HDMI 1"; info[0].description = "Living room Playstation"; @@ -33,39 +39,45 @@ public MediaInputInfo[] getInputList() { info[0].type = MediaInputInfo.INPUT_TYPE_HDMI; info[1] = new MediaInputInfo(); + info[1].name = "HDMI 2"; + info[1].description = "Living room XBox"; info[1].index = 1; info[1].type = MediaInputInfo.INPUT_TYPE_HDMI; + info[2] = new MediaInputInfo(); + info[2].index = 2; + info[2].type = MediaInputInfo.INPUT_TYPE_HDMI; + return info; } @Override public int getCurrentInput() { - Log.d(TAG, "getCurrentInput"); + Log.d(TAG, "getCurrentInput at " + endpoint); return 1; } @Override public boolean selectInput(int index) { - Log.d(TAG, "selectInput:" + index); + Log.d(TAG, "selectInput:" + index + " at " + endpoint); return true; } @Override public boolean showInputStatus() { - Log.d(TAG, "showInputStatus"); + Log.d(TAG, "showInputStatus at " + endpoint); return true; } @Override public boolean hideInputStatus() { - Log.d(TAG, "hideInputStatus"); + Log.d(TAG, "hideInputStatus at " + endpoint); return true; } @Override public boolean renameInput(int index, String name) { - Log.d(TAG, "renameInput index:" + index + " name:" + name); + Log.d(TAG, "renameInput index:" + index + " name:" + name + " at " + endpoint); return true; } } diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackManager.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackManager.java index 7972a49d93bffd..4a1b347b1b0d6b 100755 --- a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackManager.java +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackManager.java @@ -29,23 +29,17 @@ public interface MediaPlaybackManager { /** The duration, in milliseconds or 0 if the duration is not applicable */ int ATTRIBUTE_PLAYBACK_DURATION = 0x0002; - /** The position of playback (Position field) at the time (UpdateAt field) in milliseconds. */ - int ATTRIBUTE_PLAYBACK_POSITION_UPDATED_AT = 0x0003; - - /** The position of playback (Position field) at the time (UpdateAt field) in milliseconds. */ - int ATTRIBUTE_PLAYBACK_POSITION = 0x0004; - /** * The speed at which the current media is being played. 10000 means 1X, 5000 means 0.5X and 20000 * means 2X */ - int ATTRIBUTE_PLAYBACK_SPEED = 0x0005; + int ATTRIBUTE_PLAYBACK_SPEED = 0x0003; /** The earliest valid position to which a client MAY seek back, in milliseconds */ - int ATTRIBUTE_PLAYBACK_SEEK_RANGE_END = 0x0006; + int ATTRIBUTE_PLAYBACK_SEEK_RANGE_END = 0x0004; /** The furthest forward valid position to which a client MAY seek forward, in milliseconds */ - int ATTRIBUTE_PLAYBACK_SEEK_RANGE_START = 0x0007; + int ATTRIBUTE_PLAYBACK_SEEK_RANGE_START = 0x0005; int PLAYBACK_STATE_PLAYING = 0; int PLAYBACK_STATE_PAUSED = 1; @@ -122,4 +116,7 @@ public interface MediaPlaybackManager { * @return the response status defined in RESPONSE_STATUS_XXX */ int request(int cmd, long parameter); + + /** Get the position of playback (Position field) at the time (UpdateAt field) specified */ + MediaPlaybackPosition getPosition(); } diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackManagerStub.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackManagerStub.java index d4fb7552935e10..9e7c1d7bdca3ba 100755 --- a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackManagerStub.java +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackManagerStub.java @@ -19,46 +19,43 @@ package com.tcl.chip.tvapp; import android.util.Log; -import java.util.Date; /** Stub implement of MediaPlaybackManager, TV manufacture should have there own implements */ public class MediaPlaybackManagerStub implements MediaPlaybackManager { private final String TAG = MediaPlaybackManagerStub.class.getSimpleName(); + private int endpoint; + + public MediaPlaybackManagerStub(int endpoint) { + this.endpoint = endpoint; + } + @Override public long getAttributes(int attributesId) { switch (attributesId) { case ATTRIBUTE_PLAYBACK_STATE: - Log.d(TAG, "getAttributes CurrentState"); + Log.d(TAG, "getAttributes CurrentState at " + endpoint); return PLAYBACK_STATE_PLAYING; case ATTRIBUTE_PLAYBACK_START_TIME: - Log.d(TAG, "getAttributes StartTime"); + Log.d(TAG, "getAttributes StartTime at " + endpoint); return 100; case ATTRIBUTE_PLAYBACK_DURATION: - Log.d(TAG, "getAttributes Duration"); + Log.d(TAG, "getAttributes Duration at " + endpoint); return 5 * 60 * 1000; - case ATTRIBUTE_PLAYBACK_POSITION_UPDATED_AT: - Log.d(TAG, "getAttributes SampledPosition UpdatedAt"); - return new Date().getTime() * 1000; - - case ATTRIBUTE_PLAYBACK_POSITION: - Log.d(TAG, "getAttributes SampledPosition Position"); - return 3 * 60 * 1000; - case ATTRIBUTE_PLAYBACK_SPEED: - Log.d(TAG, "getAttributes SampledPosition PlaybackSpeed"); + Log.d(TAG, "getAttributes SampledPosition PlaybackSpeed at " + endpoint); return 10000; case ATTRIBUTE_PLAYBACK_SEEK_RANGE_END: - Log.d(TAG, "getAttributes SampledPosition SeekRangeEnd"); + Log.d(TAG, "getAttributes SampledPosition SeekRangeEnd at " + endpoint); return 5 * 60 * 1000; case ATTRIBUTE_PLAYBACK_SEEK_RANGE_START: - Log.d(TAG, "getAttributes SampledPosition SeekRangeStart"); + Log.d(TAG, "getAttributes SampledPosition SeekRangeStart at " + endpoint); return 200; } @@ -69,50 +66,55 @@ public long getAttributes(int attributesId) { public int request(int cmd, long parameter) { switch (cmd) { case REQUEST_PLAY: - Log.d(TAG, "request Play"); + Log.d(TAG, "request Play at " + endpoint); return RESPONSE_STATUS_SUCCESS; case REQUEST_PAUSE: - Log.d(TAG, "request pause"); + Log.d(TAG, "request pause at " + endpoint); return RESPONSE_STATUS_SUCCESS; case REQUEST_STOP: - Log.d(TAG, "request stop"); + Log.d(TAG, "request stop at " + endpoint); return RESPONSE_STATUS_SUCCESS; case REQUEST_START_OVER: - Log.d(TAG, "request start over"); + Log.d(TAG, "request start over at " + endpoint); return RESPONSE_STATUS_SUCCESS; case REQUEST_PREVIOUS: - Log.d(TAG, "request previous"); + Log.d(TAG, "request previous at " + endpoint); return RESPONSE_STATUS_SUCCESS; case REQUEST_NEXT: - Log.d(TAG, "request next"); + Log.d(TAG, "request next at " + endpoint); return RESPONSE_STATUS_SUCCESS; case REQUEST_REWIND: - Log.d(TAG, "request rewind"); + Log.d(TAG, "request rewind at " + endpoint); return RESPONSE_STATUS_SUCCESS; case REQUEST_FAST_FORWARD: - Log.d(TAG, "request fast forward"); + Log.d(TAG, "request fast forward at " + endpoint); return RESPONSE_STATUS_SUCCESS; case REQUEST_SKIP_FORWARD: - Log.d(TAG, "request skip forward " + parameter + " milliseconds"); + Log.d(TAG, "request skip forward " + parameter + " milliseconds at " + endpoint); return RESPONSE_STATUS_SUCCESS; case REQUEST_SKIP_BACKWARD: - Log.d(TAG, "request skip backward " + parameter + " milliseconds"); + Log.d(TAG, "request skip backward " + parameter + " milliseconds at " + endpoint); return RESPONSE_STATUS_SUCCESS; case REQUEST_SEEK: - Log.d(TAG, "request seek to " + parameter + " milliseconds"); + Log.d(TAG, "request seek to " + parameter + " milliseconds at " + endpoint); return RESPONSE_STATUS_SUCCESS; } return RESPONSE_STATUS_NOT_ALLOWED; } + + @Override + public MediaPlaybackPosition getPosition() { + return new MediaPlaybackPosition(3 * 60 * 1000); + } } diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackPosition.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackPosition.java new file mode 100644 index 00000000000000..0e8f8de2724d9e --- /dev/null +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackPosition.java @@ -0,0 +1,13 @@ +package com.tcl.chip.tvapp; + +import java.util.Date; + +public class MediaPlaybackPosition { + private long updatedAt; + private long position; + + public MediaPlaybackPosition(long position) { + this.position = position; + this.updatedAt = new Date().getTime() * 1000; + } +} diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvApp.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvApp.java index 521a1c1dee70d7..71cc923a36f1b6 100644 --- a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvApp.java +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvApp.java @@ -17,22 +17,39 @@ */ package com.tcl.chip.tvapp; +import android.util.Log; + public class TvApp { - public TvApp() {} + private TvAppCallback mCallback; + private static final String TAG = "TvApp"; + + public TvApp(TvAppCallback callback) { + mCallback = callback; + nativeInit(); + } + + private void postClusterInit(int clusterId, int endpoint) { + Log.d(TAG, "postClusterInit for " + clusterId + " at " + endpoint); + if (mCallback != null) { + mCallback.onClusterInit(this, clusterId, endpoint); + } + } + + public native void nativeInit(); - public native void setKeypadInputManager(KeypadInputManager manager); + public native void setKeypadInputManager(int endpoint, KeypadInputManager manager); - public native void setWakeOnLanManager(WakeOnLanManager manager); + public native void setWakeOnLanManager(int endpoint, WakeOnLanManager manager); - public native void setMediaInputManager(MediaInputManager manager); + public native void setMediaInputManager(int endpoint, MediaInputManager manager); - public native void setContentLaunchManager(ContentLaunchManager manager); + public native void setContentLaunchManager(int endpoint, ContentLaunchManager manager); - public native void setLowPowerManager(LowPowerManager manager); + public native void setLowPowerManager(int endpoint, LowPowerManager manager); - public native void setMediaPlaybackManager(MediaPlaybackManager manager); + public native void setMediaPlaybackManager(int endpoint, MediaPlaybackManager manager); - public native void setChannelManager(ChannelManager manager); + public native void setChannelManager(int endpoint, ChannelManager manager); static { System.loadLibrary("TvApp"); diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvAppCallback.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvAppCallback.java new file mode 100644 index 00000000000000..47fff94e1dadcc --- /dev/null +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvAppCallback.java @@ -0,0 +1,21 @@ +/* + * + * 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. + */ +package com.tcl.chip.tvapp; + +public interface TvAppCallback { + void onClusterInit(TvApp app, int clusterId, int endpoint); +} diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/WakeOnLanManager.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/WakeOnLanManager.java index 315408f164181a..ab2b45935bf5a7 100644 --- a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/WakeOnLanManager.java +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/WakeOnLanManager.java @@ -24,5 +24,5 @@ public interface WakeOnLanManager { * * @return Mac address in AA:BB:CC:DD:EE */ - String getMac(int endpoint); + String getMac(); } diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/WakeOnLanManagerStub.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/WakeOnLanManagerStub.java index 24017e912900bb..4d7b17c5a75230 100644 --- a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/WakeOnLanManagerStub.java +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/WakeOnLanManagerStub.java @@ -6,8 +6,14 @@ public class WakeOnLanManagerStub implements WakeOnLanManager { private final String TAG = WakeOnLanManagerStub.class.getSimpleName(); + private int endpoint; + + public WakeOnLanManagerStub(int endpoint) { + this.endpoint = endpoint; + } + @Override - public String getMac(int endpoint) { + public String getMac() { Log.d(TAG, "getMac for endpoint=" + endpoint); return "AA:BB:CC:DD:EE"; } diff --git a/examples/tv-app/linux/include/channel/ChannelManager.cpp b/examples/tv-app/linux/include/channel/ChannelManager.cpp index 066476c57c759e..64052dbec76d4c 100644 --- a/examples/tv-app/linux/include/channel/ChannelManager.cpp +++ b/examples/tv-app/linux/include/channel/ChannelManager.cpp @@ -20,36 +20,40 @@ using namespace chip; using namespace chip::app::Clusters::Channel; -std::list ChannelManager::HandleGetChannelList() +CHIP_ERROR ChannelManager::HandleGetChannelList(chip::app::AttributeValueEncoder & aEncoder) { - std::list list; // TODO: Insert code here - int maximumVectorSize = 2; + return aEncoder.EncodeList([](const auto & encoder) -> CHIP_ERROR { + int maximumVectorSize = 2; - for (int i = 0; i < maximumVectorSize; ++i) - { - chip::app::Clusters::Channel::Structs::ChannelInfo::Type channelInfo; - channelInfo.affiliateCallSign = chip::CharSpan("exampleASign", strlen("exampleASign")); - channelInfo.callSign = chip::CharSpan("exampleCSign", strlen("exampleCSign")); - channelInfo.name = chip::CharSpan("exampleName", strlen("exampleName")); - channelInfo.majorNumber = static_cast(1 + i); - channelInfo.minorNumber = static_cast(2 + i); - list.push_back(channelInfo); - } - return list; + for (int i = 0; i < maximumVectorSize; ++i) + { + chip::app::Clusters::Channel::Structs::ChannelInfo::Type channelInfo; + channelInfo.affiliateCallSign = chip::CharSpan("exampleASign", strlen("exampleASign")); + channelInfo.callSign = chip::CharSpan("exampleCSign", strlen("exampleCSign")); + channelInfo.name = chip::CharSpan("exampleName", strlen("exampleName")); + channelInfo.majorNumber = static_cast(1 + i); + channelInfo.minorNumber = static_cast(2 + i); + + ReturnErrorOnFailure(encoder.Encode(channelInfo)); + } + + return CHIP_NO_ERROR; + }); } -chip::app::Clusters::Channel::Structs::LineupInfo::Type ChannelManager::HandleGetLineup() +CHIP_ERROR ChannelManager::HandleGetLineup(chip::app::AttributeValueEncoder & aEncoder) { chip::app::Clusters::Channel::Structs::LineupInfo::Type lineup; lineup.operatorName = chip::CharSpan("operatorName", strlen("operatorName")); lineup.lineupName = chip::CharSpan("lineupName", strlen("lineupName")); lineup.postalCode = chip::CharSpan("postalCode", strlen("postalCode")); lineup.lineupInfoType = chip::app::Clusters::Channel::LineupInfoTypeEnum::kMso; - return lineup; + + return aEncoder.Encode(lineup); } -chip::app::Clusters::Channel::Structs::ChannelInfo::Type ChannelManager::HandleGetCurrentChannel() +CHIP_ERROR ChannelManager::HandleGetCurrentChannel(chip::app::AttributeValueEncoder & aEncoder) { chip::app::Clusters::Channel::Structs::ChannelInfo::Type currentChannel; currentChannel.affiliateCallSign = chip::CharSpan("exampleASign", strlen("exampleASign")); @@ -57,10 +61,13 @@ chip::app::Clusters::Channel::Structs::ChannelInfo::Type ChannelManager::HandleG currentChannel.name = chip::CharSpan("exampleName", strlen("exampleName")); currentChannel.majorNumber = 1; currentChannel.minorNumber = 0; - return currentChannel; + + return aEncoder.Encode(currentChannel); } -Commands::ChangeChannelResponse::Type ChannelManager::HandleChangeChannel(const chip::CharSpan & match) +void ChannelManager::HandleChangeChannel( + const chip::CharSpan & match, + chip::app::CommandResponseHelper & responser) { Commands::ChangeChannelResponse::Type response; response.channelMatch.majorNumber = 1; @@ -69,7 +76,8 @@ Commands::ChangeChannelResponse::Type ChannelManager::HandleChangeChannel(const response.channelMatch.callSign = chip::CharSpan("callSign", strlen("callSign")); response.channelMatch.affiliateCallSign = chip::CharSpan("affiliateCallSign", strlen("affiliateCallSign")); response.errorType = chip::app::Clusters::Channel::ErrorTypeEnum::kMultipleMatches; - return response; + + responser.Success(response); } bool ChannelManager::HandleChangeChannelByNumber(const uint16_t & majorNumber, const uint16_t & minorNumber) diff --git a/examples/tv-app/linux/include/channel/ChannelManager.h b/examples/tv-app/linux/include/channel/ChannelManager.h index f090b18150de27..372523fe9f426e 100644 --- a/examples/tv-app/linux/include/channel/ChannelManager.h +++ b/examples/tv-app/linux/include/channel/ChannelManager.h @@ -22,11 +22,13 @@ class ChannelManager : public chip::app::Clusters::Channel::Delegate { public: - std::list HandleGetChannelList() override; - chip::app::Clusters::Channel::Structs::LineupInfo::Type HandleGetLineup() override; - chip::app::Clusters::Channel::Structs::ChannelInfo::Type HandleGetCurrentChannel() override; + virtual CHIP_ERROR HandleGetChannelList(chip::app::AttributeValueEncoder & aEncoder) override; + virtual CHIP_ERROR HandleGetLineup(chip::app::AttributeValueEncoder & aEncoder) override; + virtual CHIP_ERROR HandleGetCurrentChannel(chip::app::AttributeValueEncoder & aEncoder) override; - chip::app::Clusters::Channel::Commands::ChangeChannelResponse::Type HandleChangeChannel(const chip::CharSpan & match) override; + virtual void HandleChangeChannel( + const chip::CharSpan & match, + chip::app::CommandResponseHelper & responser) override; bool HandleChangeChannelByNumber(const uint16_t & majorNumber, const uint16_t & minorNumber) override; bool HandleSkipChannel(const uint16_t & count) override; }; diff --git a/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp b/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp index 33891a9f9bbfa7..54ff9f3d8dd94a 100644 --- a/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp +++ b/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp @@ -23,31 +23,35 @@ using namespace std; using namespace chip::app::Clusters::ContentLauncher; using namespace chip::AppPlatform; -Commands::LaunchResponse::Type ContentLauncherManager::HandleLaunchContent(chip::EndpointId endpointId, - const std::list & parameterList, - bool autoplay, const chip::CharSpan & data) +void ContentLauncherManager::HandleLaunchContent( + const std::list & parameterList, bool autoplay, const chip::CharSpan & data, + chip::app::CommandResponseHelper & responser) { - ChipLogProgress(Zcl, "ContentLauncherManager::HandleLaunchContent"); + ChipLogProgress(Zcl, "ContentLauncherManager::HandleLaunchContent for endpoint %d", mEndpointId); string dataString(data.data(), data.size()); + Commands::LaunchResponse::Type response; + #if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED - ContentApp * app = chip::AppPlatform::AppPlatform::GetInstance().GetContentAppByEndpointId(endpointId); + ContentApp * app = chip::AppPlatform::AppPlatform::GetInstance().GetContentAppByEndpointId(mEndpointId); if (app != NULL) { - return app->GetContentLauncher()->LaunchContent(parameterList, autoplay, dataString); + response = app->GetContentLauncher()->LaunchContent(parameterList, autoplay, dataString); + responser.Success(response); + return; } #endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED // TODO: Insert code here - Commands::LaunchResponse::Type response; response.data = chip::CharSpan("exampleData", strlen("exampleData")); response.status = chip::app::Clusters::ContentLauncher::StatusEnum::kSuccess; - return response; + responser.Success(response); } -Commands::LaunchResponse::Type ContentLauncherManager::HandleLaunchUrl(const chip::CharSpan & contentUrl, - const chip::CharSpan & displayString, - const std::list & brandingInformation) +void ContentLauncherManager::HandleLaunchUrl( + const chip::CharSpan & contentUrl, const chip::CharSpan & displayString, + const std::list & brandingInformation, + chip::app::CommandResponseHelper & responser) { ChipLogProgress(Zcl, "ContentLauncherManager::HandleLaunchUrl"); @@ -58,13 +62,18 @@ Commands::LaunchResponse::Type ContentLauncherManager::HandleLaunchUrl(const chi Commands::LaunchResponse::Type response; response.data = chip::CharSpan("exampleData", strlen("exampleData")); response.status = chip::app::Clusters::ContentLauncher::StatusEnum::kSuccess; - return response; + responser.Success(response); } -std::list ContentLauncherManager::HandleGetAcceptHeaderList() +CHIP_ERROR ContentLauncherManager::HandleGetAcceptHeaderList(chip::app::AttributeValueEncoder & aEncoder) { ChipLogProgress(Zcl, "ContentLauncherManager::HandleGetAcceptHeaderList"); - return { "example", "example" }; + return aEncoder.EncodeList([](const auto & encoder) -> CHIP_ERROR { + chip::CharSpan data = chip::CharSpan("example", strlen("example")); + ReturnErrorOnFailure(encoder.Encode(data)); + ReturnErrorOnFailure(encoder.Encode(data)); + return CHIP_NO_ERROR; + }); } uint32_t ContentLauncherManager::HandleGetSupportedStreamingProtocols() diff --git a/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.h b/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.h index 132afeb37a9812..0429c945548b8f 100644 --- a/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.h +++ b/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.h @@ -23,12 +23,19 @@ class ContentLauncherManager : public chip::app::Clusters::ContentLauncher::Delegate { public: - chip::app::Clusters::ContentLauncher::Commands::LaunchResponse::Type - HandleLaunchContent(chip::EndpointId endpointId, const std::list & parameterList, bool autoplay, - const chip::CharSpan & data) override; - chip::app::Clusters::ContentLauncher::Commands::LaunchResponse::Type - HandleLaunchUrl(const chip::CharSpan & contentUrl, const chip::CharSpan & displayString, - const std::list & brandingInformation) override; - std::list HandleGetAcceptHeaderList() override; + ContentLauncherManager(chip::EndpointId endpointId) : mEndpointId(endpointId) {} + + void + HandleLaunchContent(const std::list & parameterList, bool autoplay, const chip::CharSpan & data, + chip::app::CommandResponseHelper & + responser) override; + void HandleLaunchUrl(const chip::CharSpan & contentUrl, const chip::CharSpan & displayString, + const std::list & brandingInformation, + chip::app::CommandResponseHelper & + responser) override; + CHIP_ERROR HandleGetAcceptHeaderList(chip::app::AttributeValueEncoder & aEncoder) override; uint32_t HandleGetSupportedStreamingProtocols() override; + +private: + chip::EndpointId mEndpointId; }; diff --git a/examples/tv-app/linux/include/media-input/MediaInputManager.cpp b/examples/tv-app/linux/include/media-input/MediaInputManager.cpp index 4b654d0b838d87..b4128403672d50 100644 --- a/examples/tv-app/linux/include/media-input/MediaInputManager.cpp +++ b/examples/tv-app/linux/include/media-input/MediaInputManager.cpp @@ -20,22 +20,25 @@ using namespace chip; using namespace chip::app::Clusters::MediaInput; -std::list MediaInputManager::HandleGetInputList() +CHIP_ERROR MediaInputManager::HandleGetInputList(chip::app::AttributeValueEncoder & aEncoder) { - std::list list; // TODO: Insert code here - int maximumVectorSize = 2; - for (int i = 0; i < maximumVectorSize; ++i) - { - chip::app::Clusters::MediaInput::Structs::InputInfo::Type inputInfo; - inputInfo.description = chip::CharSpan("exampleDescription", strlen("exampleDescription")); - inputInfo.name = chip::CharSpan("exampleName", strlen("exampleName")); - inputInfo.inputType = chip::app::Clusters::MediaInput::InputTypeEnum::kHdmi; - inputInfo.index = static_cast(1 + i); - list.push_back(inputInfo); - } - return list; + return aEncoder.EncodeList([](const auto & encoder) -> CHIP_ERROR { + int maximumVectorSize = 2; + for (int i = 0; i < maximumVectorSize; ++i) + { + chip::app::Clusters::MediaInput::Structs::InputInfo::Type inputInfo; + inputInfo.description = chip::CharSpan("exampleDescription", strlen("exampleDescription")); + inputInfo.name = chip::CharSpan("exampleName", strlen("exampleName")); + inputInfo.inputType = chip::app::Clusters::MediaInput::InputTypeEnum::kHdmi; + inputInfo.index = static_cast(1 + i); + + ReturnErrorOnFailure(encoder.Encode(inputInfo)); + } + + return CHIP_NO_ERROR; + }); } uint8_t MediaInputManager::HandleGetCurrentInput() diff --git a/examples/tv-app/linux/include/media-input/MediaInputManager.h b/examples/tv-app/linux/include/media-input/MediaInputManager.h index 84e0114f43c3f3..b2fa47c1013750 100644 --- a/examples/tv-app/linux/include/media-input/MediaInputManager.h +++ b/examples/tv-app/linux/include/media-input/MediaInputManager.h @@ -18,12 +18,13 @@ #pragma once +#include #include class MediaInputManager : public chip::app::Clusters::MediaInput::Delegate { public: - std::list HandleGetInputList() override; + CHIP_ERROR HandleGetInputList(chip::app::AttributeValueEncoder & aEncoder) override; uint8_t HandleGetCurrentInput() override; bool HandleSelectInput(const uint8_t index) override; bool HandleShowInputStatus() override; diff --git a/examples/tv-app/linux/include/wake-on-lan/WakeOnLanManager.cpp b/examples/tv-app/linux/include/wake-on-lan/WakeOnLanManager.cpp index 291c2951c221f8..1191612b84e2c4 100644 --- a/examples/tv-app/linux/include/wake-on-lan/WakeOnLanManager.cpp +++ b/examples/tv-app/linux/include/wake-on-lan/WakeOnLanManager.cpp @@ -21,7 +21,7 @@ using namespace chip; using namespace chip::app::Clusters::WakeOnLan; -chip::CharSpan WakeOnLanManager::HandleGetMacAddress() +CHIP_ERROR WakeOnLanManager::HandleGetMacAddress(chip::app::AttributeValueEncoder & aEncoder) { - return chip::CharSpan("00:00:00:00:00", strlen("00:00:00:00:00")); + return aEncoder.Encode(chip::CharSpan("00:00:00:00:00", strlen("00:00:00:00:00"))); } diff --git a/examples/tv-app/linux/include/wake-on-lan/WakeOnLanManager.h b/examples/tv-app/linux/include/wake-on-lan/WakeOnLanManager.h index ba4a6964a5bfc8..63217020e9ab11 100644 --- a/examples/tv-app/linux/include/wake-on-lan/WakeOnLanManager.h +++ b/examples/tv-app/linux/include/wake-on-lan/WakeOnLanManager.h @@ -23,5 +23,5 @@ class WakeOnLanManager : public chip::app::Clusters::WakeOnLan::Delegate { public: - chip::CharSpan HandleGetMacAddress() override; + CHIP_ERROR HandleGetMacAddress(chip::app::AttributeValueEncoder & aEncoder) override; }; diff --git a/examples/tv-app/linux/main.cpp b/examples/tv-app/linux/main.cpp index e0549f20559cd9..f6133e5217dda2 100644 --- a/examples/tv-app/linux/main.cpp +++ b/examples/tv-app/linux/main.cpp @@ -57,7 +57,6 @@ bool emberAfBasicClusterMfgSpecificPingCallback(chip::app::CommandHandler * comm } namespace { -static ContentLauncherManager contentLauncherManager; static AccountLoginManager accountLoginManager; static ApplicationBasicManager applicationBasicManager; static ApplicationLauncherManager applicationLauncherManager; @@ -101,7 +100,7 @@ int main(int argc, char * argv[]) void emberAfContentLauncherClusterInitCallback(EndpointId endpoint) { ChipLogProgress(Zcl, "TV Linux App: ContentLauncher::SetDelegate"); - chip::app::Clusters::ContentLauncher::SetDelegate(endpoint, &contentLauncherManager); + chip::app::Clusters::ContentLauncher::SetDelegate(endpoint, new ContentLauncherManager(endpoint)); } void emberAfAccountLoginClusterInitCallback(EndpointId endpoint) diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index 45bded72d77abc..bdb14be5f02b4d 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -1341,6 +1341,57 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "General Commissioning", "code": 48, diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap index baffa731a1a644..7e95189d1b678c 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap @@ -1356,6 +1356,57 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "General Commissioning", "code": 48, @@ -12093,7 +12144,7 @@ "outgoing": 1 }, { - "name": "PauseReques", + "name": "PauseRequest", "code": 1, "mfgCode": null, "source": "client", @@ -12109,7 +12160,7 @@ "outgoing": 1 }, { - "name": "StartOver", + "name": "StartOverRequest", "code": 3, "mfgCode": null, "source": "client", diff --git a/examples/window-app/common/window-app.zap b/examples/window-app/common/window-app.zap index 4847140a84e503..320de9fd66734b 100644 --- a/examples/window-app/common/window-app.zap +++ b/examples/window-app/common/window-app.zap @@ -945,6 +945,57 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Power Source", "code": 47, @@ -7557,5 +7608,6 @@ "endpointVersion": 1, "deviceIdentifier": 514 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/integrations/cloudbuild/build-all.yaml b/integrations/cloudbuild/build-all.yaml index e940f6b235ceda..a20a9fade5148e 100644 --- a/integrations/cloudbuild/build-all.yaml +++ b/integrations/cloudbuild/build-all.yaml @@ -1,5 +1,5 @@ steps: - - name: "connectedhomeip/chip-build-vscode:0.5.40" + - name: "connectedhomeip/chip-build-vscode:0.5.43" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -12,7 +12,7 @@ steps: path: /pwenv timeout: 900s - - name: "connectedhomeip/chip-build-vscode:0.5.40" + - name: "connectedhomeip/chip-build-vscode:0.5.43" env: - PW_ENVIRONMENT_ROOT=/pwenv args: diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml index 3286cf95973659..745983cf7489ff 100644 --- a/integrations/cloudbuild/smoke-test.yaml +++ b/integrations/cloudbuild/smoke-test.yaml @@ -1,5 +1,5 @@ steps: - - name: "connectedhomeip/chip-build-vscode:0.5.40" + - name: "connectedhomeip/chip-build-vscode:0.5.43" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -12,7 +12,7 @@ steps: path: /pwenv timeout: 900s - - name: "connectedhomeip/chip-build-vscode:0.5.40" + - name: "connectedhomeip/chip-build-vscode:0.5.43" id: ESP32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -28,7 +28,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.5.40" + - name: "connectedhomeip/chip-build-vscode:0.5.43" id: NRFConnect env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -45,7 +45,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.5.40" + - name: "connectedhomeip/chip-build-vscode:0.5.43" id: EFR32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -62,7 +62,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.5.40" + - name: "connectedhomeip/chip-build-vscode:0.5.43" id: Linux env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -79,7 +79,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.5.40" + - name: "connectedhomeip/chip-build-vscode:0.5.43" id: Android env: - PW_ENVIRONMENT_ROOT=/pwenv diff --git a/integrations/docker/images/chip-build-ameba/Dockerfile b/integrations/docker/images/chip-build-ameba/Dockerfile index 245d21102915d2..d98d6175fc9ee8 100644 --- a/integrations/docker/images/chip-build-ameba/Dockerfile +++ b/integrations/docker/images/chip-build-ameba/Dockerfile @@ -9,11 +9,11 @@ RUN set -x \ && cd ${AMEBA_DIR} \ && git clone --progress -b cmake_build https://github.com/pankore/ambd_sdk_with_chip_non_NDA.git \ && cd ambd_sdk_with_chip_non_NDA \ - && git reset --hard a7eac08 \ + && git reset --hard dd89725 \ && git submodule update --depth 1 --init --progress \ && cd project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/toolchain \ - && cat asdk/asdk-9.3.0-linux-newlib-build-3483-x86_64.tar.bz2.part* > asdk/asdk-9.3.0-linux-newlib-build-3483-x86_64.tar.bz2 \ - && mkdir -p linux && tar -jxvf asdk/asdk-9.3.0-linux-newlib-build-3483-x86_64.tar.bz2 -C linux/ \ + && cat asdk/asdk-10.3.0-linux-newlib-build-3638-x86_64.tar.bz2.part* > asdk/asdk-10.3.0-linux-newlib-build-3638-x86_64.tar.bz2 \ + && mkdir -p linux && tar -jxvf asdk/asdk-10.3.0-linux-newlib-build-3638-x86_64.tar.bz2 -C linux/ \ && : # last line ENV AMEBA_PATH=${AMEBA_DIR}/ambd_sdk_with_chip_non_NDA diff --git a/integrations/docker/images/chip-build-esp32/0001-esp_crt_bundle-remove-EC-ACC-certificate.patch b/integrations/docker/images/chip-build-esp32/0001-esp_crt_bundle-remove-EC-ACC-certificate.patch deleted file mode 100644 index ae3f42edb0d7c7..00000000000000 --- a/integrations/docker/images/chip-build-esp32/0001-esp_crt_bundle-remove-EC-ACC-certificate.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 4e45f13e2df72a4cb4dc875942e95775198db85c Mon Sep 17 00:00:00 2001 -From: Victor Morales -Date: Fri, 1 Oct 2021 13:56:33 -0700 -Subject: [PATCH] esp_crt_bundle: remove EC-ACC certificate - -Fixes bug #7631 ---- - .../mbedtls/esp_crt_bundle/cacrt_all.pem | 30 ------------------- - 1 file changed, 30 deletions(-) - -diff --git a/components/mbedtls/esp_crt_bundle/cacrt_all.pem b/components/mbedtls/esp_crt_bundle/cacrt_all.pem -index 09b4ce16b7..a669b94fbd 100644 ---- a/components/mbedtls/esp_crt_bundle/cacrt_all.pem -+++ b/components/mbedtls/esp_crt_bundle/cacrt_all.pem -@@ -1645,36 +1645,6 @@ tnRGEmyR7jTV7JqR50S+kDFy1UkC9gLl9B/rfNmWVan/7Ir5mUf/NVoCqgTLiluHcSmRvaS0eg29 - mvVXIwAHIRc/SjnRBUkLp7Y3gaVdjKozXoEofKd9J+sAro03 - -----END CERTIFICATE----- - --EC-ACC --====== -------BEGIN CERTIFICATE----- --MIIFVjCCBD6gAwIBAgIQ7is969Qh3hSoYqwE893EATANBgkqhkiG9w0BAQUFADCB8zELMAkGA1UE --BhMCRVMxOzA5BgNVBAoTMkFnZW5jaWEgQ2F0YWxhbmEgZGUgQ2VydGlmaWNhY2lvIChOSUYgUS0w --ODAxMTc2LUkpMSgwJgYDVQQLEx9TZXJ2ZWlzIFB1YmxpY3MgZGUgQ2VydGlmaWNhY2lvMTUwMwYD --VQQLEyxWZWdldSBodHRwczovL3d3dy5jYXRjZXJ0Lm5ldC92ZXJhcnJlbCAoYykwMzE1MDMGA1UE --CxMsSmVyYXJxdWlhIEVudGl0YXRzIGRlIENlcnRpZmljYWNpbyBDYXRhbGFuZXMxDzANBgNVBAMT --BkVDLUFDQzAeFw0wMzAxMDcyMzAwMDBaFw0zMTAxMDcyMjU5NTlaMIHzMQswCQYDVQQGEwJFUzE7 --MDkGA1UEChMyQWdlbmNpYSBDYXRhbGFuYSBkZSBDZXJ0aWZpY2FjaW8gKE5JRiBRLTA4MDExNzYt --SSkxKDAmBgNVBAsTH1NlcnZlaXMgUHVibGljcyBkZSBDZXJ0aWZpY2FjaW8xNTAzBgNVBAsTLFZl --Z2V1IGh0dHBzOi8vd3d3LmNhdGNlcnQubmV0L3ZlcmFycmVsIChjKTAzMTUwMwYDVQQLEyxKZXJh --cnF1aWEgRW50aXRhdHMgZGUgQ2VydGlmaWNhY2lvIENhdGFsYW5lczEPMA0GA1UEAxMGRUMtQUND --MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsyLHT+KXQpWIR4NA9h0X84NzJB5R85iK --w5K4/0CQBXCHYMkAqbWUZRkiFRfCQ2xmRJoNBD45b6VLeqpjt4pEndljkYRm4CgPukLjbo73FCeT --ae6RDqNfDrHrZqJyTxIThmV6PttPB/SnCWDaOkKZx7J/sxaVHMf5NLWUhdWZXqBIoH7nF2W4onW4 --HvPlQn2v7fOKSGRdghST2MDk/7NQcvJ29rNdQlB50JQ+awwAvthrDk4q7D7SzIKiGGUzE3eeml0a --E9jD2z3Il3rucO2n5nzbcc8tlGLfbdb1OL4/pYUKGbio2Al1QnDE6u/LDsg0qBIimAy4E5S2S+zw --0JDnJwIDAQABo4HjMIHgMB0GA1UdEQQWMBSBEmVjX2FjY0BjYXRjZXJ0Lm5ldDAPBgNVHRMBAf8E --BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUoMOLRKo3pUW/l4Ba0fF4opvpXY0wfwYD --VR0gBHgwdjB0BgsrBgEEAfV4AQMBCjBlMCwGCCsGAQUFBwIBFiBodHRwczovL3d3dy5jYXRjZXJ0 --Lm5ldC92ZXJhcnJlbDA1BggrBgEFBQcCAjApGidWZWdldSBodHRwczovL3d3dy5jYXRjZXJ0Lm5l --dC92ZXJhcnJlbCAwDQYJKoZIhvcNAQEFBQADggEBAKBIW4IB9k1IuDlVNZyAelOZ1Vr/sXE7zDkJ --lF7W2u++AVtd0x7Y/X1PzaBB4DSTv8vihpw3kpBWHNzrKQXlxJ7HNd+KDM3FIUPpqojlNcAZQmNa --Al6kSBg6hW/cnbw/nZzBh7h6YQjpdwt/cKt63dmXLGQehb+8dJahw3oS7AwaboMMPOhyRp/7SNVe --l+axofjk70YllJyJ22k4vuxcDlbHZVHlUIiIv0LVKz3l+bqeLrPK9HOSAgu+TGbrIP65y7WZf+a2 --E/rKS03Z7lNGBjvGTq2TWoF+bCpLagVFjPIhpDGQh2xlnJ2lYJU6Un/10asIbvPuW/mIPX64b24D --5EI= -------END CERTIFICATE----- -- - Hellenic Academic and Research Institutions RootCA 2011 - ======================================================= - -----BEGIN CERTIFICATE----- --- -2.25.1 - diff --git a/integrations/docker/images/chip-build/version b/integrations/docker/images/chip-build/version index 0710299211e3be..a46212c537ebda 100644 --- a/integrations/docker/images/chip-build/version +++ b/integrations/docker/images/chip-build/version @@ -1 +1 @@ -0.5.42 Version bump reason: [Ameba] SDK update & Add otar otap options +0.5.45 Version bump reason: [Ameba] Support NetworkCommissioning diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index 34b6eb2218352f..6cb91e05cd2cd2 100644 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -152,6 +152,7 @@ def HostTargets(): app_targets.append(target.Extend('thermostat', app=HostApp.THERMOSTAT)) app_targets.append(target.Extend('minmdns', app=HostApp.MIN_MDNS)) app_targets.append(target.Extend('door-lock', app=HostApp.LOCK)) + app_targets.append(target.Extend('shell', app=HostApp.SHELL)) # Possible build variants. Note that number of potential # builds is exponential here @@ -266,10 +267,13 @@ def NrfTargets(): yield target.Extend('native-posix-64-tests', board=NrfBoard.NATIVE_POSIX_64, app=NrfApp.UNIT_TESTS) targets = [ - target.Extend('nrf5340', board=NrfBoard.NRF5340), - target.Extend('nrf52840', board=NrfBoard.NRF52840), + target.Extend('nrf5340dk', board=NrfBoard.NRF5340DK), + target.Extend('nrf52840dk', board=NrfBoard.NRF52840DK), ] + # Enable nrf52840dongle for lighting app only + yield target.Extend('nrf52840dongle-light', board=NrfBoard.NRF52840DONGLE, app=NrfApp.LIGHT) + for target in targets: yield target.Extend('lock', app=NrfApp.LOCK) yield target.Extend('light', app=NrfApp.LIGHT) @@ -279,7 +283,7 @@ def NrfTargets(): rpc = target.Extend('light-rpc', app=NrfApp.LIGHT, enable_rpcs=True) - if '-nrf5340-' in rpc.name: + if '-nrf5340dk-' in rpc.name: rpc = rpc.GlobBlacklist( 'Compile failure due to pw_build args not forwarded to proto compiler. https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/66760') diff --git a/scripts/build/builders/host.py b/scripts/build/builders/host.py index 061f671222cb35..047d7a2a959fef 100644 --- a/scripts/build/builders/host.py +++ b/scripts/build/builders/host.py @@ -29,6 +29,7 @@ class HostApp(Enum): TV_APP = auto() LOCK = auto() TESTS = auto() + SHELL = auto() def ExamplePath(self): if self == HostApp.ALL_CLUSTERS: @@ -47,6 +48,8 @@ def ExamplePath(self): return 'door-lock-app/linux' elif self == HostApp.TESTS: return '../' + elif self == HostApp.SHELL: + return 'shell/standalone' else: raise Exception('Unknown app type: %r' % self) @@ -77,6 +80,9 @@ def OutputNames(self): yield 'chip-door-lock-app.map' elif self == HostApp.TESTS: pass + elif self == HostApp.SHELL: + yield 'chip-shell' + yield 'chip-shell.map' else: raise Exception('Unknown app type: %r' % self) diff --git a/scripts/build/builders/nrf.py b/scripts/build/builders/nrf.py index 24fcf9f7624853..a83d5fe5c98012 100644 --- a/scripts/build/builders/nrf.py +++ b/scripts/build/builders/nrf.py @@ -84,14 +84,17 @@ def FlashBundleName(self): class NrfBoard(Enum): - NRF52840 = auto() - NRF5340 = auto() + NRF52840DK = auto() + NRF52840DONGLE = auto() + NRF5340DK = auto() NATIVE_POSIX_64 = auto() def GnArgName(self): - if self == NrfBoard.NRF52840: + if self == NrfBoard.NRF52840DK: return 'nrf52840dk_nrf52840' - elif self == NrfBoard.NRF5340: + elif self == NrfBoard.NRF52840DONGLE: + return 'nrf52840dongle_nrf52840' + elif self == NrfBoard.NRF5340DK: return 'nrf5340dk_nrf5340_cpuapp' elif self == NrfBoard.NATIVE_POSIX_64: return 'native_posix_64' @@ -105,7 +108,7 @@ def __init__(self, root, runner, app: NrfApp = NrfApp.LIGHT, - board: NrfBoard = NrfBoard.NRF52840, + board: NrfBoard = NrfBoard.NRF52840DK, enable_rpcs: bool = False): super(NrfConnectBuilder, self).__init__(root, runner) self.app = app @@ -139,18 +142,22 @@ def generate(self): raise Exception('ZEPHYR_BASE validation failed') + overlays = [] + if self.enable_rpcs: + overlays.append("-DOVERLAY_CONFIG=rpc.overlay") + cmd = ''' source "$ZEPHYR_BASE/zephyr-env.sh"; export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR"; -west build --cmake-only -d {outdir} -b {board} {sourcedir}{rpcs} +west build --cmake-only -d {outdir} -b {board} {sourcedir}{overlayflags} '''.format( outdir=shlex.quote(self.output_dir), board=self.board.GnArgName(), sourcedir=shlex.quote(os.path.join( self.root, self.app.AppPath(), 'nrfconnect')), - rpcs=" -- -DOVERLAY_CONFIG=rpc.overlay" if self.enable_rpcs else "" + overlayflags=" -- " + + " ".join(overlays) if len(overlays) > 0 else "" ).strip() - self._Execute(['bash', '-c', cmd], title='Generating ' + self.identifier) diff --git a/scripts/build/testdata/all_targets_except_host.txt b/scripts/build/testdata/all_targets_except_host.txt index d57be9ffa95dd3..93bc704496e25c 100644 --- a/scripts/build/testdata/all_targets_except_host.txt +++ b/scripts/build/testdata/all_targets_except_host.txt @@ -97,18 +97,19 @@ mbed-CY8CPROTO_062_4343W-shell-debug (NOGLOB: Compile only for debugging purpose mbed-CY8CPROTO_062_4343W-shell-develop (NOGLOB: Compile only for debugging purpose - https://os.mbed.com/docs/mbed-os/latest/program-setup/build-profiles-and-rules.html) mbed-CY8CPROTO_062_4343W-shell-release nrf-native-posix-64-tests -nrf-nrf52840-light -nrf-nrf52840-light-rpc -nrf-nrf52840-lock -nrf-nrf52840-pump -nrf-nrf52840-pump-controller -nrf-nrf52840-shell -nrf-nrf5340-light -nrf-nrf5340-light-rpc (NOGLOB: Compile failure due to pw_build args not forwarded to proto compiler. https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/66760) -nrf-nrf5340-lock -nrf-nrf5340-pump -nrf-nrf5340-pump-controller -nrf-nrf5340-shell +nrf-nrf52840dk-light +nrf-nrf52840dk-light-rpc +nrf-nrf52840dk-lock +nrf-nrf52840dk-pump +nrf-nrf52840dk-pump-controller +nrf-nrf52840dk-shell +nrf-nrf52840dongle-light +nrf-nrf5340dk-light +nrf-nrf5340dk-light-rpc (NOGLOB: Compile failure due to pw_build args not forwarded to proto compiler. https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/66760) +nrf-nrf5340dk-lock +nrf-nrf5340dk-pump +nrf-nrf5340dk-pump-controller +nrf-nrf5340dk-shell qpg-qpg6100-lock telink-tlsr9518adk80d-light tizen-arm-light diff --git a/scripts/build/testdata/build_all_except_host.txt b/scripts/build/testdata/build_all_except_host.txt index dc2667b3769282..39a3d2a9eb69e8 100644 --- a/scripts/build/testdata/build_all_except_host.txt +++ b/scripts/build/testdata/build_all_except_host.txt @@ -564,65 +564,70 @@ bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh"; export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR"; west build --cmake-only -d {out}/nrf-native-posix-64-tests -b native_posix_64 {root}/src/test_driver/nrfconnect' -# Generating nrf-nrf52840-light +# Generating nrf-nrf52840dk-light bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh"; export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR"; -west build --cmake-only -d {out}/nrf-nrf52840-light -b nrf52840dk_nrf52840 {root}/examples/lighting-app/nrfconnect' +west build --cmake-only -d {out}/nrf-nrf52840dk-light -b nrf52840dk_nrf52840 {root}/examples/lighting-app/nrfconnect' -# Generating nrf-nrf52840-light-rpc +# Generating nrf-nrf52840dk-light-rpc bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh"; export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR"; -west build --cmake-only -d {out}/nrf-nrf52840-light-rpc -b nrf52840dk_nrf52840 {root}/examples/lighting-app/nrfconnect -- -DOVERLAY_CONFIG=rpc.overlay' +west build --cmake-only -d {out}/nrf-nrf52840dk-light-rpc -b nrf52840dk_nrf52840 {root}/examples/lighting-app/nrfconnect -- -DOVERLAY_CONFIG=rpc.overlay' -# Generating nrf-nrf52840-lock +# Generating nrf-nrf52840dk-lock bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh"; export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR"; -west build --cmake-only -d {out}/nrf-nrf52840-lock -b nrf52840dk_nrf52840 {root}/examples/lock-app/nrfconnect' +west build --cmake-only -d {out}/nrf-nrf52840dk-lock -b nrf52840dk_nrf52840 {root}/examples/lock-app/nrfconnect' -# Generating nrf-nrf52840-pump +# Generating nrf-nrf52840dk-pump bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh"; export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR"; -west build --cmake-only -d {out}/nrf-nrf52840-pump -b nrf52840dk_nrf52840 {root}/examples/pump-app/nrfconnect' +west build --cmake-only -d {out}/nrf-nrf52840dk-pump -b nrf52840dk_nrf52840 {root}/examples/pump-app/nrfconnect' -# Generating nrf-nrf52840-pump-controller +# Generating nrf-nrf52840dk-pump-controller bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh"; export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR"; -west build --cmake-only -d {out}/nrf-nrf52840-pump-controller -b nrf52840dk_nrf52840 {root}/examples/pump-controller-app/nrfconnect' +west build --cmake-only -d {out}/nrf-nrf52840dk-pump-controller -b nrf52840dk_nrf52840 {root}/examples/pump-controller-app/nrfconnect' -# Generating nrf-nrf52840-shell +# Generating nrf-nrf52840dk-shell bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh"; export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR"; -west build --cmake-only -d {out}/nrf-nrf52840-shell -b nrf52840dk_nrf52840 {root}/examples/shell/nrfconnect' +west build --cmake-only -d {out}/nrf-nrf52840dk-shell -b nrf52840dk_nrf52840 {root}/examples/shell/nrfconnect' -# Generating nrf-nrf5340-light +# Generating nrf-nrf52840dongle-light bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh"; export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR"; -west build --cmake-only -d {out}/nrf-nrf5340-light -b nrf5340dk_nrf5340_cpuapp {root}/examples/lighting-app/nrfconnect' +west build --cmake-only -d {out}/nrf-nrf52840dongle-light -b nrf52840dongle_nrf52840 {root}/examples/lighting-app/nrfconnect' -# Generating nrf-nrf5340-light-rpc +# Generating nrf-nrf5340dk-light bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh"; export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR"; -west build --cmake-only -d {out}/nrf-nrf5340-light-rpc -b nrf5340dk_nrf5340_cpuapp {root}/examples/lighting-app/nrfconnect -- -DOVERLAY_CONFIG=rpc.overlay' +west build --cmake-only -d {out}/nrf-nrf5340dk-light -b nrf5340dk_nrf5340_cpuapp {root}/examples/lighting-app/nrfconnect' -# Generating nrf-nrf5340-lock +# Generating nrf-nrf5340dk-light-rpc bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh"; export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR"; -west build --cmake-only -d {out}/nrf-nrf5340-lock -b nrf5340dk_nrf5340_cpuapp {root}/examples/lock-app/nrfconnect' +west build --cmake-only -d {out}/nrf-nrf5340dk-light-rpc -b nrf5340dk_nrf5340_cpuapp {root}/examples/lighting-app/nrfconnect -- -DOVERLAY_CONFIG=rpc.overlay' -# Generating nrf-nrf5340-pump +# Generating nrf-nrf5340dk-lock bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh"; export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR"; -west build --cmake-only -d {out}/nrf-nrf5340-pump -b nrf5340dk_nrf5340_cpuapp {root}/examples/pump-app/nrfconnect' +west build --cmake-only -d {out}/nrf-nrf5340dk-lock -b nrf5340dk_nrf5340_cpuapp {root}/examples/lock-app/nrfconnect' -# Generating nrf-nrf5340-pump-controller +# Generating nrf-nrf5340dk-pump bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh"; export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR"; -west build --cmake-only -d {out}/nrf-nrf5340-pump-controller -b nrf5340dk_nrf5340_cpuapp {root}/examples/pump-controller-app/nrfconnect' +west build --cmake-only -d {out}/nrf-nrf5340dk-pump -b nrf5340dk_nrf5340_cpuapp {root}/examples/pump-app/nrfconnect' -# Generating nrf-nrf5340-shell +# Generating nrf-nrf5340dk-pump-controller bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh"; export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR"; -west build --cmake-only -d {out}/nrf-nrf5340-shell -b nrf5340dk_nrf5340_cpuapp {root}/examples/shell/nrfconnect' +west build --cmake-only -d {out}/nrf-nrf5340dk-pump-controller -b nrf5340dk_nrf5340_cpuapp {root}/examples/pump-controller-app/nrfconnect' + +# Generating nrf-nrf5340dk-shell +bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh"; +export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR"; +west build --cmake-only -d {out}/nrf-nrf5340dk-shell -b nrf5340dk_nrf5340_cpuapp {root}/examples/shell/nrfconnect' # Generating qpg-qpg6100-lock gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/qpg {out}/qpg-qpg6100-lock @@ -1164,41 +1169,44 @@ ninja -C {out}/nrf-native-posix-64-tests # Run Tests nrf-native-posix-64-tests ctest --build-nocmake -V --output-on-failure --test-dir {out}/nrf-native-posix-64-tests -# Building nrf-nrf52840-light -ninja -C {out}/nrf-nrf52840-light +# Building nrf-nrf52840dk-light +ninja -C {out}/nrf-nrf52840dk-light + +# Building nrf-nrf52840dk-light-rpc +ninja -C {out}/nrf-nrf52840dk-light-rpc -# Building nrf-nrf52840-light-rpc -ninja -C {out}/nrf-nrf52840-light-rpc +# Building nrf-nrf52840dk-lock +ninja -C {out}/nrf-nrf52840dk-lock -# Building nrf-nrf52840-lock -ninja -C {out}/nrf-nrf52840-lock +# Building nrf-nrf52840dk-pump +ninja -C {out}/nrf-nrf52840dk-pump -# Building nrf-nrf52840-pump -ninja -C {out}/nrf-nrf52840-pump +# Building nrf-nrf52840dk-pump-controller +ninja -C {out}/nrf-nrf52840dk-pump-controller -# Building nrf-nrf52840-pump-controller -ninja -C {out}/nrf-nrf52840-pump-controller +# Building nrf-nrf52840dk-shell +ninja -C {out}/nrf-nrf52840dk-shell -# Building nrf-nrf52840-shell -ninja -C {out}/nrf-nrf52840-shell +# Building nrf-nrf52840dongle-light +ninja -C {out}/nrf-nrf52840dongle-light -# Building nrf-nrf5340-light -ninja -C {out}/nrf-nrf5340-light +# Building nrf-nrf5340dk-light +ninja -C {out}/nrf-nrf5340dk-light -# Building nrf-nrf5340-light-rpc -ninja -C {out}/nrf-nrf5340-light-rpc +# Building nrf-nrf5340dk-light-rpc +ninja -C {out}/nrf-nrf5340dk-light-rpc -# Building nrf-nrf5340-lock -ninja -C {out}/nrf-nrf5340-lock +# Building nrf-nrf5340dk-lock +ninja -C {out}/nrf-nrf5340dk-lock -# Building nrf-nrf5340-pump -ninja -C {out}/nrf-nrf5340-pump +# Building nrf-nrf5340dk-pump +ninja -C {out}/nrf-nrf5340dk-pump -# Building nrf-nrf5340-pump-controller -ninja -C {out}/nrf-nrf5340-pump-controller +# Building nrf-nrf5340dk-pump-controller +ninja -C {out}/nrf-nrf5340dk-pump-controller -# Building nrf-nrf5340-shell -ninja -C {out}/nrf-nrf5340-shell +# Building nrf-nrf5340dk-shell +ninja -C {out}/nrf-nrf5340dk-shell # Building qpg-qpg6100-lock ninja -C {out}/qpg-qpg6100-lock diff --git a/scripts/build/testdata/build_linux_on_x64.txt b/scripts/build/testdata/build_linux_on_x64.txt index 343a8a4c38eff6..3b2b4c3f4b49e4 100644 --- a/scripts/build/testdata/build_linux_on_x64.txt +++ b/scripts/build/testdata/build_linux_on_x64.txt @@ -41,6 +41,16 @@ bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/minimal-mdns '"'"'--args=chip_inet_config_enable_ipv4=false target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-minmdns-ipv6only' +# Generating linux-arm64-shell +bash -c ' +PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/shell/standalone '"'"'--args=target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-shell' + +# Generating linux-arm64-shell-ipv6only +bash -c ' +PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/shell/standalone '"'"'--args=chip_inet_config_enable_ipv4=false target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-shell-ipv6only' + # Generating linux-arm64-thermostat bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ @@ -81,6 +91,12 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa # Generating linux-x64-rpc-console gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/common/pigweed/rpc_console {out}/linux-x64-rpc-console +# Generating linux-x64-shell +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/shell/standalone {out}/linux-x64-shell + +# Generating linux-x64-shell-ipv6only +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/shell/standalone --args=chip_inet_config_enable_ipv4=false {out}/linux-x64-shell-ipv6only + # Generating linux-x64-tests gn gen --check --fail-on-unused-args --export-compile-commands --root={root} --args=chip_build_tests=true {out}/linux-x64-tests @@ -120,6 +136,12 @@ ninja -C {out}/linux-arm64-minmdns # Building linux-arm64-minmdns-ipv6only ninja -C {out}/linux-arm64-minmdns-ipv6only +# Building linux-arm64-shell +ninja -C {out}/linux-arm64-shell + +# Building linux-arm64-shell-ipv6only +ninja -C {out}/linux-arm64-shell-ipv6only + # Building linux-arm64-thermostat ninja -C {out}/linux-arm64-thermostat @@ -156,6 +178,12 @@ ninja -C {out}/linux-x64-minmdns-ipv6only # Building linux-x64-rpc-console ninja -C {out}/linux-x64-rpc-console +# Building linux-x64-shell +ninja -C {out}/linux-x64-shell + +# Building linux-x64-shell-ipv6only +ninja -C {out}/linux-x64-shell-ipv6only + # Building linux-x64-tests ninja -C {out}/linux-x64-tests check diff --git a/scripts/build/testdata/glob_star_targets_except_host.txt b/scripts/build/testdata/glob_star_targets_except_host.txt index 4e35246d9f2abf..72e609ffe3ee2a 100644 --- a/scripts/build/testdata/glob_star_targets_except_host.txt +++ b/scripts/build/testdata/glob_star_targets_except_host.txt @@ -43,17 +43,18 @@ mbed-CY8CPROTO_062_4343W-lock-release mbed-CY8CPROTO_062_4343W-pigweed-release mbed-CY8CPROTO_062_4343W-shell-release nrf-native-posix-64-tests -nrf-nrf52840-light -nrf-nrf52840-light-rpc -nrf-nrf52840-lock -nrf-nrf52840-pump -nrf-nrf52840-pump-controller -nrf-nrf52840-shell -nrf-nrf5340-light -nrf-nrf5340-lock -nrf-nrf5340-pump -nrf-nrf5340-pump-controller -nrf-nrf5340-shell +nrf-nrf52840dk-light +nrf-nrf52840dk-light-rpc +nrf-nrf52840dk-lock +nrf-nrf52840dk-pump +nrf-nrf52840dk-pump-controller +nrf-nrf52840dk-shell +nrf-nrf52840dongle-light +nrf-nrf5340dk-light +nrf-nrf5340dk-lock +nrf-nrf5340dk-pump +nrf-nrf5340dk-pump-controller +nrf-nrf5340dk-shell qpg-qpg6100-lock telink-tlsr9518adk80d-light tizen-arm-light diff --git a/scripts/constraints.txt b/scripts/constraints.txt index 76a29a9a33ac95..02deb3991b06a7 100644 --- a/scripts/constraints.txt +++ b/scripts/constraints.txt @@ -134,7 +134,7 @@ mbed-ls==1.8.11 ; platform_machine != "aarch64" and sys_platform == "linux" # via -r requirements.mbed.txt mbed-os-tools==1.8.11 # via mbed-ls -mbed-tools==7.22.0 ; platform_machine != "aarch64" and sys_platform == "linux" +mbed-tools==7.49.1 ; platform_machine != "aarch64" and sys_platform == "linux" # via -r requirements.mbed.txt mobly==1.10.1 # via -r requirements.txt diff --git a/scripts/requirements.mbed.txt b/scripts/requirements.mbed.txt index 47907c083849eb..557c64af524fed 100644 --- a/scripts/requirements.mbed.txt +++ b/scripts/requirements.mbed.txt @@ -1,3 +1,3 @@ -mbed-tools>=7.0.0 ; platform_machine != 'aarch64' and sys_platform == 'linux' +mbed-tools>=7.49.1 ; platform_machine != 'aarch64' and sys_platform == 'linux' pytest==6.2.5 ; platform_machine != 'aarch64' and sys_platform == 'linux' mbed-ls==1.8.11 ; platform_machine != 'aarch64' and sys_platform == 'linux' diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index 01506f2c38036e..4cdbe5d86e1dd3 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -49,6 +49,7 @@ static_library("app") { "CASESessionManager.cpp", "CASESessionManager.h", "CommandHandler.cpp", + "CommandResponseHelper.h", "CommandSender.cpp", "DefaultAttributePersistenceProvider.cpp", "DeviceProxy.cpp", diff --git a/src/app/CommandHandler.cpp b/src/app/CommandHandler.cpp index 7e41b30b7d2c98..cabddbb1f8b57c 100644 --- a/src/app/CommandHandler.cpp +++ b/src/app/CommandHandler.cpp @@ -436,7 +436,17 @@ TLV::TLVWriter * CommandHandler::GetCommandDataIBTLVWriter() FabricIndex CommandHandler::GetAccessingFabricIndex() const { - return mpExchangeCtx->GetSessionHandle()->AsSecureSession()->GetFabricIndex(); + FabricIndex fabric = kUndefinedFabricIndex; + if (mpExchangeCtx->GetSessionHandle()->IsGroupSession()) + { + fabric = mpExchangeCtx->GetSessionHandle()->AsGroupSession()->GetFabricIndex(); + } + else + { + fabric = mpExchangeCtx->GetSessionHandle()->AsSecureSession()->GetFabricIndex(); + } + + return fabric; } CommandHandler * CommandHandler::Handle::Get() diff --git a/src/app/CommandResponseHelper.h b/src/app/CommandResponseHelper.h new file mode 100644 index 00000000000000..840a8a590fc5ff --- /dev/null +++ b/src/app/CommandResponseHelper.h @@ -0,0 +1,61 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * 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. + */ + +#pragma once + +#include +#include +#include + +namespace chip { +namespace app { + +template +class CommandResponseHelper +{ +public: + CommandResponseHelper(app::CommandHandler * command, const app::ConcreteCommandPath & commandPath) : + mCommand(command), mCommandPath(commandPath), responsed(false) + {} + + CHIP_ERROR Success(const CommandData & response) + { + CHIP_ERROR err = mCommand->AddResponseData(mCommandPath, response); + if (err == CHIP_NO_ERROR) + { + responsed = true; + } + return err; + }; + + void Response(EmberAfStatus status) + { + emberAfSendImmediateDefaultResponse(status); + responsed = true; + } + + bool IsResponsed() { return responsed; } + +private: + app::CommandHandler * mCommand; + app::ConcreteCommandPath mCommandPath; + bool responsed; +}; + +} // namespace app +} // namespace chip diff --git a/src/app/CommandSender.cpp b/src/app/CommandSender.cpp index c9174d78b62eaa..e3b82bfa09cd60 100644 --- a/src/app/CommandSender.cpp +++ b/src/app/CommandSender.cpp @@ -282,7 +282,7 @@ CHIP_ERROR CommandSender::ProcessInvokeResponseIB(InvokeResponseIB::Parser & aIn { ChipLogProgress(DataManagement, "Received Command Response Status for Endpoint=%" PRIu16 " Cluster=" ChipLogFormatMEI - " Command=" ChipLogFormatMEI " Status=0x%" PRIx16, + " Command=" ChipLogFormatMEI " Status=0x%" PRIx8, endpointId, ChipLogValueMEI(clusterId), ChipLogValueMEI(commandId), to_underlying(statusIB.mStatus)); } diff --git a/src/app/CommandSender.h b/src/app/CommandSender.h index 8409694ea290f1..8d9064fa4b603c 100644 --- a/src/app/CommandSender.h +++ b/src/app/CommandSender.h @@ -170,6 +170,8 @@ class CommandSender final : public Messaging::ExchangeDelegate return AddRequestDataInternal(aCommandPath, aData, aTimedInvokeTimeoutMs); } + CHIP_ERROR FinishCommand(const Optional & aTimedInvokeTimeoutMs); + #if CONFIG_IM_BUILD_FOR_UNIT_TEST /** * Version of AddRequestData that allows sending a message that is @@ -278,8 +280,6 @@ class CommandSender final : public Messaging::ExchangeDelegate // and mPendingInvokeData is populated. CHIP_ERROR SendInvokeRequest(); - CHIP_ERROR FinishCommand(const Optional & aTimedInvokeTimeoutMs); - CHIP_ERROR Finalize(System::PacketBufferHandle & commandPacket); Messaging::ExchangeContext * mpExchangeCtx = nullptr; diff --git a/src/app/StatusResponse.cpp b/src/app/StatusResponse.cpp index f6f5335b50de79..3ae368137a90a7 100644 --- a/src/app/StatusResponse.cpp +++ b/src/app/StatusResponse.cpp @@ -54,7 +54,7 @@ CHIP_ERROR StatusResponse::ProcessStatusResponse(System::PacketBufferHandle && a ReturnErrorOnFailure(response.CheckSchemaValidity()); #endif ReturnErrorOnFailure(response.GetStatus(aStatus.mStatus)); - ChipLogProgress(InteractionModel, "Received status response, status is %" PRIu16, to_underlying(aStatus.mStatus)); + ChipLogProgress(InteractionModel, "Received status response, status is %" PRIu8, to_underlying(aStatus.mStatus)); if (aStatus.mStatus == Protocols::InteractionModel::Status::Success) { diff --git a/src/app/WriteHandler.cpp b/src/app/WriteHandler.cpp index 8ec46e57bb82cf..209246c68e9f62 100644 --- a/src/app/WriteHandler.cpp +++ b/src/app/WriteHandler.cpp @@ -279,7 +279,17 @@ CHIP_ERROR WriteHandler::AddStatus(const AttributePathParams & aAttributePathPar FabricIndex WriteHandler::GetAccessingFabricIndex() const { - return mpExchangeCtx->GetSessionHandle()->AsSecureSession()->GetFabricIndex(); + FabricIndex fabric = kUndefinedFabricIndex; + if (mpExchangeCtx->GetSessionHandle()->IsGroupSession()) + { + fabric = mpExchangeCtx->GetSessionHandle()->AsGroupSession()->GetFabricIndex(); + } + else + { + fabric = mpExchangeCtx->GetSessionHandle()->AsSecureSession()->GetFabricIndex(); + } + + return fabric; } const char * WriteHandler::GetStateStr() const diff --git a/src/app/chip_data_model.gni b/src/app/chip_data_model.gni index a19f120daa9660..c8134caba0f0f0 100644 --- a/src/app/chip_data_model.gni +++ b/src/app/chip_data_model.gni @@ -148,6 +148,14 @@ template("chip_data_model") { "${_app_root}/util/ContentApp.cpp", "${_app_root}/util/ContentAppPlatform.cpp", ] + } else if (cluster == "ota-requestor") { + sources += [ + # TODO - align name of folder ? + "${_app_root}/clusters/${cluster}/${cluster}-server.cpp", + "${_app_root}/clusters/${cluster}/BDXDownloader.cpp", + "${_app_root}/clusters/${cluster}/BDXDownloader.h", + "${_app_root}/clusters/${cluster}/OTARequestor.cpp", + ] } else { sources += [ "${_app_root}/clusters/${cluster}/${cluster}.cpp" ] } diff --git a/src/app/clusters/access-control-server/access-control-server.cpp b/src/app/clusters/access-control-server/access-control-server.cpp index b8927fbf9ff4b3..e89a1c7845b8fa 100644 --- a/src/app/clusters/access-control-server/access-control-server.cpp +++ b/src/app/clusters/access-control-server/access-control-server.cpp @@ -243,66 +243,72 @@ struct AccessControlEntryCodec break; } case to_underlying(Fields::kSubjects): { - TLV::TLVType subjectsContainer; - VerifyOrReturnError(TLV::kTLVType_Array == aReader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); - ReturnErrorOnFailure(aReader.EnterContainer(subjectsContainer)); - while ((err = aReader.Next()) == CHIP_NO_ERROR) + if (aReader.GetType() != TLV::kTLVType_Null) { - NodeId subject = kUndefinedNodeId; - ReturnErrorOnFailure(DataModel::Decode(aReader, subject)); - ReturnErrorOnFailure(entry.AddSubject(nullptr, subject)); + TLV::TLVType subjectsContainer; + VerifyOrReturnError(TLV::kTLVType_Array == aReader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(aReader.EnterContainer(subjectsContainer)); + while ((err = aReader.Next()) == CHIP_NO_ERROR) + { + NodeId subject = kUndefinedNodeId; + ReturnErrorOnFailure(DataModel::Decode(aReader, subject)); + ReturnErrorOnFailure(entry.AddSubject(nullptr, subject)); + } + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(aReader.ExitContainer(subjectsContainer)); } - VerifyOrReturnError(err == CHIP_END_OF_TLV, err); - ReturnErrorOnFailure(aReader.ExitContainer(subjectsContainer)); break; } case to_underlying(Fields::kTargets): { - TLV::TLVType targetsContainer; - VerifyOrReturnError(TLV::kTLVType_Array == aReader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); - ReturnErrorOnFailure(aReader.EnterContainer(targetsContainer)); - while ((err = aReader.Next()) == CHIP_NO_ERROR) + if (aReader.GetType() != TLV::kTLVType_Null) { - AccessControl::Entry::Target target; - TLV::TLVType targetContainer; - VerifyOrReturnError(TLV::kTLVType_Structure == aReader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); - ReturnErrorOnFailure(aReader.EnterContainer(targetContainer)); - using TargetFields = AccessControlCluster::Structs::Target::Fields; + TLV::TLVType targetsContainer; + VerifyOrReturnError(TLV::kTLVType_Array == aReader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(aReader.EnterContainer(targetsContainer)); while ((err = aReader.Next()) == CHIP_NO_ERROR) { - VerifyOrReturnError(TLV::IsContextTag(aReader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); - switch (TLV::TagNumFromTag(aReader.GetTag())) + AccessControl::Entry::Target target; + TLV::TLVType targetContainer; + VerifyOrReturnError(TLV::kTLVType_Structure == aReader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(aReader.EnterContainer(targetContainer)); + using TargetFields = AccessControlCluster::Structs::Target::Fields; + while ((err = aReader.Next()) == CHIP_NO_ERROR) { - case to_underlying(TargetFields::kCluster): - if (aReader.GetType() != TLV::kTLVType_Null) - { - ReturnErrorOnFailure(DataModel::Decode(aReader, target.cluster)); - target.flags |= target.kCluster; - } - break; - case to_underlying(TargetFields::kEndpoint): - if (aReader.GetType() != TLV::kTLVType_Null) - { - ReturnErrorOnFailure(DataModel::Decode(aReader, target.endpoint)); - target.flags |= target.kEndpoint; - } - break; - case to_underlying(TargetFields::kDeviceType): - if (aReader.GetType() != TLV::kTLVType_Null) + VerifyOrReturnError(TLV::IsContextTag(aReader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(aReader.GetTag())) { - ReturnErrorOnFailure(DataModel::Decode(aReader, target.deviceType)); - target.flags |= target.kDeviceType; + case to_underlying(TargetFields::kCluster): + if (aReader.GetType() != TLV::kTLVType_Null) + { + ReturnErrorOnFailure(DataModel::Decode(aReader, target.cluster)); + target.flags |= target.kCluster; + } + break; + case to_underlying(TargetFields::kEndpoint): + if (aReader.GetType() != TLV::kTLVType_Null) + { + ReturnErrorOnFailure(DataModel::Decode(aReader, target.endpoint)); + target.flags |= target.kEndpoint; + } + break; + case to_underlying(TargetFields::kDeviceType): + if (aReader.GetType() != TLV::kTLVType_Null) + { + ReturnErrorOnFailure(DataModel::Decode(aReader, target.deviceType)); + target.flags |= target.kDeviceType; + } + break; + default: + break; } - break; - default: - break; } + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(aReader.ExitContainer(targetContainer)); + ReturnErrorOnFailure(entry.AddTarget(nullptr, target)); } VerifyOrReturnError(err == CHIP_END_OF_TLV, err); - ReturnErrorOnFailure(aReader.ExitContainer(targetContainer)); - ReturnErrorOnFailure(entry.AddTarget(nullptr, target)); + ReturnErrorOnFailure(aReader.ExitContainer(targetsContainer)); } - VerifyOrReturnError(err == CHIP_END_OF_TLV, err); - ReturnErrorOnFailure(aReader.ExitContainer(targetsContainer)); break; } default: diff --git a/src/app/clusters/channel-server/channel-delegate.h b/src/app/clusters/channel-server/channel-delegate.h index 0195c1004389b7..6c382bb83dd09b 100644 --- a/src/app/clusters/channel-server/channel-delegate.h +++ b/src/app/clusters/channel-server/channel-delegate.h @@ -19,7 +19,8 @@ #pragma once #include - +#include +#include #include #include @@ -34,13 +35,14 @@ namespace Channel { class Delegate { public: - virtual std::list HandleGetChannelList() = 0; - virtual chip::app::Clusters::Channel::Structs::LineupInfo::Type HandleGetLineup() = 0; - virtual chip::app::Clusters::Channel::Structs::ChannelInfo::Type HandleGetCurrentChannel() = 0; - - virtual Commands::ChangeChannelResponse::Type HandleChangeChannel(const chip::CharSpan & match) = 0; - virtual bool HandleChangeChannelByNumber(const uint16_t & majorNumber, const uint16_t & minorNumber) = 0; - virtual bool HandleSkipChannel(const uint16_t & count) = 0; + virtual CHIP_ERROR HandleGetChannelList(app::AttributeValueEncoder & aEncoder) = 0; + virtual CHIP_ERROR HandleGetLineup(app::AttributeValueEncoder & aEncoder) = 0; + virtual CHIP_ERROR HandleGetCurrentChannel(app::AttributeValueEncoder & aEncoder) = 0; + + virtual void HandleChangeChannel(const chip::CharSpan & match, + CommandResponseHelper & responser) = 0; + virtual bool HandleChangeChannelByNumber(const uint16_t & majorNumber, const uint16_t & minorNumber) = 0; + virtual bool HandleSkipChannel(const uint16_t & count) = 0; virtual ~Delegate() = default; }; diff --git a/src/app/clusters/channel-server/channel-server.cpp b/src/app/clusters/channel-server/channel-server.cpp index c5f08c427a750d..bc68441b9389fe 100644 --- a/src/app/clusters/channel-server/channel-server.cpp +++ b/src/app/clusters/channel-server/channel-server.cpp @@ -38,12 +38,11 @@ ******************************************************************************* ******************************************************************************/ -#include -#include - #include #include #include +#include +#include #include #include @@ -149,26 +148,17 @@ CHIP_ERROR ChannelAttrAccess::Read(const app::ConcreteReadAttributePath & aPath, CHIP_ERROR ChannelAttrAccess::ReadChannelListAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate) { - std::list channelList = delegate->HandleGetChannelList(); - return aEncoder.EncodeList([channelList](const auto & encoder) -> CHIP_ERROR { - for (const auto & channel : channelList) - { - ReturnErrorOnFailure(encoder.Encode(channel)); - } - return CHIP_NO_ERROR; - }); + return delegate->HandleGetChannelList(aEncoder); } CHIP_ERROR ChannelAttrAccess::ReadLineupAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate) { - Structs::LineupInfo::Type lineup = delegate->HandleGetLineup(); - return aEncoder.Encode(lineup); + return delegate->HandleGetLineup(aEncoder); } CHIP_ERROR ChannelAttrAccess::ReadCurrentChannelAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate) { - Structs::ChannelInfo::Type currentChannel = delegate->HandleGetCurrentChannel(); - return aEncoder.Encode(currentChannel); + return delegate->HandleGetCurrentChannel(aEncoder); } } // anonymous namespace @@ -184,20 +174,26 @@ bool emberAfChannelClusterChangeChannelRequestCallback(app::CommandHandler * com auto & match = commandData.match; + app::CommandResponseHelper responser(command, commandPath); + Delegate * delegate = GetDelegate(endpoint); VerifyOrExit(isDelegateNull(delegate, endpoint) != true, err = CHIP_ERROR_INCORRECT_STATE); { - Commands::ChangeChannelResponse::Type response = delegate->HandleChangeChannel(match); - err = command->AddResponseData(commandPath, response); - SuccessOrExit(err); + delegate->HandleChangeChannel(match, responser); } exit: if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "emberAfChannelClusterChangeChannelRequestCallback error: %s", err.AsString()); + } + + // If isDelegateNull, no one will call responser, so IsResponsed will be false + if (!responser.IsResponsed()) + { emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_FAILURE); } + return true; } diff --git a/src/app/clusters/content-launch-server/content-launch-delegate.h b/src/app/clusters/content-launch-server/content-launch-delegate.h index 0ac1da2bf96a0a..766f8aff26907a 100644 --- a/src/app/clusters/content-launch-server/content-launch-delegate.h +++ b/src/app/clusters/content-launch-server/content-launch-delegate.h @@ -21,6 +21,8 @@ #include #include +#include +#include #include #include @@ -35,14 +37,14 @@ namespace ContentLauncher { class Delegate { public: - virtual Commands::LaunchResponse::Type HandleLaunchContent(chip::EndpointId endpointId, - const std::list & parameterList, bool autoplay, - const chip::CharSpan & data) = 0; + virtual void HandleLaunchContent(const std::list & parameterList, bool autoplay, const chip::CharSpan & data, + CommandResponseHelper & responser) = 0; - virtual Commands::LaunchResponse::Type HandleLaunchUrl(const chip::CharSpan & contentUrl, const chip::CharSpan & displayString, - const std::list & brandingInformation) = 0; + virtual void HandleLaunchUrl(const chip::CharSpan & contentUrl, const chip::CharSpan & displayString, + const std::list & brandingInformation, + CommandResponseHelper & responser) = 0; - virtual std::list HandleGetAcceptHeaderList() = 0; + virtual CHIP_ERROR HandleGetAcceptHeaderList(app::AttributeValueEncoder & aEncoder) = 0; virtual uint32_t HandleGetSupportedStreamingProtocols() = 0; diff --git a/src/app/clusters/content-launch-server/content-launch-server.cpp b/src/app/clusters/content-launch-server/content-launch-server.cpp index 286e141bd324b1..079f459eb974eb 100644 --- a/src/app/clusters/content-launch-server/content-launch-server.cpp +++ b/src/app/clusters/content-launch-server/content-launch-server.cpp @@ -149,15 +149,7 @@ CHIP_ERROR ContentLauncherAttrAccess::Read(const app::ConcreteReadAttributePath CHIP_ERROR ContentLauncherAttrAccess::ReadAcceptHeaderAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate) { - std::list acceptHeaderList = delegate->HandleGetAcceptHeaderList(); - return aEncoder.EncodeList([acceptHeaderList](const auto & encoder) -> CHIP_ERROR { - for (const auto & acceptedHeader : acceptHeaderList) - { - CharSpan span(acceptedHeader.c_str(), acceptedHeader.length()); - ReturnErrorOnFailure(encoder.Encode(span)); - } - return CHIP_NO_ERROR; - }); + return delegate->HandleGetAcceptHeaderList(aEncoder); } CHIP_ERROR ContentLauncherAttrAccess::ReadSupportedStreamingProtocolsAttribute(app::AttributeValueEncoder & aEncoder, @@ -185,20 +177,23 @@ bool emberAfContentLauncherClusterLaunchContentRequestCallback( // auto searchIterator = commandData.search.begin(); std::list parameterList; + app::CommandResponseHelper responser(commandObj, commandPath); + Delegate * delegate = GetDelegate(endpoint); VerifyOrExit(isDelegateNull(delegate, endpoint) != true, err = CHIP_ERROR_INCORRECT_STATE); - { - Commands::LaunchResponse::Type response = delegate->HandleLaunchContent(endpoint, parameterList, autoplay, data); - err = commandObj->AddResponseData(commandPath, response); - SuccessOrExit(err); + delegate->HandleLaunchContent(parameterList, autoplay, data, responser); } exit: if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "emberAfContentLauncherClusterLaunchContentRequestCallback error: %s", err.AsString()); + } + // If isDelegateNull, no one will call responser, so IsResponsed will be false + if (!responser.IsResponsed()) + { emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_FAILURE); } @@ -218,20 +213,23 @@ bool emberAfContentLauncherClusterLaunchURLRequestCallback( // auto brandingInformationIterator = commandData.brandingInformation.begin(); std::list brandingInformationList; + app::CommandResponseHelper responser(commandObj, commandPath); + Delegate * delegate = GetDelegate(endpoint); VerifyOrExit(isDelegateNull(delegate, endpoint) != true, err = CHIP_ERROR_INCORRECT_STATE); - { - Commands::LaunchResponse::Type response = delegate->HandleLaunchUrl(contentUrl, displayString, brandingInformationList); - err = commandObj->AddResponseData(commandPath, response); - SuccessOrExit(err); + delegate->HandleLaunchUrl(contentUrl, displayString, brandingInformationList, responser); } exit: if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "emberAfContentLauncherClusterLaunchURLCallback error: %s", err.AsString()); + } + // If isDelegateNull, no one will call responser, so IsResponsed will be false + if (!responser.IsResponsed()) + { emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_FAILURE); } diff --git a/src/app/clusters/localization-configuration-server/localization-configuration-server.cpp b/src/app/clusters/localization-configuration-server/localization-configuration-server.cpp new file mode 100644 index 00000000000000..d8f06923d4c065 --- /dev/null +++ b/src/app/clusters/localization-configuration-server/localization-configuration-server.cpp @@ -0,0 +1,145 @@ +/* + * + * 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 Localization Configuration Server Cluster + ***************************************************************************/ + +#include +#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::LocalizationConfiguration; +using namespace chip::app::Clusters::LocalizationConfiguration::Attributes; + +namespace { + +class LocalizationConfigurationAttrAccess : public AttributeAccessInterface +{ +public: + // Register for the Localization Configuration cluster on all endpoints. + LocalizationConfigurationAttrAccess() : AttributeAccessInterface(Optional::Missing(), LocalizationConfiguration::Id) + {} + + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override; + +private: + CHIP_ERROR ReadActiveLocale(EndpointId endpoint, AttributeValueEncoder & aEncoder); + CHIP_ERROR WriteActiveLocale(EndpointId endpoint, AttributeValueDecoder & aDecoder); + CHIP_ERROR ReadSupportedLocales(AttributeValueEncoder & aEncoder); +}; + +LocalizationConfigurationAttrAccess gAttrAccess; + +CHIP_ERROR LocalizationConfigurationAttrAccess::ReadActiveLocale(EndpointId endpoint, AttributeValueEncoder & aEncoder) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + char activeLocale[DeviceLayer::ConfigurationManager::kMaxLanguageTagLength + 1]; + size_t codeLen = 0; + + if (DeviceLayer::ConfigurationMgr().GetActiveLocale(activeLocale, sizeof(activeLocale), codeLen) == CHIP_NO_ERROR) + { + err = aEncoder.Encode(chip::CharSpan(activeLocale, strlen(activeLocale))); + } + + return err; +} + +CHIP_ERROR LocalizationConfigurationAttrAccess::WriteActiveLocale(EndpointId endpoint, AttributeValueDecoder & aDecoder) +{ + DeviceLayer::AttributeList supportedLocales; + chip::CharSpan activeLocale; + + ReturnErrorOnFailure(aDecoder.Decode(activeLocale)); + VerifyOrReturnError(activeLocale.size() <= DeviceLayer::ConfigurationManager::kMaxLanguageTagLength, + CHIP_ERROR_INVALID_MESSAGE_LENGTH); + + return DeviceLayer::ConfigurationMgr().StoreActiveLocale(activeLocale.data(), activeLocale.size()); +} + +CHIP_ERROR LocalizationConfigurationAttrAccess::ReadSupportedLocales(AttributeValueEncoder & aEncoder) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + DeviceLayer::AttributeList supportedLocales; + + if (DeviceLayer::PlatformMgr().GetSupportedLocales(supportedLocales) == CHIP_NO_ERROR) + { + err = aEncoder.EncodeList([&supportedLocales](const auto & encoder) -> CHIP_ERROR { + for (auto locales : supportedLocales) + { + ReturnErrorOnFailure(encoder.Encode(locales)); + } + + return CHIP_NO_ERROR; + }); + } + else + { + err = aEncoder.EncodeEmptyList(); + } + + return err; +} + +CHIP_ERROR LocalizationConfigurationAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) +{ + VerifyOrDie(aPath.mClusterId == LocalizationConfiguration::Id); + + switch (aPath.mAttributeId) + { + case ActiveLocale::Id: + return ReadActiveLocale(aPath.mEndpointId, aEncoder); + case SupportedLocales::Id: + return ReadSupportedLocales(aEncoder); + default: + break; + } + return CHIP_NO_ERROR; +} + +CHIP_ERROR LocalizationConfigurationAttrAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) +{ + VerifyOrDie(aPath.mClusterId == LocalizationConfiguration::Id); + + switch (aPath.mAttributeId) + { + case ActiveLocale::Id: + return WriteActiveLocale(aPath.mEndpointId, aDecoder); + default: + break; + } + return CHIP_NO_ERROR; +} + +} // anonymous namespace + +void MatterLocalizationConfigurationPluginServerInitCallback(void) +{ + registerAttributeAccessOverride(&gAttrAccess); +} diff --git a/src/app/clusters/media-input-server/media-input-delegate.h b/src/app/clusters/media-input-server/media-input-delegate.h index b596a9c5e58b2f..862298b9352777 100644 --- a/src/app/clusters/media-input-server/media-input-delegate.h +++ b/src/app/clusters/media-input-server/media-input-delegate.h @@ -19,7 +19,7 @@ #pragma once #include - +#include #include #include @@ -34,12 +34,13 @@ namespace MediaInput { class Delegate { public: - virtual std::list HandleGetInputList() = 0; - virtual uint8_t HandleGetCurrentInput() = 0; - virtual bool HandleSelectInput(const uint8_t index) = 0; - virtual bool HandleShowInputStatus() = 0; - virtual bool HandleHideInputStatus() = 0; - virtual bool HandleRenameInput(const uint8_t index, const chip::CharSpan & name) = 0; + // no easy way to handle the return memory of app::Clusters::MediaInput::Structs::InputInfo::Type list, so encoder is used + virtual CHIP_ERROR HandleGetInputList(app::AttributeValueEncoder & aEncoder) = 0; + virtual uint8_t HandleGetCurrentInput() = 0; + virtual bool HandleSelectInput(const uint8_t index) = 0; + virtual bool HandleShowInputStatus() = 0; + virtual bool HandleHideInputStatus() = 0; + virtual bool HandleRenameInput(const uint8_t index, const chip::CharSpan & name) = 0; virtual ~Delegate() = default; }; diff --git a/src/app/clusters/media-input-server/media-input-server.cpp b/src/app/clusters/media-input-server/media-input-server.cpp index 896a759ba0a758..a1b72a6dd0c23a 100644 --- a/src/app/clusters/media-input-server/media-input-server.cpp +++ b/src/app/clusters/media-input-server/media-input-server.cpp @@ -129,14 +129,7 @@ CHIP_ERROR MediaInputAttrAccess::Read(const app::ConcreteReadAttributePath & aPa CHIP_ERROR MediaInputAttrAccess::ReadInputListAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate) { - std::list inputList = delegate->HandleGetInputList(); - return aEncoder.EncodeList([inputList](const auto & encoder) -> CHIP_ERROR { - for (const auto & input : inputList) - { - ReturnErrorOnFailure(encoder.Encode(input)); - } - return CHIP_NO_ERROR; - }); + return delegate->HandleGetInputList(aEncoder); } CHIP_ERROR MediaInputAttrAccess::ReadCurrentInputAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate) diff --git a/src/app/clusters/ota-requestor/OTARequestor.cpp b/src/app/clusters/ota-requestor/OTARequestor.cpp index d114e4f60665e5..93961cf7c3de23 100644 --- a/src/app/clusters/ota-requestor/OTARequestor.cpp +++ b/src/app/clusters/ota-requestor/OTARequestor.cpp @@ -200,7 +200,7 @@ EmberAfStatus OTARequestor::HandleAnnounceOTAProvider(app::CommandHandler * comm } mProviderNodeId = providerNodeId; - mProviderFabricIndex = commandObj->GetExchangeContext()->GetSessionHandle()->AsSecureSession()->GetFabricIndex(); + mProviderFabricIndex = commandObj->GetAccessingFabricIndex(); mProviderEndpointId = providerEndpoint; ChipLogProgress(SoftwareUpdate, "OTA Requestor received AnnounceOTAProvider"); @@ -323,8 +323,8 @@ void OTARequestor::OnConnectionFailure(void * context, PeerId peerId, CHIP_ERROR OTARequestor * requestorCore = static_cast(context); VerifyOrDie(requestorCore != nullptr); - ChipLogError(SoftwareUpdate, "Failed to connect to node 0x%" PRIX64 ": %" CHIP_ERROR_FORMAT, peerId.GetNodeId(), - error.Format()); + ChipLogError(SoftwareUpdate, "Failed to connect to node 0x" ChipLogFormatX64 ": %" CHIP_ERROR_FORMAT, + ChipLogValueX64(peerId.GetNodeId()), error.Format()); switch (requestorCore->mOnConnectedAction) { diff --git a/src/app/clusters/scenes/scenes.cpp b/src/app/clusters/scenes/scenes.cpp index c2de7e8e1e6862..75dd1f91cf67f5 100644 --- a/src/app/clusters/scenes/scenes.cpp +++ b/src/app/clusters/scenes/scenes.cpp @@ -65,13 +65,6 @@ uint8_t emberAfPluginScenesServerEntriesInUse = 0; EmberAfSceneTableEntry emberAfPluginScenesServerSceneTable[EMBER_AF_PLUGIN_SCENES_TABLE_SIZE]; #endif -static FabricIndex GetFabricIndex(app::CommandHandler * commandObj) -{ - VerifyOrReturnError(nullptr != commandObj, 0); - VerifyOrReturnError(nullptr != commandObj->GetExchangeContext(), 0); - return commandObj->GetExchangeContext()->GetSessionHandle()->AsSecureSession()->GetFabricIndex(); -} - static bool readServerAttribute(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, const char * name, uint8_t * data, uint8_t size) { @@ -252,7 +245,7 @@ bool emberAfScenesClusterViewSceneCallback(app::CommandHandler * commandObj, con bool emberAfScenesClusterRemoveSceneCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::RemoveScene::DecodableType & commandData) { - auto fabricIndex = GetFabricIndex(commandObj); + auto fabricIndex = commandObj->GetAccessingFabricIndex(); auto & groupId = commandData.groupId; auto & sceneId = commandData.sceneId; @@ -311,7 +304,7 @@ bool emberAfScenesClusterRemoveSceneCallback(app::CommandHandler * commandObj, c bool emberAfScenesClusterRemoveAllScenesCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::RemoveAllScenes::DecodableType & commandData) { - auto fabricIndex = GetFabricIndex(commandObj); + auto fabricIndex = commandObj->GetAccessingFabricIndex(); auto & groupId = commandData.groupId; EmberAfStatus status = EMBER_ZCL_STATUS_INVALID_FIELD; @@ -363,7 +356,7 @@ bool emberAfScenesClusterRemoveAllScenesCallback(app::CommandHandler * commandOb bool emberAfScenesClusterStoreSceneCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::StoreScene::DecodableType & commandData) { - auto fabricIndex = GetFabricIndex(commandObj); + auto fabricIndex = commandObj->GetAccessingFabricIndex(); auto & groupId = commandData.groupId; auto & sceneId = commandData.sceneId; @@ -399,7 +392,7 @@ bool emberAfScenesClusterStoreSceneCallback(app::CommandHandler * commandObj, co bool emberAfScenesClusterRecallSceneCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::RecallScene::DecodableType & commandData) { - auto fabricIndex = GetFabricIndex(commandObj); + auto fabricIndex = commandObj->GetAccessingFabricIndex(); auto & groupId = commandData.groupId; auto & sceneId = commandData.sceneId; @@ -437,7 +430,7 @@ bool emberAfScenesClusterRecallSceneCallback(app::CommandHandler * commandObj, c bool emberAfScenesClusterGetSceneMembershipCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::GetSceneMembership::DecodableType & commandData) { - auto fabricIndex = GetFabricIndex(commandObj); + auto fabricIndex = commandObj->GetAccessingFabricIndex(); auto & groupId = commandData.groupId; CHIP_ERROR err = CHIP_NO_ERROR; @@ -768,7 +761,7 @@ bool emberAfPluginScenesServerParseAddScene( EmberAfSceneTableEntry entry; EmberAfStatus status; bool enhanced = (cmd->commandId == ZCL_ENHANCED_ADD_SCENE_COMMAND_ID); - auto fabricIndex = GetFabricIndex(commandObj); + auto fabricIndex = commandObj->GetAccessingFabricIndex(); EndpointId endpoint = cmd->apsFrame->destinationEndpoint; uint8_t i, index = EMBER_AF_SCENE_TABLE_NULL_INDEX; @@ -1105,7 +1098,7 @@ bool emberAfPluginScenesServerParseViewScene(app::CommandHandler * commandObj, c EmberAfSceneTableEntry entry = {}; EmberAfStatus status = EMBER_ZCL_STATUS_NOT_FOUND; bool enhanced = (cmd->commandId == ZCL_ENHANCED_VIEW_SCENE_COMMAND_ID); - FabricIndex fabricIndex = GetFabricIndex(commandObj); + FabricIndex fabricIndex = commandObj->GetAccessingFabricIndex(); EndpointId endpoint = cmd->apsFrame->destinationEndpoint; emberAfScenesClusterPrintln("RX: %pViewScene 0x%2x, 0x%x", (enhanced ? "Enhanced" : ""), groupId, sceneId); diff --git a/src/app/clusters/test-cluster-server/test-cluster-server.cpp b/src/app/clusters/test-cluster-server/test-cluster-server.cpp index 09fd86b52b8b4c..9ea4deaa26aef7 100644 --- a/src/app/clusters/test-cluster-server/test-cluster-server.cpp +++ b/src/app/clusters/test-cluster-server/test-cluster-server.cpp @@ -610,6 +610,11 @@ bool emberAfTestClusterClusterTestListInt8UReverseRequestCallback( { auto iter = commandData.arg1.begin(); Commands::TestListInt8UReverseResponse::Type responseData; + if (count == 0) + { + SuccessOrExit(commandObj->AddResponseData(commandPath, responseData)); + return true; + } size_t cur = count; Platform::ScopedMemoryBuffer responseBuf; VerifyOrExit(responseBuf.Calloc(count), ); diff --git a/src/app/clusters/wake-on-lan-server/wake-on-lan-delegate.h b/src/app/clusters/wake-on-lan-server/wake-on-lan-delegate.h index 400dda253a867d..1f4bed9177733a 100644 --- a/src/app/clusters/wake-on-lan-server/wake-on-lan-delegate.h +++ b/src/app/clusters/wake-on-lan-server/wake-on-lan-delegate.h @@ -19,6 +19,7 @@ #pragma once #include +#include namespace chip { namespace app { @@ -31,7 +32,7 @@ namespace WakeOnLan { class Delegate { public: - virtual chip::CharSpan HandleGetMacAddress() = 0; + virtual CHIP_ERROR HandleGetMacAddress(app::AttributeValueEncoder & aEncoder) = 0; virtual ~Delegate() = default; }; diff --git a/src/app/clusters/wake-on-lan-server/wake-on-lan-server.cpp b/src/app/clusters/wake-on-lan-server/wake-on-lan-server.cpp index 9b6e5d20e9634a..658430cc873c1b 100644 --- a/src/app/clusters/wake-on-lan-server/wake-on-lan-server.cpp +++ b/src/app/clusters/wake-on-lan-server/wake-on-lan-server.cpp @@ -126,8 +126,7 @@ CHIP_ERROR WakeOnLanAttrAccess::Read(const app::ConcreteReadAttributePath & aPat CHIP_ERROR WakeOnLanAttrAccess::ReadMacAddressAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate) { - chip::CharSpan macAddress = delegate->HandleGetMacAddress(); - return aEncoder.Encode(macAddress); + return delegate->HandleGetMacAddress(aEncoder); } } // anonymous namespace diff --git a/src/app/common/templates/templates.json b/src/app/common/templates/templates.json index 16be724a8ae62a..a91a71c88b3af1 100644 --- a/src/app/common/templates/templates.json +++ b/src/app/common/templates/templates.json @@ -13,6 +13,10 @@ { "name": "header", "path": "../../zap-templates/partials/header.zapt" + }, + { + "name": "cluster_objects_struct", + "path": "../../zap-templates/partials/cluster-objects-struct.zapt" } ], "templates": [ diff --git a/src/app/data-model/Decode.h b/src/app/data-model/Decode.h index dffad80af0e204..17076900befccd 100644 --- a/src/app/data-model/Decode.h +++ b/src/app/data-model/Decode.h @@ -158,7 +158,12 @@ CHIP_ERROR Decode(TLV::TLVReader & reader, Nullable & x) } // We have a value; decode it. - return Decode(reader, x.SetNonNull()); + ReturnErrorOnFailure(Decode(reader, x.SetNonNull())); + if (!x.HasValidValue()) + { + return CHIP_ERROR_IM_CONSTRAINT_ERROR; + } + return CHIP_NO_ERROR; } } // namespace DataModel diff --git a/src/app/data-model/Encode.h b/src/app/data-model/Encode.h index e78481b8344e7d..86ffc2c6ca5a74 100644 --- a/src/app/data-model/Encode.h +++ b/src/app/data-model/Encode.h @@ -22,6 +22,8 @@ #include #include +#include + namespace chip { namespace app { namespace DataModel { @@ -115,6 +117,15 @@ CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag, const Nullable & x) { return writer.PutNull(tag); } + // Allow sending invalid values for nullables when + // CONFIG_IM_BUILD_FOR_UNIT_TEST is true, so we can test how the other side + // responds. +#if !CONFIG_IM_BUILD_FOR_UNIT_TEST + if (!x.HasValidValue()) + { + return CHIP_ERROR_IM_CONSTRAINT_ERROR; + } +#endif // !CONFIG_IM_BUILD_FOR_UNIT_TEST return Encode(writer, tag, x.Value()); } diff --git a/src/app/data-model/Nullable.h b/src/app/data-model/Nullable.h index ff33d2d0d68fde..e8bf8c5ae2d1a1 100644 --- a/src/app/data-model/Nullable.h +++ b/src/app/data-model/Nullable.h @@ -18,8 +18,11 @@ #pragma once +#include #include +#include + namespace chip { namespace app { namespace DataModel { @@ -52,6 +55,24 @@ struct Nullable : protected Optional { return Optional::Emplace(std::forward(args)...); } + + // For integer types, being nullable involves a range restriction. + template < + typename U = std::decay_t, + typename std::enable_if_t<(std::is_integral::value && !std::is_same::value) || std::is_enum::value, int> = 0> + constexpr bool HasValidValue() const + { + return NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, Value()); + } + + // For all other types, all values are valid. + template , + typename std::enable_if_t<(!std::is_integral::value || std::is_same::value) && !std::is_enum::value, + int> = 0> + constexpr bool HasValidValue() const + { + return true; + } }; } // namespace DataModel diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index 1364d11ecd956c..c7394bc0d74d51 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -133,6 +133,9 @@ CHIP_ERROR Server::Init(AppDelegate * delegate, uint16_t secureServicePort, uint err = mTransports.Init(UdpListenParameters(DeviceLayer::UDPEndPointManager()) .SetAddressType(IPAddressType::kIPv6) .SetListenPort(mSecuredServicePort) +#if CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_UDP + .SetNativeParams(chip::DeviceLayer::ThreadStackMgrImpl().OTInstance()) +#endif // CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_UDP #if INET_CONFIG_ENABLE_IPV4 , @@ -151,12 +154,12 @@ CHIP_ERROR Server::Init(AppDelegate * delegate, uint16_t secureServicePort, uint #endif SuccessOrExit(err); - // Enable Group Listening - // TODO : Fix this once GroupDataProvider is implemented #Issue 11075 - // for (iterate through all GroupDataProvider multicast Address) - // { +// Enable Group Listening +// TODO : Fix this once GroupDataProvider is implemented #Issue 11075 +// for (iterate through all GroupDataProvider multicast Address) +// { #ifdef CHIP_ENABLE_GROUP_MESSAGING_TESTS - err = mTransports.MulticastGroupJoinLeave(Transport::PeerAddress::Multicast(1, 1234), true); + err = mTransports.MulticastGroupJoinLeave(Transport::PeerAddress::Multicast(0, 1234), true); SuccessOrExit(err); #endif //} diff --git a/src/app/tests/TestCommandInteraction.cpp b/src/app/tests/TestCommandInteraction.cpp index 23a54ecb993aca..2af13c597ce36e 100644 --- a/src/app/tests/TestCommandInteraction.cpp +++ b/src/app/tests/TestCommandInteraction.cpp @@ -126,7 +126,7 @@ class MockCommandSenderCallback : public CommandSender::Callback } void OnError(const chip::app::CommandSender * apCommandSender, const chip::app::StatusIB & aStatus, CHIP_ERROR aError) override { - ChipLogError(Controller, "OnError happens with %" PRIx16 " %" CHIP_ERROR_FORMAT, to_underlying(aStatus.mStatus), + ChipLogError(Controller, "OnError happens with %" PRIx8 " %" CHIP_ERROR_FORMAT, to_underlying(aStatus.mStatus), aError.Format()); onErrorCalledTimes++; } diff --git a/src/app/tests/suites/TestConstraints.yaml b/src/app/tests/suites/TestConstraints.yaml index 017d41a3b79b6c..30ed159b32ce06 100644 --- a/src/app/tests/suites/TestConstraints.yaml +++ b/src/app/tests/suites/TestConstraints.yaml @@ -94,6 +94,77 @@ tests: constraints: endsWith: "**" + - label: "Write attribute CHAR_STRING Value" + command: "writeAttribute" + attribute: "char_string" + arguments: + value: "lowercase" + + - label: + "Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints" + command: "readAttribute" + attribute: "char_string" + response: + constraints: + isLowerCase: true + isUpperCase: false + + - label: "Write attribute CHAR_STRING Value" + command: "writeAttribute" + attribute: "char_string" + arguments: + value: "UPPERCASE" + + - label: + "Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints" + command: "readAttribute" + attribute: "char_string" + response: + constraints: + isUpperCase: true + isLowerCase: false + + - label: "Write attribute CHAR_STRING Value" + command: "writeAttribute" + attribute: "char_string" + arguments: + value: "lowUPPER" + + - label: + "Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints" + command: "readAttribute" + attribute: "char_string" + response: + constraints: + isUpperCase: false + isLowerCase: false + + - label: "Write attribute CHAR_STRING Value" + command: "writeAttribute" + attribute: "char_string" + arguments: + value: "ABCDEF012V" + + - label: "Read attribute CHAR_STRING Value isHexString Constraints" + command: "readAttribute" + attribute: "char_string" + response: + constraints: + isHexString: false + + - label: "Write attribute CHAR_STRING Value" + command: "writeAttribute" + attribute: "char_string" + arguments: + value: "ABCDEF0123" + + - label: "Read attribute CHAR_STRING Value isHexString Constraints" + command: "readAttribute" + attribute: "char_string" + response: + constraints: + isHexString: true + - label: "Write attribute CHAR_STRING Value Back to Default Value" command: "writeAttribute" attribute: "char_string" diff --git a/src/app/tests/suites/TestDescriptorCluster.yaml b/src/app/tests/suites/TestDescriptorCluster.yaml index bdf73fc21717cc..9ab91edab81ff2 100644 --- a/src/app/tests/suites/TestDescriptorCluster.yaml +++ b/src/app/tests/suites/TestDescriptorCluster.yaml @@ -40,8 +40,8 @@ tests: 0x001E, # Binding 0x001F, # Access Control 0x0028, # Basic Information - 0x0029, # OTA Software Update Provider 0x002A, # OTA Software Update Requestor + 0x002B, # Localization Configuration 0x002E, # Power Source Configuration 0x0030, # General Commissioning 0x0031, # Network Commissioning @@ -63,7 +63,9 @@ tests: command: "readAttribute" attribute: "Client List" response: - value: [] + value: [ + 0x0029, # OTA Software Update Provider + ] - label: "Read attribute Parts list" command: "readAttribute" diff --git a/src/app/tests/suites/TestGroupMessaging.yaml b/src/app/tests/suites/TestGroupMessaging.yaml index fc9fcc2367af4c..ab7490ce0358d9 100644 --- a/src/app/tests/suites/TestGroupMessaging.yaml +++ b/src/app/tests/suites/TestGroupMessaging.yaml @@ -12,6 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. +# !!!!!!!!!! TEST INFORMATION !!!!!!!!!!!!!!!!!! +# This test file tests Group Multicast Messaging. +# For this test to work, A Group Write/Command and a unicast read need to occur to be able to confirm that the group Communication works. Every test comes in a pair +# Only Works on Linux machines +# When building chip-tool, chip_enable_group_messaging_tests needs to be set to true in the build command for the test to pass +# ./scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug/standalone/ chip_config_network_layer_ble=false is_tsan=true chip_enable_group_messaging_tests=true name: Basic Group Messaging Tests config: @@ -26,41 +32,44 @@ tests: #TODO : Add Group membership command when implemented Issue #11077 # - label: "Add device to Group" # command: "TODO" - + # Test Pair 1 : Sends a Group Write Attribute - label: "Group Write Attribute" command: "writeAttribute" attribute: "location" groupId: "1234" arguments: value: "us" - #Disabled due to issue-12983 + + # Test Pair 1 : Validates previous group write attribute with a unicast to read - label: "Read back Attribute" - disabled: true command: "readAttribute" attribute: "location" response: value: "us" + # Test Pair 2 : Sends a Group Write Attribute - label: "Restore initial location value" command: "writeAttribute" attribute: "location" groupId: "1234" arguments: value: "" - #Disabled due to issue-12983 + + # Test Pair 2 : Validates previous group write attribute with a unicast to read - label: "Read back Attribute" - disabled: true command: "readAttribute" attribute: "location" response: value: "" + # Test Pair 3 : Sends a Group command - label: "Turn On the light to see attribute change" cluster: "On/Off" command: "On" groupId: "1234" disabled: true + # Test Pair 3 : Validates previous group command with a unicast to read - label: "Check on/off attribute value is true after on command" cluster: "On/Off" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_BI_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BI_1_1.yaml index a068c690d2b602..feba2b4417c049 100644 --- a/src/app/tests/suites/certification/Test_TC_BI_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BI_1_1.yaml @@ -53,6 +53,7 @@ tests: value: 1 #issue #11053 disabled steps below Global attributes missing from YAML framework + #disabled due to issue #13442 - label: "Read the global attribute: AttributeList" disabled: true command: "readAttribute" @@ -95,7 +96,6 @@ tests: - label: "Read the optional global attribute : FeatureMap" disabled: true - optional: true command: "readAttribute" attribute: "FeatureMap" response: diff --git a/src/app/tests/suites/certification/Test_TC_BI_2_1.yaml b/src/app/tests/suites/certification/Test_TC_BI_2_1.yaml index b634927d16000c..e03d8780d69676 100644 --- a/src/app/tests/suites/certification/Test_TC_BI_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BI_2_1.yaml @@ -103,9 +103,9 @@ tests: value: 0 #Issue #11142 Disabled all optional attribute checks + #disabled due to issue #13442 - label: "Read optional non-global attribute: ActiveText" disabled: true - optional: true command: "readAttribute" attribute: "active text" response: @@ -113,7 +113,6 @@ tests: - label: "Read optional non-global attribute constraints: ActiveText" disabled: true - optional: true command: "readAttribute" attribute: "active text" response: @@ -123,7 +122,6 @@ tests: - label: "Write the default values to optional non-global attribute: ActiveText" disabled: true - optional: true command: "writeAttribute" attribute: "active text" arguments: @@ -131,7 +129,6 @@ tests: - label: "Reads back the optional non-global attribute: ActiveText" disabled: true - optional: true command: "readAttribute" attribute: "active text" response: @@ -139,7 +136,6 @@ tests: - label: "Read optional non-global attribute: Description" disabled: true - optional: true command: "readAttribute" attribute: "description" response: @@ -147,7 +143,6 @@ tests: - label: "Read optional non-global attribute constraints: Description" disabled: true - optional: true command: "readAttribute" attribute: "description" response: @@ -158,7 +153,6 @@ tests: "Write the default values to optional non-global attribute: Description" disabled: true - optional: true command: "writeAttribute" attribute: "description" arguments: @@ -166,7 +160,6 @@ tests: - label: "Reads back the optional non-global attribute: Description" disabled: true - optional: true command: "readAttribute" attribute: "description" response: @@ -174,7 +167,6 @@ tests: - label: "Read optional non-global attribute: InactiveText" disabled: true - optional: true command: "readAttribute" attribute: "inactive text" response: @@ -182,7 +174,6 @@ tests: - label: "Read optional non-global attribute constraints: InactiveText" disabled: true - optional: true command: "readAttribute" attribute: "inactive text" response: @@ -193,7 +184,6 @@ tests: "Write the default values to optional non-global attribute: InactiveText" disabled: true - optional: true command: "writeAttribute" attribute: "inactive text" arguments: @@ -201,7 +191,6 @@ tests: - label: "Reads back the optional non-global attribute: InactiveText" disabled: true - optional: true command: "readAttribute" attribute: "inactive text" response: @@ -209,7 +198,6 @@ tests: - label: "Read optional non-global attribute: Polarity" disabled: true - optional: true command: "readAttribute" attribute: "polarity" response: @@ -217,7 +205,6 @@ tests: - label: "Read optional non-global attribute constraints: Polarity" disabled: true - optional: true command: "readAttribute" attribute: "polarity" response: @@ -227,7 +214,6 @@ tests: - label: "Write the default values to optional non-global attribute: Polarity" disabled: true - optional: true command: "writeAttribute" attribute: "polarity" arguments: @@ -237,7 +223,6 @@ tests: - label: "Reads back the optional non-global attribute: Polarity" disabled: true - optional: true command: "readAttribute" attribute: "polarity" response: @@ -245,7 +230,6 @@ tests: - label: "Read optional non-global attribute: Reliability" disabled: true - optional: true command: "readAttribute" attribute: "reliability" response: @@ -253,7 +237,6 @@ tests: - label: "Read optional non-global attribute constraints: Reliability" disabled: true - optional: true command: "readAttribute" attribute: "reliability" response: @@ -264,7 +247,6 @@ tests: "Write the default values to optional non-global attribute: Reliability" disabled: true - optional: true command: "writeAttribute" attribute: "reliability" arguments: @@ -272,7 +254,6 @@ tests: - label: "Reads back the optional non-global attribute: Reliability" disabled: true - optional: true command: "readAttribute" attribute: "reliability" response: @@ -280,7 +261,6 @@ tests: - label: "Read optional non-global attribute constraints: ApplicationType" disabled: true - optional: true command: "readAttribute" attribute: "application type" response: @@ -293,7 +273,6 @@ tests: "Write the default values to optional non-global attribute: ApplicationType" disabled: true - optional: true command: "writeAttribute" attribute: "application type" arguments: @@ -303,7 +282,6 @@ tests: - label: "Reads back the optional non-global attribute: ApplicationType" disabled: true - optional: true command: "readAttribute" attribute: "application type" response: diff --git a/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml index ae2106abcbb752..1c1605a4e87dcd 100644 --- a/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml @@ -53,6 +53,7 @@ tests: value: 1 #issue #11053 disabled steps below Global attributes missing from YAML framework + #disabled due to issue #13442 - label: "Read the global attribute: AttributeList" disabled: true command: "readAttribute" @@ -95,7 +96,6 @@ tests: - label: "Read the optional global attribute : FeatureMap" disabled: true - optional: true command: "readAttribute" attribute: "FeatureMap" response: diff --git a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml index 0d74d9f336a7c4..db3007ae7a19bd 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml @@ -55,6 +55,7 @@ tests: value: 4 #issue #11053 disabled steps below Global attributes missing from YAML framework + #disabled due to issue #13442 - label: "Read the global attribute: AttributeList" disabled: true command: "readAttribute" @@ -124,7 +125,6 @@ tests: - label: "reads back optional global attribute: FeatureMap" disabled: true - optional: true command: "readAttribute" attribute: "FeatureMap" response: diff --git a/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml index dd361720c8a759..0cca35681ba801 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml @@ -642,7 +642,6 @@ tests: maxLength: 254 - label: "Write the default values to optional attribute: CompensationText" - disabled: true optional: true command: "writeAttribute" attribute: "compensation text" @@ -652,7 +651,6 @@ tests: error: UNSUPPORTED_WRITE - label: "Reads back optional attribute: CompensationText" - disabled: true optional: true command: "readAttribute" attribute: "compensation text" @@ -1205,7 +1203,6 @@ tests: type: uint8 - label: "Write the default optional attribute: ColorPointRIntensity" - disabled: true optional: true command: "writeAttribute" attribute: "color point r intensity" @@ -1213,7 +1210,6 @@ tests: value: 0 - label: "Read back the optional attribute: ColorPointRIntensity" - disabled: true optional: true command: "readAttribute" attribute: "color point r intensity" @@ -1277,7 +1273,6 @@ tests: type: uint8 - label: "Write the default optional attribute: ColorPointGIntensity" - disabled: true optional: true command: "writeAttribute" attribute: "color point g intensity" @@ -1285,7 +1280,6 @@ tests: value: 0 - label: "Read back the optional attribute: ColorPointGIntensity" - disabled: true optional: true command: "readAttribute" attribute: "color point g intensity" @@ -1349,7 +1343,6 @@ tests: type: uint8 - label: "Write the default optional attribute: ColorPointBIntensity" - disabled: true optional: true command: "writeAttribute" attribute: "color point b intensity" @@ -1357,7 +1350,6 @@ tests: value: 0 - label: "Read back the optional attribute: ColorPointBIntensity" - disabled: true optional: true command: "readAttribute" attribute: "color point b intensity" diff --git a/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml b/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml index f5f6083243f698..0480455f01e573 100644 --- a/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml @@ -56,6 +56,7 @@ tests: value: 2 #issue #11053 disabled steps below Global attributes missing from YAML framework + #disabled due to issue #13442 - label: "Read the global attribute: AttributeList" disabled: true command: "readAttribute" @@ -98,7 +99,6 @@ tests: - label: "Read the optional global attribute : FeatureMap" disabled: true - optional: true command: "readAttribute" attribute: "FeatureMap" response: diff --git a/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml index fdafc4fa0ee42f..d91a0f0cb347af 100644 --- a/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml @@ -245,6 +245,7 @@ tests: constraints: type: int16 + #issue #11670 Null check is not implemented in YAML framework. - label: "read the optional attribute: MinConstPressure" disabled: true optional: true diff --git a/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml b/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml index 8f1704f095b24e..1be6831d3dda17 100644 --- a/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml @@ -86,9 +86,9 @@ tests: response: value: 0 + #disabled due to issue #13442 - label: "Read the optional attribute: Tolerance" disabled: true - optional: true command: "readAttribute" attribute: "Tolerance" response: @@ -96,7 +96,6 @@ tests: - label: "Write the default values to optional attribute: Tolerance" disabled: true - optional: true command: "writeAttribute" attribute: "Tolerance" arguments: @@ -106,7 +105,6 @@ tests: - label: "Reads back optional attribute: Tolerance" disabled: true - optional: true command: "readAttribute" attribute: "Tolerance" response: @@ -115,7 +113,6 @@ tests: #Following attributes are based on the value of the extended feature in the cluster feature map - label: "Read the optional attribute: ScaledValue" disabled: true - optional: true command: "readAttribute" attribute: "ScaledValue" response: @@ -123,7 +120,6 @@ tests: - label: "Write the default values to optional attribute: ScaledValue" disabled: true - optional: true command: "writeAttribute" attribute: "ScaledValue" arguments: @@ -133,7 +129,6 @@ tests: - label: "Reads back optional attribute: ScaledValue" disabled: true - optional: true command: "readAttribute" attribute: "ScaledValue" response: @@ -141,7 +136,6 @@ tests: - label: "Read the optional attribute: MinScaledValue" disabled: true - optional: true command: "readAttribute" attribute: "MinScaledValue" response: @@ -149,7 +143,6 @@ tests: - label: "Write the default values to optional attribute: MinScaledValue" disabled: true - optional: true command: "writeAttribute" attribute: "MinScaledValue" arguments: @@ -159,7 +152,6 @@ tests: - label: "Reads back optional attribute: MinScaledValue" disabled: true - optional: true command: "readAttribute" attribute: "MinScaledValue" response: @@ -167,7 +159,6 @@ tests: - label: "Read the optional attribute: MaxScaledValue" disabled: true - optional: true command: "readAttribute" attribute: "MaxScaledValue" response: @@ -175,7 +166,6 @@ tests: - label: "Write the default values to optional attribute: MaxScaledValue" disabled: true - optional: true command: "writeAttribute" attribute: "MaxScaledValue" arguments: @@ -185,7 +175,6 @@ tests: - label: "Reads back optional attribute: MaxScaledValue" disabled: true - optional: true command: "readAttribute" attribute: "MaxScaledValue" response: @@ -193,7 +182,6 @@ tests: - label: "Read the optional attribute: ScaledTolerance" disabled: true - optional: true command: "readAttribute" attribute: "ScaledTolerance" response: @@ -201,7 +189,6 @@ tests: - label: "Write the default values to optional attribute: ScaledTolerance" disabled: true - optional: true command: "writeAttribute" attribute: "ScaledTolerance" arguments: @@ -211,7 +198,6 @@ tests: - label: "Reads back optional attribute: ScaledTolerance" disabled: true - optional: true command: "readAttribute" attribute: "ScaledTolerance" response: @@ -219,7 +205,6 @@ tests: - label: "Read the optional attribute: Scale" disabled: true - optional: true command: "readAttribute" attribute: "Scale" response: @@ -227,7 +212,6 @@ tests: - label: "Write the default values to optional attribute: Scale" disabled: true - optional: true command: "writeAttribute" attribute: "Scale" arguments: @@ -237,7 +221,6 @@ tests: - label: "Reads back optional attribute: Scale" disabled: true - optional: true command: "readAttribute" attribute: "Scale" response: diff --git a/src/app/tests/suites/certification/Test_TC_RH_2_1.yaml b/src/app/tests/suites/certification/Test_TC_RH_2_1.yaml index 919f11558a5589..63b676924a2bd2 100644 --- a/src/app/tests/suites/certification/Test_TC_RH_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RH_2_1.yaml @@ -71,7 +71,6 @@ tests: maxValue: 10000 - label: "Reads the optional attribute: Tolerance" - disabled: true optional: true command: "readAttribute" attribute: "tolerance" @@ -79,7 +78,6 @@ tests: value: 0 - label: "Reads constraints of attribute: Tolerance" - disabled: true optional: true command: "readAttribute" attribute: "tolerance" diff --git a/src/app/tests/suites/certification/Test_TC_SWDIAG_1_1.yaml b/src/app/tests/suites/certification/Test_TC_SWDIAG_1_1.yaml index 5a3b2eb272b2ef..dcbccd4cdf2ca2 100644 --- a/src/app/tests/suites/certification/Test_TC_SWDIAG_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SWDIAG_1_1.yaml @@ -24,10 +24,10 @@ tests: command: "WaitForCommissionee" #Issue #11185 Disabled as ThreadMetrics attribute missing + #disabled due to issue #13441 - label: "Reads a list of ThreadMetrics struct non-global attribute from DUT." disabled: true - optional: true command: "readAttribute" attribute: "ThreadMetrics" PICS: A_THREADMETRICS diff --git a/src/app/tests/suites/certification/Test_TC_SWDIAG_2_1.yaml b/src/app/tests/suites/certification/Test_TC_SWDIAG_2_1.yaml index 317e07670041c7..159935ef59a7ef 100644 --- a/src/app/tests/suites/certification/Test_TC_SWDIAG_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SWDIAG_2_1.yaml @@ -22,7 +22,6 @@ tests: #issue #11725 Reading the List is not implemented in YAML framework - label: "Reads a list of SoftwareFault struct from DUT" disabled: true - optional: true command: "readAttribute" attribute: "SoftwareFault" PICS: E_SOFTWAREFAULT diff --git a/src/app/tests/suites/certification/Test_TC_SWDIAG_3_1.yaml b/src/app/tests/suites/certification/Test_TC_SWDIAG_3_1.yaml index c9143709264272..8e276d80071ea6 100644 --- a/src/app/tests/suites/certification/Test_TC_SWDIAG_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SWDIAG_3_1.yaml @@ -24,15 +24,14 @@ tests: command: "WaitForCommissionee" #issue #11578 ResetWatermarks command is Failing + #disabled due to issue #13441 - label: "Sends ResetWatermarks to DUT" disabled: true - optional: true command: "ResetWatermarks" PICS: CR_RESETWATERMARKS - label: "Reads a list of ThreadMetrics struct attribute from DUT." disabled: true - optional: true command: "readAttribute" attribute: "ThreadMetrics" PICS: A_THREADMETRICS @@ -40,7 +39,6 @@ tests: value: 0 - label: "Reads CurrentHeapUsed attribute value from DUT" - disabled: true optional: true command: "readAttribute" attribute: "CurrentHeapUsed" @@ -49,7 +47,6 @@ tests: value: 0 - label: "Reads CurrentHeapHighWaterMark attribute value from DUT" - disabled: true optional: true command: "readAttribute" attribute: "CurrentHeapHighWatermark" diff --git a/src/app/tests/suites/certification/Test_TC_TM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_TM_2_1.yaml index e186215f18b52a..46a9e8fa7d0bdb 100644 --- a/src/app/tests/suites/certification/Test_TC_TM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TM_2_1.yaml @@ -51,7 +51,6 @@ tests: maxValue: 32767 - label: "read the optional attribute: Tolerance" - disabled: true optional: true command: "readAttribute" attribute: "Tolerance" diff --git a/src/app/tests/suites/commands/log/BUILD.gn b/src/app/tests/suites/commands/log/BUILD.gn new file mode 100644 index 00000000000000..c0f2ffa3eb6b55 --- /dev/null +++ b/src/app/tests/suites/commands/log/BUILD.gn @@ -0,0 +1,29 @@ +# Copyright (c) 2022 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. + +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") + +static_library("log") { + output_name = "libLogCommands" + + sources = [ + "LogCommands.cpp", + "LogCommands.h", + ] + + cflags = [ "-Wconversion" ] + + public_deps = [ "${chip_root}/src/lib/support" ] +} diff --git a/src/app/tests/suites/commands/log/LogCommands.cpp b/src/app/tests/suites/commands/log/LogCommands.cpp new file mode 100644 index 00000000000000..ffc0bd3e874e9c --- /dev/null +++ b/src/app/tests/suites/commands/log/LogCommands.cpp @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * 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. + * + */ + +#include "LogCommands.h" + +CHIP_ERROR LogCommands::Log(const char * message) +{ + ChipLogDetail(chipTool, "%s", message); + ReturnErrorOnFailure(ContinueOnChipMainThread()); + return CHIP_NO_ERROR; +} + +CHIP_ERROR LogCommands::UserPrompt(const char * message) +{ + ChipLogDetail(chipTool, "USER_PROMPT: %s", message); + ReturnErrorOnFailure(ContinueOnChipMainThread()); + return CHIP_NO_ERROR; +} diff --git a/src/app/tests/suites/commands/log/LogCommands.h b/src/app/tests/suites/commands/log/LogCommands.h new file mode 100644 index 00000000000000..f301fcadf3c420 --- /dev/null +++ b/src/app/tests/suites/commands/log/LogCommands.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * 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. + * + */ + +#pragma once + +#include + +class LogCommands +{ +public: + LogCommands(){}; + virtual ~LogCommands(){}; + + virtual CHIP_ERROR ContinueOnChipMainThread() = 0; + + CHIP_ERROR Log(const char * message); + CHIP_ERROR UserPrompt(const char * message); +}; diff --git a/src/app/tests/suites/include/ConstraintsChecker.h b/src/app/tests/suites/include/ConstraintsChecker.h new file mode 100644 index 00000000000000..43d14134c64c07 --- /dev/null +++ b/src/app/tests/suites/include/ConstraintsChecker.h @@ -0,0 +1,279 @@ +/* + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * 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. + * + */ + +#pragma once + +#include + +#include +#include + +class ConstraintsChecker +{ +public: + ConstraintsChecker(){}; + virtual ~ConstraintsChecker(){}; + +protected: + virtual void Exit(std::string message) = 0; + + bool CheckConstraintType(const char * itemName, const char * current, const char * expected) + { + ChipLogError(chipTool, "Warning: %s type checking is not implemented yet. Expected type: '%s'", itemName, expected); + return true; + } + + bool CheckConstraintFormat(const char * itemName, const char * current, const char * expected) + { + ChipLogError(chipTool, "Warning: %s format checking is not implemented yet. Expected format: '%s'", itemName, expected); + return true; + } + + bool CheckConstraintMinLength(const char * itemName, uint64_t current, uint64_t expected) + { + if (current < expected) + { + Exit(std::string(itemName) + " length < minLength: " + std::to_string(current) + " < " + std::to_string(expected)); + return false; + } + + return true; + } + + bool CheckConstraintMaxLength(const char * itemName, uint64_t current, uint64_t expected) + { + if (current > expected) + { + Exit(std::string(itemName) + " length > minLength: " + std::to_string(current) + " > " + std::to_string(expected)); + return false; + } + + return true; + } + + bool CheckConstraintStartsWith(const char * itemName, const chip::CharSpan current, const char * expected) + { + std::string value(current.data(), current.size()); + if (value.rfind(expected, 0) != 0) + { + Exit(std::string(itemName) + " (\"" + value + "\") does not starts with: \"" + std::string(expected) + "\""); + return false; + } + + return true; + } + + bool CheckConstraintEndsWith(const char * itemName, const chip::CharSpan current, const char * expected) + { + std::string value(current.data(), current.size()); + if (value.find(expected, value.size() - strlen(expected)) == std::string::npos) + { + Exit(std::string(itemName) + " (\"" + value + "\") does not ends with: \"" + std::string(expected) + "\""); + return false; + } + + return true; + } + + bool CheckConstraintIsUpperCase(const char * itemName, const chip::CharSpan current, bool expectUpperCase) + { + std::string value(current.data(), current.size()); + return CheckConstraintIsUpperCase(itemName, value.c_str(), expectUpperCase); + } + + bool CheckConstraintIsUpperCase(const char * itemName, const char * current, bool expectUpperCase) + { + bool isUpperCase = true; + for (size_t i = 0; i < strlen(current); i++) + { + if (!isupper(current[i])) + { + isUpperCase = false; + break; + } + } + + if (expectUpperCase && !isUpperCase) + { + Exit(std::string(itemName) + " (\"" + std::string(current) + "\") is not an upppercase string"); + return false; + } + + if (!expectUpperCase && isUpperCase) + { + Exit(std::string(itemName) + " (\"" + std::string(current) + "\") is an upppercase string"); + return false; + } + + return true; + } + + bool CheckConstraintIsLowerCase(const char * itemName, const chip::CharSpan current, bool expectLowerCase) + { + std::string value(current.data(), current.size()); + return CheckConstraintIsLowerCase(itemName, value.c_str(), expectLowerCase); + } + + bool CheckConstraintIsLowerCase(const char * itemName, const char * current, bool expectLowerCase) + { + bool isLowerCase = true; + for (size_t i = 0; i < strlen(current); i++) + { + if (isupper(current[i])) + { + isLowerCase = false; + break; + } + } + + if (expectLowerCase && !isLowerCase) + { + Exit(std::string(itemName) + " (\"" + std::string(current) + "\") is not a lowercase string"); + return false; + } + + if (!expectLowerCase && isLowerCase) + { + Exit(std::string(itemName) + " (\"" + std::string(current) + "\") is a lowercase string"); + return false; + } + + return true; + } + + bool CheckConstraintIsHexString(const char * itemName, const chip::CharSpan current, bool expectHexString) + { + std::string value(current.data(), current.size()); + return CheckConstraintIsHexString(itemName, value.c_str(), expectHexString); + } + + bool CheckConstraintIsHexString(const char * itemName, const char * current, bool expectHexString) + { + bool isHexString = true; + for (size_t i = 0; i < strlen(current); i++) + { + if (!isxdigit(current[i])) + { + isHexString = false; + break; + } + } + + if (expectHexString && !isHexString) + { + Exit(std::string(itemName) + " (\"" + std::string(current) + "\") is not a hexadecimal string"); + return false; + } + + if (!expectHexString && isHexString) + { + Exit(std::string(itemName) + " (\"" + std::string(current) + "\") is a hexadecimal string"); + return false; + } + + return true; + } + + template + bool CheckConstraintMinValue(const char * itemName, T current, T expected) + { + if (current < expected) + { + Exit(std::string(itemName) + " value < minValue: " + std::to_string(current) + " < " + std::to_string(expected)); + return false; + } + + return true; + } + + template + bool CheckConstraintMinValue(const char * itemName, const chip::app::DataModel::Nullable & current, U expected) + { + if (current.IsNull()) + { + return true; + } + return CheckConstraintMinValue(itemName, current.Value(), static_cast(expected)); + } + + template + bool CheckConstraintMaxValue(const char * itemName, T current, T expected) + { + if (current > expected) + { + Exit(std::string(itemName) + " value > maxValue: " + std::to_string(current) + " > " + std::to_string(expected)); + return false; + } + + return true; + } + + template + bool CheckConstraintMaxValue(const char * itemName, const chip::app::DataModel::Nullable & current, U expected) + { + if (current.IsNull()) + { + return true; + } + return CheckConstraintMaxValue(itemName, current.Value(), static_cast(expected)); + } + + template + bool CheckConstraintNotValue(const char * itemName, T current, U expected) + { + if (current == expected) + { + Exit(std::string(itemName) + " got unexpected value: " + std::to_string(current)); + return false; + } + + return true; + } + + template + bool CheckConstraintNotValue(const char * itemName, const chip::app::DataModel::Nullable & current, U expected) + { + if (current.IsNull()) + { + return true; + } + return CheckConstraintNotValue(itemName, current.Value(), expected); + } + + bool CheckConstraintNotValue(const char * itemName, const chip::CharSpan current, const chip::CharSpan expected) + { + if (current.data_equal(expected)) + { + Exit(std::string(itemName) + " got unexpected value: " + std::string(current.data(), current.size())); + return false; + } + + return true; + } + + bool CheckConstraintNotValue(const char * itemName, const chip::ByteSpan current, const chip::ByteSpan expected) + { + if (current.data_equal(expected)) + { + Exit(std::string(itemName) + " got unexpected value of size: " + std::to_string(current.size())); + return false; + } + + return true; + } +}; diff --git a/src/app/tests/suites/include/PICSChecker.h b/src/app/tests/suites/include/PICSChecker.h new file mode 100644 index 00000000000000..28c07af5a94482 --- /dev/null +++ b/src/app/tests/suites/include/PICSChecker.h @@ -0,0 +1,49 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * 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. + */ + +#pragma once + +#include + +#include +#include + +#include + +class PICSChecker +{ +public: + bool ShouldSkip(const char * expression) + { + // If there is no PICS configuration file, considers that nothing should be skipped. + if (!PICS.HasValue()) + { + return false; + } + + std::map pics(PICS.Value()); + bool shouldSkip = !PICSBooleanExpressionParser::Eval(expression, pics); + if (shouldSkip) + { + ChipLogProgress(chipTool, " **** Skipping: %s == false\n", expression); + } + return shouldSkip; + } + + chip::Optional> PICS; +}; diff --git a/src/app/tests/suites/include/ValueChecker.h b/src/app/tests/suites/include/ValueChecker.h new file mode 100644 index 00000000000000..8c6ea93e64a157 --- /dev/null +++ b/src/app/tests/suites/include/ValueChecker.h @@ -0,0 +1,172 @@ +/* + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * 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. + * + */ + +#pragma once + +#include + +#include +#include + +class ValueChecker +{ +public: + ValueChecker(){}; + virtual ~ValueChecker(){}; + +protected: + virtual void Exit(std::string message) = 0; + + bool CheckValueAsString(const char * itemName, chip::ByteSpan current, chip::ByteSpan expected) + { + if (!current.data_equal(expected)) + { + Exit(std::string(itemName) + " value mismatch, expecting " + + std::string(chip::Uint8::to_const_char(expected.data()), expected.size())); + return false; + } + + return true; + } + + bool CheckValueAsString(const char * itemName, chip::CharSpan current, chip::CharSpan expected) + { + if (!current.data_equal(expected)) + { + Exit(std::string(itemName) + " value mismatch, expected '" + std::string(expected.data(), expected.size()) + + "' but got '" + std::string(current.data(), current.size()) + "'"); + return false; + } + + return true; + } + + // Allow a different expected type from the actual value type, because if T + // is short the literal we are using is not short-typed. + template ::value, int> = 0> + bool CheckValue(const char * itemName, T current, U expected) + { + if (current != expected) + { + Exit(std::string(itemName) + " value mismatch: expected " + std::to_string(expected) + " but got " + + std::to_string(current)); + return false; + } + + return true; + } + + template ::value, int> = 0> + bool CheckValue(const char * itemName, T current, U expected) + { + return CheckValue(itemName, chip::to_underlying(current), expected); + } + + template + bool CheckValue(const char * itemName, chip::BitFlags current, U expected) + { + return CheckValue(itemName, current.Raw(), expected); + } + + template + bool CheckValuePresent(const char * itemName, const chip::Optional & value) + { + if (value.HasValue()) + { + return true; + } + + Exit(std::string(itemName) + " expected to have value but doesn't"); + return false; + } + + template + bool CheckValueNull(const char * itemName, const chip::app::DataModel::Nullable & value) + { + if (value.IsNull()) + { + return true; + } + + Exit(std::string(itemName) + " expected to be null but isn't"); + return false; + } + + template + bool CheckValueNonNull(const char * itemName, const chip::app::DataModel::Nullable & value) + { + if (!value.IsNull()) + { + return true; + } + + Exit(std::string(itemName) + " expected to not be null but is"); + return false; + } + + /** + * Check that the next list item, which is at index "index", exists and + * decodes properly. + */ + template + bool CheckNextListItemDecodes(const char * listName, typename std::remove_reference_t::Iterator & iter, size_t index) + { + bool hasValue = iter.Next(); + if (iter.GetStatus() != CHIP_NO_ERROR) + { + Exit(std::string(listName) + " value mismatch: error '" + iter.GetStatus().AsString() + "'decoding item at index " + + std::to_string(index)); + return false; + } + + if (hasValue) + { + return true; + } + + Exit(std::string(listName) + " value mismatch: should have value at index " + std::to_string(index) + + " but doesn't (actual value too short)"); + return false; + } + + /** + * Check that there are no more list items now that we have seen + * "expectedCount" of them. + */ + template + bool CheckNoMoreListItems(const char * listName, typename std::remove_reference_t::Iterator & iter, + size_t expectedCount) + { + bool hasValue = iter.Next(); + if (iter.GetStatus() != CHIP_NO_ERROR) + { + Exit(std::string(listName) + " value mismatch: error '" + iter.GetStatus().AsString() + + "'decoding item after we have seen " + std::to_string(expectedCount) + " items"); + return false; + } + + if (!hasValue) + { + return true; + } + + Exit(std::string(listName) + " value mismatch: expected only " + std::to_string(expectedCount) + + " items, but have more than that (actual value too long)"); + return false; + } +}; diff --git a/src/app/util/ember-compatibility-functions.cpp b/src/app/util/ember-compatibility-functions.cpp index c9e092d82409f0..0bd07101e769e4 100644 --- a/src/app/util/ember-compatibility-functions.cpp +++ b/src/app/util/ember-compatibility-functions.cpp @@ -369,35 +369,32 @@ CHIP_ERROR ReadSingleClusterData(const SubjectDescriptor & aSubjectDescriptor, c " (expanded=%d)", ChipLogValueMEI(aPath.mClusterId), aPath.mEndpointId, ChipLogValueMEI(aPath.mAttributeId), aPath.mExpanded); + // Check attribute existence. This includes attributes with registered metadata, but also specially handled + // mandatory global attributes (which just check for cluster on endpoint). + + EmberAfCluster * attributeCluster = nullptr; + EmberAfAttributeMetadata * attributeMetadata = nullptr; + if (aPath.mAttributeId == Clusters::Globals::Attributes::AttributeList::Id) { - // This is not in our attribute metadata, so we just check for this - // endpoint+cluster existing. - EmberAfCluster * cluster = emberAfFindCluster(aPath.mEndpointId, aPath.mClusterId, CLUSTER_MASK_SERVER); - if (cluster) - { - AttributeListReader reader(cluster); - bool ignored; // Our reader always tries to encode - return ReadViaAccessInterface(aSubjectDescriptor.fabricIndex, aPath, aAttributeReports, apEncoderState, &reader, - &ignored); - } - - // else to save codesize just fall through and do the metadata search - // (which we know will fail and error out); + attributeCluster = emberAfFindCluster(aPath.mEndpointId, aPath.mClusterId, CLUSTER_MASK_SERVER); + } + else + { + attributeMetadata = + emberAfLocateAttributeMetadata(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId, CLUSTER_MASK_SERVER, 0); } - EmberAfAttributeMetadata * attributeMetadata = - emberAfLocateAttributeMetadata(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId, CLUSTER_MASK_SERVER, 0); - - if (attributeMetadata == nullptr) + if (attributeCluster == nullptr && attributeMetadata == nullptr) { AttributeReportIB::Builder & attributeReport = aAttributeReports.CreateAttributeReport(); ReturnErrorOnFailure(aAttributeReports.GetError()); - - // This path is not actually supported. return SendFailureStatus(aPath, attributeReport, Protocols::InteractionModel::Status::UnsupportedAttribute, nullptr); } + // Check access control. A failed check will disallow the operation, and may or may not generate an attribute report + // depending on whether the path was expanded. + { Access::RequestPath requestPath{ .cluster = aPath.mClusterId, .endpoint = aPath.mEndpointId }; Access::Privilege requestPrivilege = Access::Privilege::kView; // TODO: get actual request privilege @@ -419,27 +416,32 @@ CHIP_ERROR ReadSingleClusterData(const SubjectDescriptor & aSubjectDescriptor, c } } - // Value encoder will encode the whole AttributeReport, including the path, value and the version. - // The AttributeValueEncoder may encode more than one AttributeReportIB for the list chunking feature. - if (auto * attrOverride = findAttributeAccessOverride(aPath.mEndpointId, aPath.mClusterId)) - { - bool triedEncode; - ReturnErrorOnFailure(ReadViaAccessInterface(aSubjectDescriptor.fabricIndex, aPath, aAttributeReports, apEncoderState, - attrOverride, &triedEncode)); + // Read attribute using attribute override, if appropriate. This includes registered overrides, but also + // specially handled mandatory global attributes (which use unregistered overrides). - if (triedEncode) + { + // Special handling for mandatory global attributes: these are always for attribute list, using a special + // reader (which can be lightweight constructed even from nullptr). + AttributeListReader reader(attributeCluster); + AttributeAccessInterface * attributeOverride = + (attributeCluster != nullptr) ? &reader : findAttributeAccessOverride(aPath.mEndpointId, aPath.mClusterId); + if (attributeOverride) { - return CHIP_NO_ERROR; + bool triedEncode; + ReturnErrorOnFailure(ReadViaAccessInterface(aSubjectDescriptor.fabricIndex, aPath, aAttributeReports, apEncoderState, + attributeOverride, &triedEncode)); + ReturnErrorCodeIf(triedEncode, CHIP_NO_ERROR); } } + // Read attribute using Ember, if it doesn't have an override. + AttributeReportIB::Builder & attributeReport = aAttributeReports.CreateAttributeReport(); ReturnErrorOnFailure(aAttributeReports.GetError()); TLV::TLVWriter backup; attributeReport.Checkpoint(backup); - // We have verified that the attribute exists. AttributeDataIB::Builder & attributeDataIBBuilder = attributeReport.CreateAttributeData(); ReturnErrorOnFailure(attributeDataIBBuilder.GetError()); diff --git a/src/app/util/im-client-callbacks.cpp b/src/app/util/im-client-callbacks.cpp index ec50dd0fb31e05..c9e6985722962a 100644 --- a/src/app/util/im-client-callbacks.cpp +++ b/src/app/util/im-client-callbacks.cpp @@ -145,130 +145,130 @@ static void LogIMStatus(Protocols::InteractionModel::Status status) switch (status) { case Protocols::InteractionModel::Status::Success: - ChipLogProgress(Zcl, " status: Success (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Success (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Failure: - ChipLogProgress(Zcl, " status: Failure (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Failure (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::InvalidSubscription: - ChipLogProgress(Zcl, " status: InvalidSubscription (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: InvalidSubscription (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::UnsupportedAccess: - ChipLogProgress(Zcl, " status: UnsupportedAccess (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: UnsupportedAccess (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::UnsupportedEndpoint: - ChipLogProgress(Zcl, " status: UnsupportedEndpoint (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: UnsupportedEndpoint (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::InvalidAction: - ChipLogProgress(Zcl, " status: InvalidAction (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: InvalidAction (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::UnsupportedCommand: - ChipLogProgress(Zcl, " status: UnsupportedCommand (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: UnsupportedCommand (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Deprecated82: - ChipLogProgress(Zcl, " status: Deprecated82 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Deprecated82 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Deprecated83: - ChipLogProgress(Zcl, " status: Deprecated83 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Deprecated83 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Deprecated84: - ChipLogProgress(Zcl, " status: Deprecated84 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Deprecated84 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::InvalidCommand: - ChipLogProgress(Zcl, " status: InvalidCommand (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: InvalidCommand (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::UnsupportedAttribute: - ChipLogProgress(Zcl, " status: UnsupportedAttribute (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: UnsupportedAttribute (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::InvalidValue: - ChipLogProgress(Zcl, " status: InvalidValue (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: InvalidValue (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::UnsupportedWrite: - ChipLogProgress(Zcl, " status: UnsupportedWrite (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: UnsupportedWrite (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::ResourceExhausted: - ChipLogProgress(Zcl, " status: ResourceExhausted (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: ResourceExhausted (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Deprecated8a: - ChipLogProgress(Zcl, " status: Deprecated8a (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Deprecated8a (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::NotFound: - ChipLogProgress(Zcl, " status: NotFound (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: NotFound (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::UnreportableAttribute: - ChipLogProgress(Zcl, " status: UnreportableAttribute (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: UnreportableAttribute (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::InvalidDataType: - ChipLogProgress(Zcl, " status: InvalidDataType (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: InvalidDataType (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Deprecated8e: - ChipLogProgress(Zcl, " status: Deprecated8e (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Deprecated8e (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::UnsupportedRead: - ChipLogProgress(Zcl, " status: UnsupportedRead (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: UnsupportedRead (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Deprecated90: - ChipLogProgress(Zcl, " status: Deprecated90 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Deprecated90 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Deprecated91: - ChipLogProgress(Zcl, " status: Deprecated91 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Deprecated91 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Reserved92: - ChipLogProgress(Zcl, " status: Reserved92 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Reserved92 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Deprecated93: - ChipLogProgress(Zcl, " status: Deprecated93 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Deprecated93 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Timeout: - ChipLogProgress(Zcl, " status: Timeout (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Timeout (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Reserved95: - ChipLogProgress(Zcl, " status: Reserved95 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Reserved95 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Reserved96: - ChipLogProgress(Zcl, " status: Reserved96 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Reserved96 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Reserved97: - ChipLogProgress(Zcl, " status: Reserved97 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Reserved97 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Reserved98: - ChipLogProgress(Zcl, " status: Reserved98 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Reserved98 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Reserved99: - ChipLogProgress(Zcl, " status: Reserved99 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Reserved99 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Reserved9a: - ChipLogProgress(Zcl, " status: Reserved9a (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Reserved9a (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::ConstraintError: - ChipLogProgress(Zcl, " status: ConstraintError (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: ConstraintError (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Busy: - ChipLogProgress(Zcl, " status: Busy (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Busy (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Deprecatedc0: - ChipLogProgress(Zcl, " status: Deprecatedc0 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Deprecatedc0 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Deprecatedc1: - ChipLogProgress(Zcl, " status: Deprecatedc1 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Deprecatedc1 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Deprecatedc2: - ChipLogProgress(Zcl, " status: Deprecatedc2 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Deprecatedc2 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::UnsupportedCluster: - ChipLogProgress(Zcl, " status: UnsupportedCluster (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: UnsupportedCluster (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Deprecatedc4: - ChipLogProgress(Zcl, " status: Deprecatedc4 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Deprecatedc4 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::NoUpstreamSubscription: - ChipLogProgress(Zcl, " status: NoUpstreamSubscription (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: NoUpstreamSubscription (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::NeedsTimedInteraction: - ChipLogProgress(Zcl, " status: NeedsTimedInteraction (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: NeedsTimedInteraction (0x%02" PRIx8 ")", to_underlying(status)); break; default: - ChipLogError(Zcl, "Unknown status: 0x%04" PRIx16, to_underlying(status)); + ChipLogError(Zcl, "Unknown status: 0x%02" PRIx8, to_underlying(status)); break; } } diff --git a/src/app/util/util.cpp b/src/app/util/util.cpp index 67621dcfba7552..c304e440be67b8 100644 --- a/src/app/util/util.cpp +++ b/src/app/util/util.cpp @@ -311,7 +311,6 @@ void MatterAlarmsPluginServerInitCallback() {} void MatterTimePluginServerInitCallback() {} void MatterAclPluginServerInitCallback() {} void MatterPollControlPluginServerInitCallback() {} -void MatterLocalizationConfigurationPluginServerInitCallback() {} void MatterLocalizationUnitPluginServerInitCallback() {} void MatterLocalizationTimeFormatPluginServerInitCallback() {} void MatterTimeSynchronizationPluginServerInitCallback() {} diff --git a/src/app/zap-templates/common/ClusterTestGeneration.js b/src/app/zap-templates/common/ClusterTestGeneration.js index f672602d0c6b5d..59b2bc904c6b95 100644 --- a/src/app/zap-templates/common/ClusterTestGeneration.js +++ b/src/app/zap-templates/common/ClusterTestGeneration.js @@ -645,11 +645,6 @@ function isLiteralNull(value, options) return (value === null) || (value instanceof NullObject); } -function expectedValueHasProp(value, name) -{ - return name in value; -} - function octetStringEscapedForCLiteral(value) { // Escape control characters, things outside the ASCII range, and single @@ -693,6 +688,5 @@ exports.chip_tests_config_get_default_value = chip_tests_config_get_default_valu exports.chip_tests_config_get_type = chip_tests_config_get_type; exports.isTestOnlyCluster = isTestOnlyCluster; exports.isLiteralNull = isLiteralNull; -exports.expectedValueHasProp = expectedValueHasProp; exports.octetStringEscapedForCLiteral = octetStringEscapedForCLiteral; exports.if_include_struct_item_value = if_include_struct_item_value; diff --git a/src/app/zap-templates/partials/cluster-objects-struct.zapt b/src/app/zap-templates/partials/cluster-objects-struct.zapt new file mode 100644 index 00000000000000..8e502eb4f6e14e --- /dev/null +++ b/src/app/zap-templates/partials/cluster-objects-struct.zapt @@ -0,0 +1,77 @@ +{{#if header}} +namespace {{asUpperCamelCase name}} { + enum class Fields { + {{#zcl_struct_items}} + k{{asUpperCamelCase label}} = {{fieldIdentifier}}, + {{/zcl_struct_items}} + }; + + struct Type { + public: + {{#zcl_struct_items}} + {{zapTypeToEncodableClusterObjectType type}} {{asLowerCamelCase label}}; + {{/zcl_struct_items}} + + CHIP_ERROR Encode(TLV::TLVWriter &writer, TLV::Tag tag) const; + {{#unless struct_contains_array}} + CHIP_ERROR Decode(TLV::TLVReader &reader); + {{/unless}} + {{#if struct_is_fabric_scoped}} + bool MatchesFabricIndex(FabricIndex fabricIndex_) const { + return {{ asLowerCamelCase struct_fabric_idx_field }} == fabricIndex_; + } + {{/if}} + }; + + {{#if struct_contains_array}} + struct DecodableType { + public: + {{#zcl_struct_items}} + {{zapTypeToDecodableClusterObjectType type}} {{asLowerCamelCase label}}; + {{/zcl_struct_items}} + CHIP_ERROR Decode(TLV::TLVReader &reader); + }; + {{else}} + using DecodableType = Type; + {{/if}} + +} // namespace {{asUpperCamelCase name}} +{{else}} +namespace {{asUpperCamelCase name}} { +CHIP_ERROR Type::Encode(TLV::TLVWriter &writer, TLV::Tag tag) const{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + {{#zcl_struct_items}} + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::k{{asUpperCamelCase label}})), {{asLowerCamelCase label}})); + {{/zcl_struct_items}} + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader &reader) { + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + err = reader.EnterContainer(outer); + ReturnErrorOnFailure(err); + while ((err = reader.Next()) == CHIP_NO_ERROR) { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(reader.GetTag())) + { + {{#zcl_struct_items}} + case to_underlying(Fields::k{{asUpperCamelCase label}}): + ReturnErrorOnFailure(DataModel::Decode(reader, {{asLowerCamelCase label}})); + break; + {{/zcl_struct_items}} + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} + +} // namespace {{asUpperCamelCase name}} +{{/if}} \ No newline at end of file diff --git a/src/app/zap-templates/templates/app/cluster-objects-src.zapt b/src/app/zap-templates/templates/app/cluster-objects-src.zapt index c19740f8cf8ce1..0e61078026453d 100644 --- a/src/app/zap-templates/templates/app/cluster-objects-src.zapt +++ b/src/app/zap-templates/templates/app/cluster-objects-src.zapt @@ -5,49 +5,27 @@ namespace chip { namespace app { namespace Clusters { + +namespace detail { +// Structs shared across multiple clusters. +namespace Structs { +{{#zcl_structs}} +{{#if has_more_than_one_cluster}} +{{> cluster_objects_struct header=false}} +{{/if}} +{{/zcl_structs}} +} // namespace Structs +} // namespace detail + {{#zcl_clusters}} namespace {{asUpperCamelCase name}} { {{#zcl_structs}} {{#first}} namespace Structs { {{/first}} -namespace {{asType label}} { -CHIP_ERROR Type::Encode(TLV::TLVWriter &writer, TLV::Tag tag) const{ - TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - {{#zcl_struct_items}} - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::k{{asUpperCamelCase label}})), {{asLowerCamelCase label}})); - {{/zcl_struct_items}} - ReturnErrorOnFailure(writer.EndContainer(outer)); - return CHIP_NO_ERROR; -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader &reader) { - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVType outer; - VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); - err = reader.EnterContainer(outer); - ReturnErrorOnFailure(err); - while ((err = reader.Next()) == CHIP_NO_ERROR) { - VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); - switch (TLV::TagNumFromTag(reader.GetTag())) - { - {{#zcl_struct_items}} - case to_underlying(Fields::k{{asUpperCamelCase label}}): - ReturnErrorOnFailure(DataModel::Decode(reader, {{asLowerCamelCase label}})); - break; - {{/zcl_struct_items}} - default: - break; - } - } - - VerifyOrReturnError(err == CHIP_END_OF_TLV, err); - ReturnErrorOnFailure(reader.ExitContainer(outer)); - return CHIP_NO_ERROR; -} - -} // namespace {{asType label}} +{{#unless has_more_than_one_cluster}} +{{> cluster_objects_struct header=false}} +{{/unless}} {{#last}} } // namespace Structs {{/last}} diff --git a/src/app/zap-templates/templates/app/cluster-objects.zapt b/src/app/zap-templates/templates/app/cluster-objects.zapt index 32198df4eb324f..762649454499e3 100644 --- a/src/app/zap-templates/templates/app/cluster-objects.zapt +++ b/src/app/zap-templates/templates/app/cluster-objects.zapt @@ -20,6 +20,17 @@ namespace chip { namespace app { namespace Clusters { +namespace detail { +// Structs shared across multiple clusters. +namespace Structs { +{{#zcl_structs}} +{{#if has_more_than_one_cluster}} +{{> cluster_objects_struct header=true}} +{{/if}} +{{/zcl_structs}} +} // namespace Structs +} // namespace detail + {{#zcl_clusters}} namespace {{asUpperCamelCase name}} { {{#zcl_enums}} @@ -55,43 +66,11 @@ k{{asUpperCamelCase label}} = {{asHex mask}}, {{#first}} namespace Structs { {{/first}} -namespace {{asUpperCamelCase name}} { - enum class Fields { - {{#zcl_struct_items}} - k{{asUpperCamelCase label}} = {{fieldIdentifier}}, - {{/zcl_struct_items}} - }; - - struct Type { - public: - {{#zcl_struct_items}} - {{zapTypeToEncodableClusterObjectType type}} {{asLowerCamelCase label}}; - {{/zcl_struct_items}} - - CHIP_ERROR Encode(TLV::TLVWriter &writer, TLV::Tag tag) const; - {{#unless struct_contains_array}} - CHIP_ERROR Decode(TLV::TLVReader &reader); - {{/unless}} - {{#if struct_is_fabric_scoped}} - bool MatchesFabricIndex(FabricIndex fabricIndex_) const { - return {{ asLowerCamelCase struct_fabric_idx_field }} == fabricIndex_; - } - {{/if}} - }; - - {{#if struct_contains_array}} - struct DecodableType { - public: - {{#zcl_struct_items}} - {{zapTypeToDecodableClusterObjectType type}} {{asLowerCamelCase label}}; - {{/zcl_struct_items}} - CHIP_ERROR Decode(TLV::TLVReader &reader); - }; - {{else}} - using DecodableType = Type; - {{/if}} - -} // namespace {{asUpperCamelCase name}} +{{#if has_more_than_one_cluster}} +namespace {{asUpperCamelCase name}} = Clusters::detail::Structs::{{asUpperCamelCase name}}; +{{else}} +{{> cluster_objects_struct header=true}} +{{/if}} {{#last}} } // namespace Structs {{/last}} diff --git a/src/app/zap-templates/templates/app/helper.js b/src/app/zap-templates/templates/app/helper.js index b0cba01b38400e..0af4118c78b719 100644 --- a/src/app/zap-templates/templates/app/helper.js +++ b/src/app/zap-templates/templates/app/helper.js @@ -352,6 +352,16 @@ function asMEI(prefix, suffix) return cHelper.asHex((prefix << 16) + suffix, 8); } +// Not to be exported. +function nsValueToNamespace(ns) +{ + if (ns == "detail") { + return ns; + } + + return asUpperCamelCase(ns); +} + /* * @brief * @@ -372,7 +382,7 @@ async function zapTypeToClusterObjectType(type, isDecodable, options) let passByReference = false; async function fn(pkgId) { - const ns = options.hash.ns ? ('chip::app::Clusters::' + asUpperCamelCase(options.hash.ns) + '::') : ''; + const ns = options.hash.ns ? ('chip::app::Clusters::' + nsValueToNamespace(options.hash.ns) + '::') : ''; const typeChecker = async (method) => zclHelper[method](this.global.db, type, pkgId).then(zclType => zclType != 'unknown'); if (await typeChecker('isEnum')) { @@ -675,6 +685,11 @@ function incrementDepth(depth) return depth + 1; } +function hasProperty(obj, prop) +{ + return prop in obj; +} + // // Module exports // @@ -685,6 +700,7 @@ exports.chip_endpoint_cluster_list = chip_endpoint_cluster_list exports.asTypedLiteral = asTypedLiteral; exports.asLowerCamelCase = asLowerCamelCase; exports.asUpperCamelCase = asUpperCamelCase; +exports.hasProperty = hasProperty; exports.hasSpecificAttributes = hasSpecificAttributes; exports.asMEI = asMEI; exports.zapTypeToEncodableClusterObjectType = zapTypeToEncodableClusterObjectType; diff --git a/src/app/zap-templates/zcl/data-model/chip/fixed-label-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/fixed-label-cluster.xml index 62497c43e0231e..727da449590993 100644 --- a/src/app/zap-templates/zcl/data-model/chip/fixed-label-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/fixed-label-cluster.xml @@ -19,6 +19,7 @@ limitations under the License. + diff --git a/src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml index d54cdef16e1f5c..6a7c5a9e67578c 100644 --- a/src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml @@ -17,12 +17,6 @@ limitations under the License. - - - - - - General User Label diff --git a/src/app/zap_cluster_list.py b/src/app/zap_cluster_list.py index efea6547296770..212852d351d5b0 100755 --- a/src/app/zap_cluster_list.py +++ b/src/app/zap_cluster_list.py @@ -44,7 +44,7 @@ 'ILLUMINANCE_MEASUREMENT_CLUSTER': [], 'KEYPAD_INPUT_CLUSTER': ['keypad-input-server'], 'LEVEL_CONTROL_CLUSTER': ['level-control'], - 'LOCALIZATION_CONFIGURATION_CLUSTER': [], + 'LOCALIZATION_CONFIGURATION_CLUSTER': ['localization-configuration-server'], 'LOCALIZATION_TIME_FORMAT_CLUSTER': [], 'LOCALIZATION_UNIT_CLUSTER': [], 'LOW_POWER_CLUSTER': ['low-power-server'], @@ -59,7 +59,7 @@ 'OPERATIONAL_CREDENTIALS_CLUSTER': ['operational-credentials-server'], 'OTA_BOOTLOAD_CLUSTER': [], 'OTA_PROVIDER_CLUSTER': ['ota-provider'], - 'OTA_REQUESTOR_CLUSTER': [], + 'OTA_REQUESTOR_CLUSTER': ['ota-requestor'], 'POWER_SOURCE_CLUSTER': [], 'POWER_SOURCE_CONFIGURATION_CLUSTER': ['power-source-configuration-server'], 'POLL_CONTROL_CLUSTER': [], diff --git a/src/controller/CHIPCluster.h b/src/controller/CHIPCluster.h index ca02eedb9f4a8e..2e1f60ae700542 100644 --- a/src/controller/CHIPCluster.h +++ b/src/controller/CHIPCluster.h @@ -115,6 +115,7 @@ class DLL_EXPORT ClusterBase WriteResponseSuccessCallback successCb, WriteResponseFailureCallback failureCb, const Optional & aTimedWriteTimeoutMs, WriteResponseDoneCallback doneCb = nullptr) { + CHIP_ERROR err = CHIP_NO_ERROR; VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); auto onSuccessCb = [context, successCb](const app::ConcreteAttributePath & commandPath) { @@ -141,15 +142,17 @@ class DLL_EXPORT ClusterBase if (mGroupSession) { - return chip::Controller::WriteAttribute(mGroupSession.Get(), mEndpoint, clusterId, attributeId, requestData, - onSuccessCb, onFailureCb, aTimedWriteTimeoutMs, onDoneCb); + err = chip::Controller::WriteAttribute(mGroupSession.Get(), mEndpoint, clusterId, attributeId, requestData, + onSuccessCb, onFailureCb, aTimedWriteTimeoutMs, onDoneCb); + mDevice->GetExchangeManager()->GetSessionManager()->RemoveGroupSession(mGroupSession->AsGroupSession()); } else { - return chip::Controller::WriteAttribute(mDevice->GetSecureSession().Value(), mEndpoint, clusterId, - attributeId, requestData, onSuccessCb, onFailureCb, - aTimedWriteTimeoutMs, onDoneCb); + err = chip::Controller::WriteAttribute(mDevice->GetSecureSession().Value(), mEndpoint, clusterId, attributeId, + requestData, onSuccessCb, onFailureCb, aTimedWriteTimeoutMs, onDoneCb); } + + return err; } template diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 1cda177019ed19..f660a40bd73ee9 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -272,6 +272,7 @@ void DeviceController::OnFirstMessageDeliveryFailed(const SessionHandle & sessio { VerifyOrReturn(mState == State::Initialized, ChipLogError(Controller, "OnFirstMessageDeliveryFailed was called in incorrect state")); + VerifyOrReturn(session->GetSessionType() == Transport::Session::SessionType::kSecure); UpdateDevice(session->AsSecureSession()->GetPeerNodeId()); } @@ -855,7 +856,8 @@ CHIP_ERROR DeviceCommissioner::Commission(NodeId remoteDeviceId, CommissioningPa // TODO(cecille): Can we get rid of mDeviceBeingCommissioned and use the remote id instead? Would require storing the // commissioning stage in the device. CommissioneeDeviceProxy * device = mDeviceBeingCommissioned; - if (device->GetDeviceId() != remoteDeviceId || (!device->IsSecureConnected() && !device->IsSessionSetupInProgress())) + if (device == nullptr || device->GetDeviceId() != remoteDeviceId || + (!device->IsSecureConnected() && !device->IsSessionSetupInProgress())) { ChipLogError(Controller, "Invalid device for commissioning" ChipLogFormatX64, ChipLogValueX64(remoteDeviceId)); return CHIP_ERROR_INCORRECT_STATE; @@ -975,9 +977,7 @@ void DeviceCommissioner::OnSessionEstablished() // TODO: the session should know which peer we are trying to connect to when started pairing->SetPeerNodeId(mDeviceBeingCommissioned->GetDeviceId()); - CHIP_ERROR err = mSystemState->SessionMgr()->NewPairing( - mDeviceBeingCommissioned->GetSecureSessionHolder(), Optional::Value(pairing->GetPeerAddress()), - pairing->GetPeerNodeId(), pairing, CryptoContext::SessionRole::kInitiator, mFabricIndex); + CHIP_ERROR err = mDeviceBeingCommissioned->SetConnected(); if (err != CHIP_NO_ERROR) { ChipLogError(Controller, "Failed in setting up secure channel: err %s", ErrorStr(err)); diff --git a/src/controller/CommissioneeDeviceProxy.cpp b/src/controller/CommissioneeDeviceProxy.cpp index bebd673c3d2c22..74b0231e3a7401 100644 --- a/src/controller/CommissioneeDeviceProxy.cpp +++ b/src/controller/CommissioneeDeviceProxy.cpp @@ -132,6 +132,22 @@ CHIP_ERROR CommissioneeDeviceProxy::UpdateDeviceData(const Transport::PeerAddres return CHIP_NO_ERROR; } +CHIP_ERROR CommissioneeDeviceProxy::SetConnected() +{ + if (mState != ConnectionState::Connecting) + { + return CHIP_ERROR_INCORRECT_STATE; + } + mState = ConnectionState::SecureConnected; + bool _didLoad; + CHIP_ERROR err = LoadSecureSessionParametersIfNeeded(_didLoad); + if (err != CHIP_NO_ERROR) + { + mState = ConnectionState::NotConnected; + } + return err; +} + void CommissioneeDeviceProxy::Reset() { SetActive(false); diff --git a/src/controller/CommissioneeDeviceProxy.h b/src/controller/CommissioneeDeviceProxy.h index 200e5913b6e11e..fa36aaf24b6f58 100644 --- a/src/controller/CommissioneeDeviceProxy.h +++ b/src/controller/CommissioneeDeviceProxy.h @@ -196,6 +196,14 @@ class CommissioneeDeviceProxy : public DeviceProxy, public SessionReleaseDelegat void SetActive(bool active) { mActive = active; } + /** + * @brief + * Called to indicate this proxy has been paired successfully. + * + * This causes the secure session parameters to be loaded and stores the session details in the session manager. + */ + CHIP_ERROR SetConnected(); + bool IsSecureConnected() const override { return IsActive() && mState == ConnectionState::SecureConnected; } bool IsSessionSetupInProgress() const { return IsActive() && mState == ConnectionState::Connecting; } diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 4b93e00304b3b4..127fac0778ba39 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -2489,6 +2489,57 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Power Source Configuration", "code": 46, @@ -12619,9 +12670,32 @@ "source": "client", "incoming": 0, "outgoing": 1 + }, + { + "name": "TestEmitTestEventRequest", + "code": 20, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 } ], "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -12702,6 +12776,14 @@ "source": "server", "incoming": 1, "outgoing": 0 + }, + { + "name": "TestEmitTestEventResponse", + "code": 10, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 } ], "attributes": [ diff --git a/src/controller/java/AndroidDeviceControllerWrapper.cpp b/src/controller/java/AndroidDeviceControllerWrapper.cpp index 6478bc2a0bece8..abc783119beced 100644 --- a/src/controller/java/AndroidDeviceControllerWrapper.cpp +++ b/src/controller/java/AndroidDeviceControllerWrapper.cpp @@ -330,12 +330,12 @@ CHIP_ERROR AndroidDeviceControllerWrapper::ApplyNetworkCredentials(chip::Control else if (threadCredentialsJava != nullptr) { jmethodID getOperationalDataset; - err = chip::JniReferences::GetInstance().FindMethod(env, wifiCredentialsJava, "getOperationalDataset", "()[B", + err = chip::JniReferences::GetInstance().FindMethod(env, threadCredentialsJava, "getOperationalDataset", "()[B", &getOperationalDataset); VerifyOrReturnError(err == CHIP_NO_ERROR, err); operationalDatasetBytes = static_cast(env->NewGlobalRef(env->CallObjectMethod(threadCredentialsJava, getOperationalDataset))); - VerifyOrReturnError(ssidStr != nullptr && !env->ExceptionCheck(), CHIP_JNI_ERROR_EXCEPTION_THROWN); + VerifyOrReturnError(operationalDatasetBytes != nullptr && !env->ExceptionCheck(), CHIP_JNI_ERROR_EXCEPTION_THROWN); operationalDataset = env->GetByteArrayElements(operationalDatasetBytes, nullptr); jsize length = env->GetArrayLength(operationalDatasetBytes); diff --git a/src/controller/java/CHIPDeviceController-JNI.cpp b/src/controller/java/CHIPDeviceController-JNI.cpp index cbb592bdde4d6e..f80a21896e327d 100644 --- a/src/controller/java/CHIPDeviceController-JNI.cpp +++ b/src/controller/java/CHIPDeviceController-JNI.cpp @@ -177,6 +177,33 @@ JNI_METHOD(jlong, newDeviceController)(JNIEnv * env, jobject self) return result; } +JNI_METHOD(void, commissionDevice) +(JNIEnv * env, jobject self, jlong handle, jlong deviceId, jbyteArray csrNonce, jobject networkCredentials) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + AndroidDeviceControllerWrapper * wrapper = AndroidDeviceControllerWrapper::FromJNIHandle(handle); + + ChipLogProgress(Controller, "commissionDevice() called"); + + CommissioningParameters commissioningParams = CommissioningParameters(); + err = wrapper->ApplyNetworkCredentials(commissioningParams, networkCredentials); + VerifyOrExit(err == CHIP_NO_ERROR, err = CHIP_ERROR_INVALID_ARGUMENT); + + if (csrNonce != nullptr) + { + JniByteArray jniCsrNonce(env, csrNonce); + commissioningParams.SetCSRNonce(jniCsrNonce.byteSpan()); + } + err = wrapper->Controller()->Commission(deviceId, commissioningParams); +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(Controller, "Failed to commission the device."); + JniReferences::GetInstance().ThrowError(env, sChipDeviceControllerExceptionCls, err); + } +} + JNI_METHOD(void, pairDevice) (JNIEnv * env, jobject self, jlong handle, jlong deviceId, jint connObj, jlong pinCode, jbyteArray csrNonce, jobject networkCredentials) @@ -268,6 +295,31 @@ JNI_METHOD(void, establishPaseConnection)(JNIEnv * env, jobject self, jlong hand } } +JNI_METHOD(void, establishPaseConnectionByAddress) +(JNIEnv * env, jobject self, jlong handle, jlong deviceId, jstring address, jint port, jlong pinCode) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + AndroidDeviceControllerWrapper * wrapper = AndroidDeviceControllerWrapper::FromJNIHandle(handle); + + Inet::IPAddress addr; + JniUtfString addrJniString(env, address); + VerifyOrReturn(Inet::IPAddress::FromString(addrJniString.c_str(), addr), + ChipLogError(Controller, "Failed to parse IP address."), + JniReferences::GetInstance().ThrowError(env, sChipDeviceControllerExceptionCls, CHIP_ERROR_INVALID_ARGUMENT)); + + RendezvousParameters rendezvousParams = + RendezvousParameters().SetSetupPINCode(pinCode).SetPeerAddress(Transport::PeerAddress::UDP(addr, port)); + + err = wrapper->Controller()->EstablishPASEConnection(deviceId, rendezvousParams); + + if (err != CHIP_NO_ERROR) + { + ChipLogError(Controller, "Failed to establish PASE connection."); + JniReferences::GetInstance().ThrowError(env, sChipDeviceControllerExceptionCls, err); + } +} + JNI_METHOD(void, unpairDevice)(JNIEnv * env, jobject self, jlong handle, jlong deviceId) { chip::DeviceLayer::StackLock lock; diff --git a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java index 82cb82fd31126f..477e47058bf5ac 100644 --- a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java +++ b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java @@ -120,6 +120,45 @@ public void establishPaseConnection(long deviceId, int connId, long setupPincode } } + /** + * Establish a secure PASE connection to the given device via IP address. + * + * @param deviceId the ID of the node to connect to + * @param address the IP address at which the node is located + * @param port the port at which the node is located + * @param setupPincode the pincode for this node + */ + public void establishPaseConnection(long deviceId, String address, int port, long setupPincode) { + Log.d(TAG, "Establishing PASE connection with ID: " + deviceId); + establishPaseConnectionByAddress(deviceControllerPtr, deviceId, address, port, setupPincode); + } + + /** + * Initiates the automatic commissioning flow using the specified network credentials. It is + * expected that a secure session has already been established via {@link + * #establishPaseConnection(long, int, long)}. + * + * @param deviceId the ID of the node to be commissioned + * @param networkCredentials the credentials (Wi-Fi or Thread) to be provisioned + */ + public void commissionDevice(long deviceId, NetworkCredentials networkCredentials) { + commissionDevice(deviceControllerPtr, deviceId, /* csrNonce= */ null, networkCredentials); + } + + /** + * Initiates the automatic commissioning flow using the specified network credentials. It is + * expected that a secure session has already been established via {@link + * #establishPaseConnection(long, int, long)}. + * + * @param deviceId the ID of the node to be commissioned + * @param csrNonce a nonce to be used for the CSR request + * @param networkCredentials the credentials (Wi-Fi or Thread) to be provisioned + */ + public void commissionDevice( + long deviceId, @Nullable byte[] csrNonce, NetworkCredentials networkCredentials) { + commissionDevice(deviceControllerPtr, deviceId, csrNonce, networkCredentials); + } + public void unpairDevice(long deviceId) { unpairDevice(deviceControllerPtr, deviceId); } @@ -285,6 +324,15 @@ private native void pairDeviceWithAddress( private native void establishPaseConnection( long deviceControllerPtr, long deviceId, int connId, long setupPincode); + private native void establishPaseConnectionByAddress( + long deviceControllerPtr, long deviceId, String address, int port, long setupPincode); + + private native void commissionDevice( + long deviceControllerPtr, + long deviceId, + @Nullable byte[] csrNonce, + NetworkCredentials networkCredentials); + private native void unpairDevice(long deviceControllerPtr, long deviceId); private native long getDeviceBeingCommissionedPointer(long deviceControllerPtr, long nodeId); diff --git a/src/controller/java/templates/CHIPClusters-JNI.zapt b/src/controller/java/templates/CHIPClusters-JNI.zapt index ef79115b3c2e99..7ae507f0d7e56a 100644 --- a/src/controller/java/templates/CHIPClusters-JNI.zapt +++ b/src/controller/java/templates/CHIPClusters-JNI.zapt @@ -44,7 +44,7 @@ JNI_METHOD(jlong, {{asUpperCamelCase name}}Cluster, initWithDevice)(JNIEnv * env } {{#chip_cluster_commands}} -JNI_METHOD(void, {{asUpperCamelCase ../name}}Cluster, {{asLowerCamelCase name}})(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback{{#chip_cluster_command_arguments_with_structs_expanded}}, {{asJniBasicType type true}} {{asLowerCamelCase label}}{{/chip_cluster_command_arguments_with_structs_expanded}}) +JNI_METHOD(void, {{asUpperCamelCase ../name}}Cluster, {{asLowerCamelCase name}})(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback{{#chip_cluster_command_arguments_with_structs_expanded}}, {{asJniBasicType type true}} {{asLowerCamelCase label}}{{/chip_cluster_command_arguments_with_structs_expanded}}, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -70,12 +70,15 @@ JNI_METHOD(void, {{asUpperCamelCase ../name}}Cluster, {{asLowerCamelCase name}}) auto successFn = chip::Callback::CallbackcallbackName}}CallbackType>::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall {{#if mustUseTimedInvoke}} - {{!TODO Fix Java API to pass in this information. For now, 10 seconds.}} - , 10000 + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + {{else}} + if (timedInvokeTimeoutMs == nullptr) { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } else { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } {{/if}} - ); VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); @@ -88,7 +91,7 @@ JNI_METHOD(void, {{asUpperCamelCase ../name}}Cluster, {{asLowerCamelCase name}}) {{! TODO: Lists not supported in attribute writes yet. }} {{#unless isList}} -JNI_METHOD(void, {{asUpperCamelCase ../name}}Cluster, write{{asUpperCamelCase name}}Attribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, {{asJniBasicType type true}} value) +JNI_METHOD(void, {{asUpperCamelCase ../name}}Cluster, write{{asUpperCamelCase name}}Attribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, {{asJniBasicType type true}} value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::{{asUpperCamelCase parent.name}}::Attributes::{{asUpperCamelCase name}}::TypeInfo; @@ -108,12 +111,16 @@ JNI_METHOD(void, {{asUpperCamelCase ../name}}Cluster, write{{asUpperCamelCase na 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 + {{#if mustUseTimedWrite}} - {{!TODO Fix Java API to pass in this information. For now, 10 seconds.}} - , 10000 + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + {{else}} + if (timedWriteTimeoutMs == nullptr) { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } else { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } {{/if}} - ); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); onSuccess.release(); diff --git a/src/controller/java/templates/ChipClusters-java.zapt b/src/controller/java/templates/ChipClusters-java.zapt index 7d330d4eb30e70..37ae51f5e88ad3 100644 --- a/src/controller/java/templates/ChipClusters-java.zapt +++ b/src/controller/java/templates/ChipClusters-java.zapt @@ -83,27 +83,32 @@ public class ChipClusters { {{#chip_client_clusters}} public static class {{asUpperCamelCase name}}Cluster extends BaseChipCluster { + public static final long CLUSTER_ID = {{code}}L; + public {{asUpperCamelCase name}}Cluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("{{code}}"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); {{#chip_cluster_commands}} + {{#unless mustUseTimedInvoke}} public void {{asLowerCamelCase name}}({{#if hasSpecificResponse}}{{asUpperCamelCase responseName}}Callback{{else}}DefaultClusterCallback{{/if}} callback {{#chip_cluster_command_arguments_with_structs_expanded}}{{#if_is_struct type}}{{else}}{{>java_type_for_argument}} {{asLowerCamelCase label}}{{/if_is_struct}}{{/chip_cluster_command_arguments_with_structs_expanded}}) { - {{asLowerCamelCase name}}(chipClusterPtr, callback{{#chip_cluster_command_arguments_with_structs_expanded}}{{#if_is_struct type}}{{else}}, {{asLowerCamelCase label}}{{/if_is_struct}}{{/chip_cluster_command_arguments_with_structs_expanded}}); + {{asLowerCamelCase name}}(chipClusterPtr, callback{{#chip_cluster_command_arguments_with_structs_expanded}}{{#if_is_struct type}}{{else}}, {{asLowerCamelCase label}}{{/if_is_struct}}{{/chip_cluster_command_arguments_with_structs_expanded}}, null); } + {{/unless}} + public void {{asLowerCamelCase name}}({{#if hasSpecificResponse}}{{asUpperCamelCase responseName}}Callback{{else}}DefaultClusterCallback{{/if}} callback + {{#chip_cluster_command_arguments_with_structs_expanded}}{{#if_is_struct type}}{{else}}{{>java_type_for_argument}} {{asLowerCamelCase label}}{{/if_is_struct}}{{/chip_cluster_command_arguments_with_structs_expanded}}, int timedInvokeTimeoutMs) { + {{asLowerCamelCase name}}(chipClusterPtr, callback{{#chip_cluster_command_arguments_with_structs_expanded}}{{#if_is_struct type}}{{else}}, {{asLowerCamelCase label}}{{/if_is_struct}}{{/chip_cluster_command_arguments_with_structs_expanded}}, timedInvokeTimeoutMs); + } {{/chip_cluster_commands}} {{#chip_cluster_commands}} private native void {{asLowerCamelCase name}}(long chipClusterPtr, {{#if hasSpecificResponse}}{{asUpperCamelCase responseName}}Callback{{else}}DefaultClusterCallback{{/if}} Callback - {{#chip_cluster_command_arguments_with_structs_expanded}}{{#if_is_struct type}}{{else}}{{>java_type_for_argument}} {{asLowerCamelCase label}}{{/if_is_struct}}{{/chip_cluster_command_arguments_with_structs_expanded}}); + {{#chip_cluster_command_arguments_with_structs_expanded}}{{#if_is_struct type}}{{else}}{{>java_type_for_argument}} {{asLowerCamelCase label}}{{/if_is_struct}}{{/chip_cluster_command_arguments_with_structs_expanded}} + , @Nullable Integer timedInvokeTimeoutMs); {{/chip_cluster_commands}} {{#chip_cluster_responses}} public interface {{asUpperCamelCase name}}Callback { @@ -242,9 +247,14 @@ public class ChipClusters { {{#if isWritableAttribute}} {{! TODO: Lists not supported in attribute writes yet. }} {{#unless isList}} - + {{#unless mustUseTimedWrite}} public void write{{asUpperCamelCase name}}Attribute(DefaultClusterCallback callback{{>java_type_for_argument}} value) { - write{{asUpperCamelCase name}}Attribute(chipClusterPtr, callback, value); + write{{asUpperCamelCase name}}Attribute(chipClusterPtr, callback, value, null); + } + {{/unless}} + + public void write{{asUpperCamelCase name}}Attribute(DefaultClusterCallback callback{{>java_type_for_argument}} value, int timedWriteTimeoutMs) { + write{{asUpperCamelCase name}}Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } {{/unless}} {{/if}} @@ -278,7 +288,7 @@ public class ChipClusters { {{! TODO: Lists not supported in attribute writes yet. }} {{#unless isList}} - private native void write{{asUpperCamelCase name}}Attribute(long chipClusterPtr, DefaultClusterCallback callback{{>java_type_for_argument}} value); + private native void write{{asUpperCamelCase name}}Attribute(long chipClusterPtr, DefaultClusterCallback callback{{>java_type_for_argument}} value, @Nullable Integer timedWriteTimeoutMs); {{/unless}} {{/if}} {{#if isReportableAttribute}} diff --git a/src/controller/java/templates/ClusterInfo-java.zapt b/src/controller/java/templates/ClusterInfo-java.zapt index f2b5a8e1590e49..2951811eac7c0c 100644 --- a/src/controller/java/templates/ClusterInfo-java.zapt +++ b/src/controller/java/templates/ClusterInfo-java.zapt @@ -336,6 +336,8 @@ public class ClusterInfoMapping { commandArguments.get("{{asLowerCamelCase label}}") {{/if_is_struct}} {{/chip_cluster_command_arguments_with_structs_expanded}} + {{! TODO: Allow timeout to be passed from client for this and timed write. }} + {{#if mustUseTimedInvoke}}, 10000{{/if}} ); }, () -> new Delegated{{asUpperCamelCase responseName}}Callback(), @@ -350,6 +352,7 @@ public class ClusterInfoMapping { ({{#if isOptional}}Optional<{{/if}}{{asJavaBoxedType type}}{{#if isOptional}}>{{/if}}) commandArguments.get("{{asLowerCamelCase label}}") {{/chip_cluster_command_arguments_with_structs_expanded}} + {{#if mustUseTimedInvoke}}, 10000{{/if}} ); }, () -> new DelegatedDefaultClusterCallback(), diff --git a/src/controller/java/templates/ClusterInfo-write-interaction.zapt b/src/controller/java/templates/ClusterInfo-write-interaction.zapt index 96907cae0a7381..7cf4b5e4162033 100644 --- a/src/controller/java/templates/ClusterInfo-write-interaction.zapt +++ b/src/controller/java/templates/ClusterInfo-write-interaction.zapt @@ -29,6 +29,7 @@ public class ClusterWriteMapping { (DefaultClusterCallback) callback, ({{asJavaBoxedType type}}) commandArguments.get("value") + {{#if mustUseTimedWrite}}, 10000{{/if}} ); }, () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), diff --git a/src/controller/java/zap-generated/CHIPCallbackTypes.h b/src/controller/java/zap-generated/CHIPCallbackTypes.h index 3fc0d5c6385238..810ae078cd27c8 100644 --- a/src/controller/java/zap-generated/CHIPCallbackTypes.h +++ b/src/controller/java/zap-generated/CHIPCallbackTypes.h @@ -584,6 +584,11 @@ typedef void (*CHIPLevelControlClusterAttributeListAttributeCallbackType)( typedef void (*CHIPLevelControlClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::LevelControl::Attributes::ClusterRevision::TypeInfo::DecodableArgType); +typedef void (*CHIPLocalizationConfigurationClusterActiveLocaleAttributeCallbackType)( + void *, chip::app::Clusters::LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo::DecodableArgType); +typedef void (*CHIPLocalizationConfigurationClusterSupportedLocalesAttributeCallbackType)( + void *, const chip::app::Clusters::LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo::DecodableType &); + typedef void (*CHIPLowPowerClusterAttributeListAttributeCallbackType)( void *, const chip::app::Clusters::LowPower::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPLowPowerClusterClusterRevisionAttributeCallbackType)( @@ -936,6 +941,8 @@ typedef void (*CHIPTestClusterClusterSimpleStructResponseCallbackType)( void *, const chip::app::Clusters::TestCluster::Commands::SimpleStructResponse::DecodableType &); typedef void (*CHIPTestClusterClusterTestAddArgumentsResponseCallbackType)( void *, const chip::app::Clusters::TestCluster::Commands::TestAddArgumentsResponse::DecodableType &); +typedef void (*CHIPTestClusterClusterTestEmitTestEventResponseCallbackType)( + void *, const chip::app::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType &); typedef void (*CHIPTestClusterClusterTestEnumsResponseCallbackType)( void *, const chip::app::Clusters::TestCluster::Commands::TestEnumsResponse::DecodableType &); typedef void (*CHIPTestClusterClusterTestListInt8UReverseResponseCallbackType)( diff --git a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp index a682dd33846d9b..3dc9e361960549 100644 --- a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp @@ -69,7 +69,7 @@ JNI_METHOD(jlong, AccountLoginCluster, initWithDevice)(JNIEnv * env, jobject sel } JNI_METHOD(void, AccountLoginCluster, getSetupPINRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring tempAccountIdentifier) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring tempAccountIdentifier, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -101,7 +101,8 @@ JNI_METHOD(void, AccountLoginCluster, getSetupPINRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, 10000); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -110,7 +111,8 @@ JNI_METHOD(void, AccountLoginCluster, getSetupPINRequest) onFailure.release(); } JNI_METHOD(void, AccountLoginCluster, loginRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring tempAccountIdentifier, jstring setupPIN) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring tempAccountIdentifier, jstring setupPIN, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -140,7 +142,15 @@ JNI_METHOD(void, AccountLoginCluster, loginRequest) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -148,7 +158,8 @@ JNI_METHOD(void, AccountLoginCluster, loginRequest) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, AccountLoginCluster, logoutRequest)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, AccountLoginCluster, logoutRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -175,7 +186,8 @@ JNI_METHOD(void, AccountLoginCluster, logoutRequest)(JNIEnv * env, jobject self, auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, 10000); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -230,7 +242,7 @@ JNI_METHOD(jlong, AdministratorCommissioningCluster, initWithDevice)(JNIEnv * en } JNI_METHOD(void, AdministratorCommissioningCluster, openBasicCommissioningWindow) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject commissioningTimeout) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject commissioningTimeout, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -260,7 +272,15 @@ JNI_METHOD(void, AdministratorCommissioningCluster, openBasicCommissioningWindow auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -270,7 +290,7 @@ JNI_METHOD(void, AdministratorCommissioningCluster, openBasicCommissioningWindow } JNI_METHOD(void, AdministratorCommissioningCluster, openCommissioningWindow) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject commissioningTimeout, jbyteArray PAKEVerifier, - jobject discriminator, jobject iterations, jbyteArray salt, jobject passcodeID) + jobject discriminator, jobject iterations, jbyteArray salt, jobject passcodeID, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -307,7 +327,15 @@ JNI_METHOD(void, AdministratorCommissioningCluster, openCommissioningWindow) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -316,7 +344,7 @@ JNI_METHOD(void, AdministratorCommissioningCluster, openCommissioningWindow) onFailure.release(); } JNI_METHOD(void, AdministratorCommissioningCluster, revokeCommissioning) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -343,7 +371,15 @@ JNI_METHOD(void, AdministratorCommissioningCluster, revokeCommissioning) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -667,7 +703,8 @@ JNI_METHOD(jlong, ApplicationLauncherCluster, initWithDevice)(JNIEnv * env, jobj } JNI_METHOD(void, ApplicationLauncherCluster, hideAppRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject catalogVendorId, jstring applicationId) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject catalogVendorId, jstring applicationId, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -699,7 +736,15 @@ JNI_METHOD(void, ApplicationLauncherCluster, hideAppRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -708,7 +753,8 @@ JNI_METHOD(void, ApplicationLauncherCluster, hideAppRequest) onFailure.release(); } JNI_METHOD(void, ApplicationLauncherCluster, launchAppRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring data, jobject catalogVendorId, jstring applicationId) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring data, jobject catalogVendorId, jstring applicationId, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -741,7 +787,15 @@ JNI_METHOD(void, ApplicationLauncherCluster, launchAppRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -750,7 +804,8 @@ JNI_METHOD(void, ApplicationLauncherCluster, launchAppRequest) onFailure.release(); } JNI_METHOD(void, ApplicationLauncherCluster, stopAppRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject catalogVendorId, jstring applicationId) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject catalogVendorId, jstring applicationId, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -782,7 +837,15 @@ JNI_METHOD(void, ApplicationLauncherCluster, stopAppRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -837,7 +900,7 @@ JNI_METHOD(jlong, AudioOutputCluster, initWithDevice)(JNIEnv * env, jobject self } JNI_METHOD(void, AudioOutputCluster, renameOutputRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject index, jstring name) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject index, jstring name, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -867,7 +930,15 @@ JNI_METHOD(void, AudioOutputCluster, renameOutputRequest) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -876,7 +947,7 @@ JNI_METHOD(void, AudioOutputCluster, renameOutputRequest) onFailure.release(); } JNI_METHOD(void, AudioOutputCluster, selectOutputRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject index) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject index, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -905,7 +976,15 @@ JNI_METHOD(void, AudioOutputCluster, selectOutputRequest) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -997,7 +1076,7 @@ JNI_METHOD(jlong, BarrierControlCluster, initWithDevice)(JNIEnv * env, jobject s } JNI_METHOD(void, BarrierControlCluster, barrierControlGoToPercent) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject percentOpen) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject percentOpen, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1027,7 +1106,15 @@ JNI_METHOD(void, BarrierControlCluster, barrierControlGoToPercent) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -1035,7 +1122,8 @@ JNI_METHOD(void, BarrierControlCluster, barrierControlGoToPercent) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, BarrierControlCluster, barrierControlStop)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, BarrierControlCluster, barrierControlStop) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1062,7 +1150,15 @@ JNI_METHOD(void, BarrierControlCluster, barrierControlStop)(JNIEnv * env, jobjec auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -1264,7 +1360,8 @@ JNI_METHOD(jlong, BasicCluster, initWithDevice)(JNIEnv * env, jobject self, jlon return reinterpret_cast(cppCluster); } -JNI_METHOD(void, BasicCluster, mfgSpecificPing)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, BasicCluster, mfgSpecificPing) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1291,7 +1388,15 @@ JNI_METHOD(void, BasicCluster, mfgSpecificPing)(JNIEnv * env, jobject self, jlon auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -1484,7 +1589,7 @@ JNI_METHOD(void, BasicCluster, subscribeProductIDAttribute) } JNI_METHOD(void, BasicCluster, writeNodeLabelAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::Basic::Attributes::NodeLabel::TypeInfo; @@ -1512,7 +1617,16 @@ JNI_METHOD(void, BasicCluster, writeNodeLabelAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -1558,7 +1672,7 @@ JNI_METHOD(void, BasicCluster, subscribeNodeLabelAttribute) } JNI_METHOD(void, BasicCluster, writeLocationAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::Basic::Attributes::Location::TypeInfo; @@ -1586,7 +1700,16 @@ JNI_METHOD(void, BasicCluster, writeLocationAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -1963,7 +2086,7 @@ JNI_METHOD(void, BasicCluster, subscribeSerialNumberAttribute) } JNI_METHOD(void, BasicCluster, writeLocalConfigDisabledAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::Basic::Attributes::LocalConfigDisabled::TypeInfo; @@ -1991,7 +2114,16 @@ JNI_METHOD(void, BasicCluster, writeLocalConfigDisabledAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -2119,7 +2251,7 @@ JNI_METHOD(jlong, BinaryInputBasicCluster, initWithDevice)(JNIEnv * env, jobject } JNI_METHOD(void, BinaryInputBasicCluster, writeOutOfServiceAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::BinaryInputBasic::Attributes::OutOfService::TypeInfo; @@ -2147,7 +2279,16 @@ JNI_METHOD(void, BinaryInputBasicCluster, writeOutOfServiceAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -2194,7 +2335,7 @@ JNI_METHOD(void, BinaryInputBasicCluster, subscribeOutOfServiceAttribute) } JNI_METHOD(void, BinaryInputBasicCluster, writePresentValueAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::BinaryInputBasic::Attributes::PresentValue::TypeInfo; @@ -2222,7 +2363,16 @@ JNI_METHOD(void, BinaryInputBasicCluster, writePresentValueAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -2352,7 +2502,7 @@ JNI_METHOD(jlong, BindingCluster, initWithDevice)(JNIEnv * env, jobject self, jl JNI_METHOD(void, BindingCluster, bind) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject nodeId, jobject groupId, jobject endpointId, - jobject clusterId) + jobject clusterId, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2385,7 +2535,15 @@ JNI_METHOD(void, BindingCluster, bind) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -2395,7 +2553,7 @@ JNI_METHOD(void, BindingCluster, bind) } JNI_METHOD(void, BindingCluster, unbind) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject nodeId, jobject groupId, jobject endpointId, - jobject clusterId) + jobject clusterId, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2428,7 +2586,15 @@ JNI_METHOD(void, BindingCluster, unbind) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -2566,7 +2732,7 @@ JNI_METHOD(jlong, BridgedActionsCluster, initWithDevice)(JNIEnv * env, jobject s } JNI_METHOD(void, BridgedActionsCluster, disableAction) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2598,7 +2764,15 @@ JNI_METHOD(void, BridgedActionsCluster, disableAction) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -2607,7 +2781,8 @@ JNI_METHOD(void, BridgedActionsCluster, disableAction) onFailure.release(); } JNI_METHOD(void, BridgedActionsCluster, disableActionWithDuration) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject duration) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject duration, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2640,7 +2815,15 @@ JNI_METHOD(void, BridgedActionsCluster, disableActionWithDuration) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -2649,7 +2832,7 @@ JNI_METHOD(void, BridgedActionsCluster, disableActionWithDuration) onFailure.release(); } JNI_METHOD(void, BridgedActionsCluster, enableAction) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2681,7 +2864,15 @@ JNI_METHOD(void, BridgedActionsCluster, enableAction) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -2690,7 +2881,8 @@ JNI_METHOD(void, BridgedActionsCluster, enableAction) onFailure.release(); } JNI_METHOD(void, BridgedActionsCluster, enableActionWithDuration) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject duration) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject duration, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2723,7 +2915,15 @@ JNI_METHOD(void, BridgedActionsCluster, enableActionWithDuration) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -2732,7 +2932,7 @@ JNI_METHOD(void, BridgedActionsCluster, enableActionWithDuration) onFailure.release(); } JNI_METHOD(void, BridgedActionsCluster, instantAction) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2764,7 +2964,15 @@ JNI_METHOD(void, BridgedActionsCluster, instantAction) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -2773,7 +2981,8 @@ JNI_METHOD(void, BridgedActionsCluster, instantAction) onFailure.release(); } JNI_METHOD(void, BridgedActionsCluster, instantActionWithTransition) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject transitionTime) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject transitionTime, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2807,7 +3016,15 @@ JNI_METHOD(void, BridgedActionsCluster, instantActionWithTransition) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -2816,7 +3033,7 @@ JNI_METHOD(void, BridgedActionsCluster, instantActionWithTransition) onFailure.release(); } JNI_METHOD(void, BridgedActionsCluster, pauseAction) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2848,7 +3065,15 @@ JNI_METHOD(void, BridgedActionsCluster, pauseAction) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -2857,7 +3082,8 @@ JNI_METHOD(void, BridgedActionsCluster, pauseAction) onFailure.release(); } JNI_METHOD(void, BridgedActionsCluster, pauseActionWithDuration) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject duration) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject duration, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2890,7 +3116,15 @@ JNI_METHOD(void, BridgedActionsCluster, pauseActionWithDuration) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -2899,7 +3133,7 @@ JNI_METHOD(void, BridgedActionsCluster, pauseActionWithDuration) onFailure.release(); } JNI_METHOD(void, BridgedActionsCluster, resumeAction) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2931,7 +3165,15 @@ JNI_METHOD(void, BridgedActionsCluster, resumeAction) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -2940,7 +3182,7 @@ JNI_METHOD(void, BridgedActionsCluster, resumeAction) onFailure.release(); } JNI_METHOD(void, BridgedActionsCluster, startAction) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2972,7 +3214,15 @@ JNI_METHOD(void, BridgedActionsCluster, startAction) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -2981,7 +3231,8 @@ JNI_METHOD(void, BridgedActionsCluster, startAction) onFailure.release(); } JNI_METHOD(void, BridgedActionsCluster, startActionWithDuration) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject duration) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject duration, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3014,7 +3265,15 @@ JNI_METHOD(void, BridgedActionsCluster, startActionWithDuration) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3023,7 +3282,7 @@ JNI_METHOD(void, BridgedActionsCluster, startActionWithDuration) onFailure.release(); } JNI_METHOD(void, BridgedActionsCluster, stopAction) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3055,7 +3314,15 @@ JNI_METHOD(void, BridgedActionsCluster, stopAction) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3193,7 +3460,8 @@ JNI_METHOD(jlong, ChannelCluster, initWithDevice)(JNIEnv * env, jobject self, jl } JNI_METHOD(void, ChannelCluster, changeChannelByNumberRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject majorNumber, jobject minorNumber) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject majorNumber, jobject minorNumber, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3225,7 +3493,15 @@ JNI_METHOD(void, ChannelCluster, changeChannelByNumberRequest) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3234,7 +3510,7 @@ JNI_METHOD(void, ChannelCluster, changeChannelByNumberRequest) onFailure.release(); } JNI_METHOD(void, ChannelCluster, changeChannelRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring match) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring match, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3265,7 +3541,15 @@ JNI_METHOD(void, ChannelCluster, changeChannelRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3273,7 +3557,8 @@ JNI_METHOD(void, ChannelCluster, changeChannelRequest) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ChannelCluster, skipChannelRequest)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject count) +JNI_METHOD(void, ChannelCluster, skipChannelRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject count, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3302,7 +3587,15 @@ JNI_METHOD(void, ChannelCluster, skipChannelRequest)(JNIEnv * env, jobject self, auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3358,7 +3651,7 @@ JNI_METHOD(jlong, ColorControlCluster, initWithDevice)(JNIEnv * env, jobject sel JNI_METHOD(void, ColorControlCluster, colorLoopSet) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject updateFlags, jobject action, jobject direction, - jobject time, jobject startHue, jobject optionsMask, jobject optionsOverride) + jobject time, jobject startHue, jobject optionsMask, jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3396,7 +3689,15 @@ JNI_METHOD(void, ColorControlCluster, colorLoopSet) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3406,7 +3707,7 @@ JNI_METHOD(void, ColorControlCluster, colorLoopSet) } JNI_METHOD(void, ColorControlCluster, enhancedMoveHue) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject moveMode, jobject rate, jobject optionsMask, - jobject optionsOverride) + jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3440,7 +3741,15 @@ JNI_METHOD(void, ColorControlCluster, enhancedMoveHue) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3450,7 +3759,7 @@ JNI_METHOD(void, ColorControlCluster, enhancedMoveHue) } JNI_METHOD(void, ColorControlCluster, enhancedMoveToHue) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject enhancedHue, jobject direction, jobject transitionTime, - jobject optionsMask, jobject optionsOverride) + jobject optionsMask, jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3487,7 +3796,15 @@ JNI_METHOD(void, ColorControlCluster, enhancedMoveToHue) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3497,7 +3814,7 @@ JNI_METHOD(void, ColorControlCluster, enhancedMoveToHue) } JNI_METHOD(void, ColorControlCluster, enhancedMoveToHueAndSaturation) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject enhancedHue, jobject saturation, jobject transitionTime, - jobject optionsMask, jobject optionsOverride) + jobject optionsMask, jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3535,7 +3852,15 @@ JNI_METHOD(void, ColorControlCluster, enhancedMoveToHueAndSaturation) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3545,7 +3870,7 @@ JNI_METHOD(void, ColorControlCluster, enhancedMoveToHueAndSaturation) } JNI_METHOD(void, ColorControlCluster, enhancedStepHue) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject stepMode, jobject stepSize, jobject transitionTime, - jobject optionsMask, jobject optionsOverride) + jobject optionsMask, jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3581,7 +3906,15 @@ JNI_METHOD(void, ColorControlCluster, enhancedStepHue) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3591,7 +3924,7 @@ JNI_METHOD(void, ColorControlCluster, enhancedStepHue) } JNI_METHOD(void, ColorControlCluster, moveColor) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject rateX, jobject rateY, jobject optionsMask, - jobject optionsOverride) + jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3625,7 +3958,15 @@ JNI_METHOD(void, ColorControlCluster, moveColor) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3635,7 +3976,7 @@ JNI_METHOD(void, ColorControlCluster, moveColor) } JNI_METHOD(void, ColorControlCluster, moveColorTemperature) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject moveMode, jobject rate, jobject colorTemperatureMinimum, - jobject colorTemperatureMaximum, jobject optionsMask, jobject optionsOverride) + jobject colorTemperatureMaximum, jobject optionsMask, jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3673,7 +4014,15 @@ JNI_METHOD(void, ColorControlCluster, moveColorTemperature) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3683,7 +4032,7 @@ JNI_METHOD(void, ColorControlCluster, moveColorTemperature) } JNI_METHOD(void, ColorControlCluster, moveHue) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject moveMode, jobject rate, jobject optionsMask, - jobject optionsOverride) + jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3717,7 +4066,15 @@ JNI_METHOD(void, ColorControlCluster, moveHue) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3727,7 +4084,7 @@ JNI_METHOD(void, ColorControlCluster, moveHue) } JNI_METHOD(void, ColorControlCluster, moveSaturation) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject moveMode, jobject rate, jobject optionsMask, - jobject optionsOverride) + jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3761,7 +4118,15 @@ JNI_METHOD(void, ColorControlCluster, moveSaturation) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3771,7 +4136,7 @@ JNI_METHOD(void, ColorControlCluster, moveSaturation) } JNI_METHOD(void, ColorControlCluster, moveToColor) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject colorX, jobject colorY, jobject transitionTime, - jobject optionsMask, jobject optionsOverride) + jobject optionsMask, jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3807,7 +4172,15 @@ JNI_METHOD(void, ColorControlCluster, moveToColor) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3817,7 +4190,7 @@ JNI_METHOD(void, ColorControlCluster, moveToColor) } JNI_METHOD(void, ColorControlCluster, moveToColorTemperature) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject colorTemperature, jobject transitionTime, - jobject optionsMask, jobject optionsOverride) + jobject optionsMask, jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3853,7 +4226,15 @@ JNI_METHOD(void, ColorControlCluster, moveToColorTemperature) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3863,7 +4244,7 @@ JNI_METHOD(void, ColorControlCluster, moveToColorTemperature) } JNI_METHOD(void, ColorControlCluster, moveToHue) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject hue, jobject direction, jobject transitionTime, - jobject optionsMask, jobject optionsOverride) + jobject optionsMask, jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3899,7 +4280,15 @@ JNI_METHOD(void, ColorControlCluster, moveToHue) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3909,7 +4298,7 @@ JNI_METHOD(void, ColorControlCluster, moveToHue) } JNI_METHOD(void, ColorControlCluster, moveToHueAndSaturation) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject hue, jobject saturation, jobject transitionTime, - jobject optionsMask, jobject optionsOverride) + jobject optionsMask, jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3946,7 +4335,15 @@ JNI_METHOD(void, ColorControlCluster, moveToHueAndSaturation) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3956,7 +4353,7 @@ JNI_METHOD(void, ColorControlCluster, moveToHueAndSaturation) } JNI_METHOD(void, ColorControlCluster, moveToSaturation) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject saturation, jobject transitionTime, jobject optionsMask, - jobject optionsOverride) + jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3992,7 +4389,15 @@ JNI_METHOD(void, ColorControlCluster, moveToSaturation) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -4002,7 +4407,7 @@ JNI_METHOD(void, ColorControlCluster, moveToSaturation) } JNI_METHOD(void, ColorControlCluster, stepColor) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject stepX, jobject stepY, jobject transitionTime, - jobject optionsMask, jobject optionsOverride) + jobject optionsMask, jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4038,7 +4443,15 @@ JNI_METHOD(void, ColorControlCluster, stepColor) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -4048,7 +4461,8 @@ JNI_METHOD(void, ColorControlCluster, stepColor) } JNI_METHOD(void, ColorControlCluster, stepColorTemperature) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject stepMode, jobject stepSize, jobject transitionTime, - jobject colorTemperatureMinimum, jobject colorTemperatureMaximum, jobject optionsMask, jobject optionsOverride) + jobject colorTemperatureMinimum, jobject colorTemperatureMaximum, jobject optionsMask, jobject optionsOverride, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4088,7 +4502,15 @@ JNI_METHOD(void, ColorControlCluster, stepColorTemperature) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -4098,7 +4520,7 @@ JNI_METHOD(void, ColorControlCluster, stepColorTemperature) } JNI_METHOD(void, ColorControlCluster, stepHue) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject stepMode, jobject stepSize, jobject transitionTime, - jobject optionsMask, jobject optionsOverride) + jobject optionsMask, jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4134,7 +4556,15 @@ JNI_METHOD(void, ColorControlCluster, stepHue) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -4144,7 +4574,7 @@ JNI_METHOD(void, ColorControlCluster, stepHue) } JNI_METHOD(void, ColorControlCluster, stepSaturation) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject stepMode, jobject stepSize, jobject transitionTime, - jobject optionsMask, jobject optionsOverride) + jobject optionsMask, jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4180,7 +4610,15 @@ JNI_METHOD(void, ColorControlCluster, stepSaturation) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -4189,7 +4627,8 @@ JNI_METHOD(void, ColorControlCluster, stepSaturation) onFailure.release(); } JNI_METHOD(void, ColorControlCluster, stopMoveStep) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject optionsMask, jobject optionsOverride) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject optionsMask, jobject optionsOverride, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4221,7 +4660,15 @@ JNI_METHOD(void, ColorControlCluster, stopMoveStep) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -4564,7 +5011,7 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorModeAttribute) } JNI_METHOD(void, ColorControlCluster, writeColorControlOptionsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorControlOptions::TypeInfo; @@ -4592,7 +5039,16 @@ JNI_METHOD(void, ColorControlCluster, writeColorControlOptionsAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -5342,7 +5798,7 @@ JNI_METHOD(void, ColorControlCluster, subscribePrimary6IntensityAttribute) } JNI_METHOD(void, ColorControlCluster, writeWhitePointXAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::WhitePointX::TypeInfo; @@ -5370,7 +5826,16 @@ JNI_METHOD(void, ColorControlCluster, writeWhitePointXAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -5417,7 +5882,7 @@ JNI_METHOD(void, ColorControlCluster, subscribeWhitePointXAttribute) } JNI_METHOD(void, ColorControlCluster, writeWhitePointYAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::WhitePointY::TypeInfo; @@ -5445,7 +5910,16 @@ JNI_METHOD(void, ColorControlCluster, writeWhitePointYAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -5492,7 +5966,7 @@ JNI_METHOD(void, ColorControlCluster, subscribeWhitePointYAttribute) } JNI_METHOD(void, ColorControlCluster, writeColorPointRXAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointRX::TypeInfo; @@ -5520,7 +5994,16 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointRXAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -5567,7 +6050,7 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointRXAttribute) } JNI_METHOD(void, ColorControlCluster, writeColorPointRYAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointRY::TypeInfo; @@ -5595,7 +6078,16 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointRYAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -5642,7 +6134,7 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointRYAttribute) } JNI_METHOD(void, ColorControlCluster, writeColorPointRIntensityAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointRIntensity::TypeInfo; @@ -5670,7 +6162,16 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointRIntensityAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -5717,7 +6218,7 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointRIntensityAttribute) } JNI_METHOD(void, ColorControlCluster, writeColorPointGXAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointGX::TypeInfo; @@ -5745,7 +6246,16 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointGXAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -5792,7 +6302,7 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointGXAttribute) } JNI_METHOD(void, ColorControlCluster, writeColorPointGYAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointGY::TypeInfo; @@ -5820,12 +6330,21 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointGYAttribute) 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(); + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); onFailure.release(); } JNI_METHOD(void, ColorControlCluster, subscribeColorPointGYAttribute) @@ -5867,7 +6386,7 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointGYAttribute) } JNI_METHOD(void, ColorControlCluster, writeColorPointGIntensityAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointGIntensity::TypeInfo; @@ -5895,7 +6414,16 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointGIntensityAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -5942,7 +6470,7 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointGIntensityAttribute) } JNI_METHOD(void, ColorControlCluster, writeColorPointBXAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointBX::TypeInfo; @@ -5970,7 +6498,16 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointBXAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -6017,7 +6554,7 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointBXAttribute) } JNI_METHOD(void, ColorControlCluster, writeColorPointBYAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointBY::TypeInfo; @@ -6045,7 +6582,16 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointBYAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -6092,7 +6638,7 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointBYAttribute) } JNI_METHOD(void, ColorControlCluster, writeColorPointBIntensityAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointBIntensity::TypeInfo; @@ -6120,7 +6666,16 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointBIntensityAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -6577,7 +7132,7 @@ JNI_METHOD(void, ColorControlCluster, subscribeCoupleColorTempToLevelMinMiredsAt } JNI_METHOD(void, ColorControlCluster, writeStartUpColorTemperatureMiredsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; @@ -6605,7 +7160,16 @@ JNI_METHOD(void, ColorControlCluster, writeStartUpColorTemperatureMiredsAttribut 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -6698,7 +7262,8 @@ JNI_METHOD(jlong, ContentLauncherCluster, initWithDevice)(JNIEnv * env, jobject } JNI_METHOD(void, ContentLauncherCluster, launchContentRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject autoPlay, jstring data, jobject parameterList) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject autoPlay, jstring data, jobject parameterList, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6731,7 +7296,15 @@ JNI_METHOD(void, ContentLauncherCluster, launchContentRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -6741,7 +7314,7 @@ JNI_METHOD(void, ContentLauncherCluster, launchContentRequest) } JNI_METHOD(void, ContentLauncherCluster, launchURLRequest) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring contentURL, jstring displayString, jstring providerName, - jobject background, jobject logo, jobject progressBar, jobject splash, jobject waterMark) + jobject background, jobject logo, jobject progressBar, jobject splash, jobject waterMark, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6774,7 +7347,15 @@ JNI_METHOD(void, ContentLauncherCluster, launchURLRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -6784,7 +7365,7 @@ JNI_METHOD(void, ContentLauncherCluster, launchURLRequest) } JNI_METHOD(void, ContentLauncherCluster, writeSupportedStreamingProtocolsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; @@ -6812,7 +7393,16 @@ JNI_METHOD(void, ContentLauncherCluster, writeSupportedStreamingProtocolsAttribu 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -6952,7 +7542,7 @@ JNI_METHOD(jlong, DiagnosticLogsCluster, initWithDevice)(JNIEnv * env, jobject s JNI_METHOD(void, DiagnosticLogsCluster, retrieveLogsRequest) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject intent, jobject requestedProtocol, - jbyteArray transferFileDesignator) + jbyteArray transferFileDesignator, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6987,7 +7577,15 @@ JNI_METHOD(void, DiagnosticLogsCluster, retrieveLogsRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -7005,7 +7603,8 @@ JNI_METHOD(jlong, DoorLockCluster, initWithDevice)(JNIEnv * env, jobject self, j } JNI_METHOD(void, DoorLockCluster, clearCredential) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject credentialType, jobject credentialIndex) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject credentialType, jobject credentialIndex, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7034,7 +7633,15 @@ JNI_METHOD(void, DoorLockCluster, clearCredential) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -7042,7 +7649,8 @@ JNI_METHOD(void, DoorLockCluster, clearCredential) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, DoorLockCluster, clearUser)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject userIndex) +JNI_METHOD(void, DoorLockCluster, clearUser) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject userIndex, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7071,7 +7679,15 @@ JNI_METHOD(void, DoorLockCluster, clearUser)(JNIEnv * env, jobject self, jlong c auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -7080,7 +7696,8 @@ JNI_METHOD(void, DoorLockCluster, clearUser)(JNIEnv * env, jobject self, jlong c onFailure.release(); } JNI_METHOD(void, DoorLockCluster, getCredentialStatus) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject credentialType, jobject credentialIndex) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject credentialType, jobject credentialIndex, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7112,7 +7729,15 @@ JNI_METHOD(void, DoorLockCluster, getCredentialStatus) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -7120,7 +7745,8 @@ JNI_METHOD(void, DoorLockCluster, getCredentialStatus) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, DoorLockCluster, getUser)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject userIndex) +JNI_METHOD(void, DoorLockCluster, getUser) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject userIndex, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7150,7 +7776,15 @@ JNI_METHOD(void, DoorLockCluster, getUser)(JNIEnv * env, jobject self, jlong clu auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -7158,7 +7792,8 @@ JNI_METHOD(void, DoorLockCluster, getUser)(JNIEnv * env, jobject self, jlong clu onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, DoorLockCluster, lockDoor)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject pinCode) +JNI_METHOD(void, DoorLockCluster, lockDoor) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject pinCode, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7188,7 +7823,15 @@ JNI_METHOD(void, DoorLockCluster, lockDoor)(JNIEnv * env, jobject self, jlong cl auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -7198,7 +7841,7 @@ JNI_METHOD(void, DoorLockCluster, lockDoor)(JNIEnv * env, jobject self, jlong cl } JNI_METHOD(void, DoorLockCluster, setCredential) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject operationType, jobject credentialType, - jobject credentialIndex, jbyteArray credentialData, jobject userIndex, jobject userStatus) + jobject credentialIndex, jbyteArray credentialData, jobject userIndex, jobject userStatus, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7235,7 +7878,15 @@ JNI_METHOD(void, DoorLockCluster, setCredential) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -7245,7 +7896,7 @@ JNI_METHOD(void, DoorLockCluster, setCredential) } JNI_METHOD(void, DoorLockCluster, setUser) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject operationType, jobject userIndex, jstring userName, - jobject userUniqueId, jobject userStatus, jobject userType, jobject credentialRule) + jobject userUniqueId, jobject userStatus, jobject userType, jobject credentialRule, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7295,7 +7946,15 @@ JNI_METHOD(void, DoorLockCluster, setUser) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -7303,7 +7962,8 @@ JNI_METHOD(void, DoorLockCluster, setUser) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, DoorLockCluster, unlockDoor)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject pinCode) +JNI_METHOD(void, DoorLockCluster, unlockDoor) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject pinCode, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7333,7 +7993,15 @@ JNI_METHOD(void, DoorLockCluster, unlockDoor)(JNIEnv * env, jobject self, jlong auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -7493,7 +8161,7 @@ JNI_METHOD(void, DoorLockCluster, subscribeDoorStateAttribute) } JNI_METHOD(void, DoorLockCluster, writeLanguageAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::DoorLock::Attributes::Language::TypeInfo; @@ -7521,7 +8189,16 @@ JNI_METHOD(void, DoorLockCluster, writeLanguageAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -7568,7 +8245,7 @@ JNI_METHOD(void, DoorLockCluster, subscribeLanguageAttribute) } JNI_METHOD(void, DoorLockCluster, writeAutoRelockTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::DoorLock::Attributes::AutoRelockTime::TypeInfo; @@ -7596,7 +8273,16 @@ JNI_METHOD(void, DoorLockCluster, writeAutoRelockTimeAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -7643,7 +8329,7 @@ JNI_METHOD(void, DoorLockCluster, subscribeAutoRelockTimeAttribute) } JNI_METHOD(void, DoorLockCluster, writeSoundVolumeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::DoorLock::Attributes::SoundVolume::TypeInfo; @@ -7671,7 +8357,16 @@ JNI_METHOD(void, DoorLockCluster, writeSoundVolumeAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -7718,7 +8413,7 @@ JNI_METHOD(void, DoorLockCluster, subscribeSoundVolumeAttribute) } JNI_METHOD(void, DoorLockCluster, writeOperatingModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::DoorLock::Attributes::OperatingMode::TypeInfo; @@ -7746,7 +8441,16 @@ JNI_METHOD(void, DoorLockCluster, writeOperatingModeAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -7793,7 +8497,7 @@ JNI_METHOD(void, DoorLockCluster, subscribeOperatingModeAttribute) } JNI_METHOD(void, DoorLockCluster, writeEnableOneTouchLockingAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; @@ -7821,7 +8525,16 @@ JNI_METHOD(void, DoorLockCluster, writeEnableOneTouchLockingAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -7868,7 +8581,7 @@ JNI_METHOD(void, DoorLockCluster, subscribeEnableOneTouchLockingAttribute) } JNI_METHOD(void, DoorLockCluster, writeEnablePrivacyModeButtonAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; @@ -7896,7 +8609,16 @@ JNI_METHOD(void, DoorLockCluster, writeEnablePrivacyModeButtonAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -7943,7 +8665,7 @@ JNI_METHOD(void, DoorLockCluster, subscribeEnablePrivacyModeButtonAttribute) } JNI_METHOD(void, DoorLockCluster, writeWrongCodeEntryLimitAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; @@ -7971,7 +8693,16 @@ JNI_METHOD(void, DoorLockCluster, writeWrongCodeEntryLimitAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -8516,7 +9247,8 @@ JNI_METHOD(jlong, EthernetNetworkDiagnosticsCluster, initWithDevice)(JNIEnv * en return reinterpret_cast(cppCluster); } -JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, resetCounts)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, resetCounts) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -8543,7 +9275,15 @@ JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, resetCounts)(JNIEnv * env, j auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -9178,7 +9918,8 @@ JNI_METHOD(jlong, GeneralCommissioningCluster, initWithDevice)(JNIEnv * env, job } JNI_METHOD(void, GeneralCommissioningCluster, armFailSafe) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject expiryLengthSeconds, jobject breadcrumb, jobject timeoutMs) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject expiryLengthSeconds, jobject breadcrumb, jobject timeoutMs, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9213,7 +9954,15 @@ JNI_METHOD(void, GeneralCommissioningCluster, armFailSafe) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -9221,7 +9970,8 @@ JNI_METHOD(void, GeneralCommissioningCluster, armFailSafe) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GeneralCommissioningCluster, commissioningComplete)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, GeneralCommissioningCluster, commissioningComplete) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9252,7 +10002,15 @@ JNI_METHOD(void, GeneralCommissioningCluster, commissioningComplete)(JNIEnv * en onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -9262,7 +10020,7 @@ JNI_METHOD(void, GeneralCommissioningCluster, commissioningComplete)(JNIEnv * en } JNI_METHOD(void, GeneralCommissioningCluster, setRegulatoryConfig) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject location, jstring countryCode, jobject breadcrumb, - jobject timeoutMs) + jobject timeoutMs, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9298,7 +10056,15 @@ JNI_METHOD(void, GeneralCommissioningCluster, setRegulatoryConfig) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -9308,7 +10074,7 @@ JNI_METHOD(void, GeneralCommissioningCluster, setRegulatoryConfig) } JNI_METHOD(void, GeneralCommissioningCluster, writeBreadcrumbAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; @@ -9336,7 +10102,16 @@ JNI_METHOD(void, GeneralCommissioningCluster, writeBreadcrumbAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -9623,7 +10398,7 @@ JNI_METHOD(jlong, GroupKeyManagementCluster, initWithDevice)(JNIEnv * env, jobje } JNI_METHOD(void, GroupKeyManagementCluster, keySetRead) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupKeySetID) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupKeySetID, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9656,7 +10431,15 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetRead) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -9665,7 +10448,7 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetRead) onFailure.release(); } JNI_METHOD(void, GroupKeyManagementCluster, keySetReadAllIndices) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupKeySetIDs) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupKeySetIDs, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9698,7 +10481,15 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetReadAllIndices) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -9707,7 +10498,7 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetReadAllIndices) onFailure.release(); } JNI_METHOD(void, GroupKeyManagementCluster, keySetRemove) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupKeySetID) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupKeySetID, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9737,7 +10528,15 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetRemove) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -9748,7 +10547,7 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetRemove) JNI_METHOD(void, GroupKeyManagementCluster, keySetWrite) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupKeySetID, jobject securityPolicy, jbyteArray epochKey0, jobject epochStartTime0, jbyteArray epochKey1, jobject epochStartTime1, jbyteArray epochKey2, - jobject epochStartTime2) + jobject epochStartTime2, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9777,7 +10576,15 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetWrite) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -9832,7 +10639,7 @@ JNI_METHOD(jlong, GroupsCluster, initWithDevice)(JNIEnv * env, jobject self, jlo } JNI_METHOD(void, GroupsCluster, addGroup) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jstring groupName) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jstring groupName, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9863,7 +10670,15 @@ JNI_METHOD(void, GroupsCluster, addGroup) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -9872,7 +10687,7 @@ JNI_METHOD(void, GroupsCluster, addGroup) onFailure.release(); } JNI_METHOD(void, GroupsCluster, addGroupIfIdentifying) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jstring groupName) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jstring groupName, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9902,7 +10717,15 @@ JNI_METHOD(void, GroupsCluster, addGroupIfIdentifying) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -9911,7 +10734,7 @@ JNI_METHOD(void, GroupsCluster, addGroupIfIdentifying) onFailure.release(); } JNI_METHOD(void, GroupsCluster, getGroupMembership) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupList) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupList, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9943,7 +10766,15 @@ JNI_METHOD(void, GroupsCluster, getGroupMembership) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -9951,7 +10782,8 @@ JNI_METHOD(void, GroupsCluster, getGroupMembership) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GroupsCluster, removeAllGroups)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, GroupsCluster, removeAllGroups) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9978,7 +10810,15 @@ JNI_METHOD(void, GroupsCluster, removeAllGroups)(JNIEnv * env, jobject self, jlo auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -9986,7 +10826,8 @@ JNI_METHOD(void, GroupsCluster, removeAllGroups)(JNIEnv * env, jobject self, jlo onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GroupsCluster, removeGroup)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId) +JNI_METHOD(void, GroupsCluster, removeGroup) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10017,7 +10858,15 @@ JNI_METHOD(void, GroupsCluster, removeGroup)(JNIEnv * env, jobject self, jlong c chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -10025,7 +10874,8 @@ JNI_METHOD(void, GroupsCluster, removeGroup)(JNIEnv * env, jobject self, jlong c onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GroupsCluster, viewGroup)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId) +JNI_METHOD(void, GroupsCluster, viewGroup) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10055,7 +10905,15 @@ JNI_METHOD(void, GroupsCluster, viewGroup)(JNIEnv * env, jobject self, jlong clu auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -10146,7 +11004,8 @@ JNI_METHOD(jlong, IdentifyCluster, initWithDevice)(JNIEnv * env, jobject self, j return reinterpret_cast(cppCluster); } -JNI_METHOD(void, IdentifyCluster, identify)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject identifyTime) +JNI_METHOD(void, IdentifyCluster, identify) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject identifyTime, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10176,7 +11035,15 @@ JNI_METHOD(void, IdentifyCluster, identify)(JNIEnv * env, jobject self, jlong cl auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -10184,7 +11051,8 @@ JNI_METHOD(void, IdentifyCluster, identify)(JNIEnv * env, jobject self, jlong cl onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, IdentifyCluster, identifyQuery)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, IdentifyCluster, identifyQuery) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10213,7 +11081,15 @@ JNI_METHOD(void, IdentifyCluster, identifyQuery)(JNIEnv * env, jobject self, jlo chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -10222,7 +11098,8 @@ JNI_METHOD(void, IdentifyCluster, identifyQuery)(JNIEnv * env, jobject self, jlo onFailure.release(); } JNI_METHOD(void, IdentifyCluster, triggerEffect) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject effectIdentifier, jobject effectVariant) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject effectIdentifier, jobject effectVariant, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10254,7 +11131,15 @@ JNI_METHOD(void, IdentifyCluster, triggerEffect) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -10264,7 +11149,7 @@ JNI_METHOD(void, IdentifyCluster, triggerEffect) } JNI_METHOD(void, IdentifyCluster, writeIdentifyTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::Identify::Attributes::IdentifyTime::TypeInfo; @@ -10292,7 +11177,16 @@ JNI_METHOD(void, IdentifyCluster, writeIdentifyTimeAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -10664,7 +11558,7 @@ JNI_METHOD(jlong, KeypadInputCluster, initWithDevice)(JNIEnv * env, jobject self } JNI_METHOD(void, KeypadInputCluster, sendKeyRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject keyCode) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject keyCode, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10695,7 +11589,15 @@ JNI_METHOD(void, KeypadInputCluster, sendKeyRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -10751,7 +11653,7 @@ JNI_METHOD(jlong, LevelControlCluster, initWithDevice)(JNIEnv * env, jobject sel JNI_METHOD(void, LevelControlCluster, move) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject moveMode, jobject rate, jobject optionMask, - jobject optionOverride) + jobject optionOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10785,7 +11687,15 @@ JNI_METHOD(void, LevelControlCluster, move) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -10795,7 +11705,7 @@ JNI_METHOD(void, LevelControlCluster, move) } JNI_METHOD(void, LevelControlCluster, moveToLevel) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject level, jobject transitionTime, jobject optionMask, - jobject optionOverride) + jobject optionOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10830,7 +11740,15 @@ JNI_METHOD(void, LevelControlCluster, moveToLevel) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -10839,7 +11757,8 @@ JNI_METHOD(void, LevelControlCluster, moveToLevel) onFailure.release(); } JNI_METHOD(void, LevelControlCluster, moveToLevelWithOnOff) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject level, jobject transitionTime) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject level, jobject transitionTime, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10870,7 +11789,15 @@ JNI_METHOD(void, LevelControlCluster, moveToLevelWithOnOff) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -10879,7 +11806,7 @@ JNI_METHOD(void, LevelControlCluster, moveToLevelWithOnOff) onFailure.release(); } JNI_METHOD(void, LevelControlCluster, moveWithOnOff) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject moveMode, jobject rate) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject moveMode, jobject rate, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10909,7 +11836,15 @@ JNI_METHOD(void, LevelControlCluster, moveWithOnOff) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -10919,7 +11854,7 @@ JNI_METHOD(void, LevelControlCluster, moveWithOnOff) } JNI_METHOD(void, LevelControlCluster, step) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject stepMode, jobject stepSize, jobject transitionTime, - jobject optionMask, jobject optionOverride) + jobject optionMask, jobject optionOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10955,7 +11890,15 @@ JNI_METHOD(void, LevelControlCluster, step) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -10964,7 +11907,8 @@ JNI_METHOD(void, LevelControlCluster, step) onFailure.release(); } JNI_METHOD(void, LevelControlCluster, stepWithOnOff) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject stepMode, jobject stepSize, jobject transitionTime) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject stepMode, jobject stepSize, jobject transitionTime, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10996,7 +11940,15 @@ JNI_METHOD(void, LevelControlCluster, stepWithOnOff) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -11005,7 +11957,8 @@ JNI_METHOD(void, LevelControlCluster, stepWithOnOff) onFailure.release(); } JNI_METHOD(void, LevelControlCluster, stop) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject optionMask, jobject optionOverride) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject optionMask, jobject optionOverride, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -11037,7 +11990,15 @@ JNI_METHOD(void, LevelControlCluster, stop) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -11045,7 +12006,8 @@ JNI_METHOD(void, LevelControlCluster, stop) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, LevelControlCluster, stopWithOnOff)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, LevelControlCluster, stopWithOnOff) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -11072,7 +12034,15 @@ JNI_METHOD(void, LevelControlCluster, stopWithOnOff)(JNIEnv * env, jobject self, auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -11341,7 +12311,7 @@ JNI_METHOD(void, LevelControlCluster, subscribeMaxFrequencyAttribute) } JNI_METHOD(void, LevelControlCluster, writeOptionsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::Options::TypeInfo; @@ -11369,7 +12339,16 @@ JNI_METHOD(void, LevelControlCluster, writeOptionsAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -11416,7 +12395,7 @@ JNI_METHOD(void, LevelControlCluster, subscribeOptionsAttribute) } JNI_METHOD(void, LevelControlCluster, writeOnOffTransitionTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnOffTransitionTime::TypeInfo; @@ -11444,7 +12423,16 @@ JNI_METHOD(void, LevelControlCluster, writeOnOffTransitionTimeAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -11491,7 +12479,7 @@ JNI_METHOD(void, LevelControlCluster, subscribeOnOffTransitionTimeAttribute) } JNI_METHOD(void, LevelControlCluster, writeOnLevelAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnLevel::TypeInfo; @@ -11524,7 +12512,16 @@ JNI_METHOD(void, LevelControlCluster, writeOnLevelAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -11572,7 +12569,7 @@ JNI_METHOD(void, LevelControlCluster, subscribeOnLevelAttribute) } JNI_METHOD(void, LevelControlCluster, writeOnTransitionTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnTransitionTime::TypeInfo; @@ -11605,7 +12602,16 @@ JNI_METHOD(void, LevelControlCluster, writeOnTransitionTimeAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -11654,7 +12660,7 @@ JNI_METHOD(void, LevelControlCluster, subscribeOnTransitionTimeAttribute) } JNI_METHOD(void, LevelControlCluster, writeOffTransitionTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OffTransitionTime::TypeInfo; @@ -11687,10 +12693,19 @@ JNI_METHOD(void, LevelControlCluster, writeOffTransitionTimeAttribute) 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)); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); onSuccess.release(); onFailure.release(); @@ -11736,7 +12751,7 @@ JNI_METHOD(void, LevelControlCluster, subscribeOffTransitionTimeAttribute) } JNI_METHOD(void, LevelControlCluster, writeDefaultMoveRateAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::DefaultMoveRate::TypeInfo; @@ -11769,7 +12784,16 @@ JNI_METHOD(void, LevelControlCluster, writeDefaultMoveRateAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -11817,7 +12841,7 @@ JNI_METHOD(void, LevelControlCluster, subscribeDefaultMoveRateAttribute) } JNI_METHOD(void, LevelControlCluster, writeStartUpCurrentLevelAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; @@ -11845,7 +12869,16 @@ JNI_METHOD(void, LevelControlCluster, writeStartUpCurrentLevelAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -11927,6 +12960,61 @@ JNI_METHOD(void, LevelControlCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(jlong, LocalizationConfigurationCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +{ + chip::DeviceLayer::StackLock lock; + LocalizationConfigurationCluster * cppCluster = new LocalizationConfigurationCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} + +JNI_METHOD(void, LocalizationConfigurationCluster, writeActiveLocaleAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::LocalizationConfiguration::Attributes::ActiveLocale::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; + LocalizationConfigurationCluster * 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()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(jlong, LowPowerCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; @@ -11936,7 +13024,8 @@ JNI_METHOD(jlong, LowPowerCluster, initWithDevice)(JNIEnv * env, jobject self, j return reinterpret_cast(cppCluster); } -JNI_METHOD(void, LowPowerCluster, sleep)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, LowPowerCluster, sleep) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -11963,7 +13052,15 @@ JNI_METHOD(void, LowPowerCluster, sleep)(JNIEnv * env, jobject self, jlong clust auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12017,7 +13114,8 @@ JNI_METHOD(jlong, MediaInputCluster, initWithDevice)(JNIEnv * env, jobject self, return reinterpret_cast(cppCluster); } -JNI_METHOD(void, MediaInputCluster, hideInputStatusRequest)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, MediaInputCluster, hideInputStatusRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12044,7 +13142,15 @@ JNI_METHOD(void, MediaInputCluster, hideInputStatusRequest)(JNIEnv * env, jobjec auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12053,7 +13159,7 @@ JNI_METHOD(void, MediaInputCluster, hideInputStatusRequest)(JNIEnv * env, jobjec onFailure.release(); } JNI_METHOD(void, MediaInputCluster, renameInputRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject index, jstring name) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject index, jstring name, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12083,7 +13189,15 @@ JNI_METHOD(void, MediaInputCluster, renameInputRequest) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12092,7 +13206,7 @@ JNI_METHOD(void, MediaInputCluster, renameInputRequest) onFailure.release(); } JNI_METHOD(void, MediaInputCluster, selectInputRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject index) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject index, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12121,7 +13235,15 @@ JNI_METHOD(void, MediaInputCluster, selectInputRequest) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12129,7 +13251,8 @@ JNI_METHOD(void, MediaInputCluster, selectInputRequest) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaInputCluster, showInputStatusRequest)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, MediaInputCluster, showInputStatusRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12156,7 +13279,15 @@ JNI_METHOD(void, MediaInputCluster, showInputStatusRequest)(JNIEnv * env, jobjec auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12247,7 +13378,8 @@ JNI_METHOD(jlong, MediaPlaybackCluster, initWithDevice)(JNIEnv * env, jobject se return reinterpret_cast(cppCluster); } -JNI_METHOD(void, MediaPlaybackCluster, fastForwardRequest)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, MediaPlaybackCluster, fastForwardRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12276,7 +13408,15 @@ JNI_METHOD(void, MediaPlaybackCluster, fastForwardRequest)(JNIEnv * env, jobject chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12284,7 +13424,8 @@ JNI_METHOD(void, MediaPlaybackCluster, fastForwardRequest)(JNIEnv * env, jobject onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, nextRequest)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, MediaPlaybackCluster, nextRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12313,7 +13454,15 @@ JNI_METHOD(void, MediaPlaybackCluster, nextRequest)(JNIEnv * env, jobject self, chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12321,7 +13470,8 @@ JNI_METHOD(void, MediaPlaybackCluster, nextRequest)(JNIEnv * env, jobject self, onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, pauseRequest)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, MediaPlaybackCluster, pauseRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12350,7 +13500,15 @@ JNI_METHOD(void, MediaPlaybackCluster, pauseRequest)(JNIEnv * env, jobject self, chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12358,7 +13516,8 @@ JNI_METHOD(void, MediaPlaybackCluster, pauseRequest)(JNIEnv * env, jobject self, onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, playRequest)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, MediaPlaybackCluster, playRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12387,7 +13546,15 @@ JNI_METHOD(void, MediaPlaybackCluster, playRequest)(JNIEnv * env, jobject self, chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12395,7 +13562,8 @@ JNI_METHOD(void, MediaPlaybackCluster, playRequest)(JNIEnv * env, jobject self, onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, previousRequest)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, MediaPlaybackCluster, previousRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12424,7 +13592,15 @@ JNI_METHOD(void, MediaPlaybackCluster, previousRequest)(JNIEnv * env, jobject se chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12432,7 +13608,8 @@ JNI_METHOD(void, MediaPlaybackCluster, previousRequest)(JNIEnv * env, jobject se onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, rewindRequest)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, MediaPlaybackCluster, rewindRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12461,7 +13638,15 @@ JNI_METHOD(void, MediaPlaybackCluster, rewindRequest)(JNIEnv * env, jobject self chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12470,7 +13655,7 @@ JNI_METHOD(void, MediaPlaybackCluster, rewindRequest)(JNIEnv * env, jobject self onFailure.release(); } JNI_METHOD(void, MediaPlaybackCluster, seekRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject position) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject position, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12501,7 +13686,15 @@ JNI_METHOD(void, MediaPlaybackCluster, seekRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12510,7 +13703,7 @@ JNI_METHOD(void, MediaPlaybackCluster, seekRequest) onFailure.release(); } JNI_METHOD(void, MediaPlaybackCluster, skipBackwardRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject deltaPositionMilliseconds) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject deltaPositionMilliseconds, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12542,7 +13735,15 @@ JNI_METHOD(void, MediaPlaybackCluster, skipBackwardRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12551,7 +13752,7 @@ JNI_METHOD(void, MediaPlaybackCluster, skipBackwardRequest) onFailure.release(); } JNI_METHOD(void, MediaPlaybackCluster, skipForwardRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject deltaPositionMilliseconds) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject deltaPositionMilliseconds, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12583,7 +13784,15 @@ JNI_METHOD(void, MediaPlaybackCluster, skipForwardRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12591,7 +13800,8 @@ JNI_METHOD(void, MediaPlaybackCluster, skipForwardRequest) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, startOverRequest)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, MediaPlaybackCluster, startOverRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12620,7 +13830,15 @@ JNI_METHOD(void, MediaPlaybackCluster, startOverRequest)(JNIEnv * env, jobject s chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12628,7 +13846,8 @@ JNI_METHOD(void, MediaPlaybackCluster, startOverRequest)(JNIEnv * env, jobject s onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, stopRequest)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, MediaPlaybackCluster, stopRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12657,7 +13876,15 @@ JNI_METHOD(void, MediaPlaybackCluster, stopRequest)(JNIEnv * env, jobject self, chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12896,7 +14123,8 @@ JNI_METHOD(jlong, ModeSelectCluster, initWithDevice)(JNIEnv * env, jobject self, return reinterpret_cast(cppCluster); } -JNI_METHOD(void, ModeSelectCluster, changeToMode)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject newMode) +JNI_METHOD(void, ModeSelectCluster, changeToMode) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject newMode, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12925,7 +14153,15 @@ JNI_METHOD(void, ModeSelectCluster, changeToMode)(JNIEnv * env, jobject self, jl auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12972,7 +14208,7 @@ JNI_METHOD(void, ModeSelectCluster, subscribeCurrentModeAttribute) } JNI_METHOD(void, ModeSelectCluster, writeOnModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ModeSelect::Attributes::OnMode::TypeInfo; @@ -13000,7 +14236,16 @@ JNI_METHOD(void, ModeSelectCluster, writeOnModeAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -13166,7 +14411,8 @@ JNI_METHOD(jlong, NetworkCommissioningCluster, initWithDevice)(JNIEnv * env, job } JNI_METHOD(void, NetworkCommissioningCluster, addOrUpdateThreadNetwork) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray operationalDataset, jobject breadcrumb) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray operationalDataset, jobject breadcrumb, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13199,7 +14445,15 @@ JNI_METHOD(void, NetworkCommissioningCluster, addOrUpdateThreadNetwork) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -13208,7 +14462,8 @@ JNI_METHOD(void, NetworkCommissioningCluster, addOrUpdateThreadNetwork) onFailure.release(); } JNI_METHOD(void, NetworkCommissioningCluster, addOrUpdateWiFiNetwork) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray ssid, jbyteArray credentials, jobject breadcrumb) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray ssid, jbyteArray credentials, jobject breadcrumb, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13242,7 +14497,15 @@ JNI_METHOD(void, NetworkCommissioningCluster, addOrUpdateWiFiNetwork) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -13251,7 +14514,8 @@ JNI_METHOD(void, NetworkCommissioningCluster, addOrUpdateWiFiNetwork) onFailure.release(); } JNI_METHOD(void, NetworkCommissioningCluster, connectNetwork) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray networkID, jobject breadcrumb) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray networkID, jobject breadcrumb, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13284,7 +14548,15 @@ JNI_METHOD(void, NetworkCommissioningCluster, connectNetwork) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -13293,7 +14565,8 @@ JNI_METHOD(void, NetworkCommissioningCluster, connectNetwork) onFailure.release(); } JNI_METHOD(void, NetworkCommissioningCluster, removeNetwork) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray networkID, jobject breadcrumb) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray networkID, jobject breadcrumb, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13326,7 +14599,15 @@ JNI_METHOD(void, NetworkCommissioningCluster, removeNetwork) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -13335,7 +14616,8 @@ JNI_METHOD(void, NetworkCommissioningCluster, removeNetwork) onFailure.release(); } JNI_METHOD(void, NetworkCommissioningCluster, reorderNetwork) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray networkID, jobject networkIndex, jobject breadcrumb) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray networkID, jobject networkIndex, jobject breadcrumb, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13370,7 +14652,15 @@ JNI_METHOD(void, NetworkCommissioningCluster, reorderNetwork) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -13379,7 +14669,7 @@ JNI_METHOD(void, NetworkCommissioningCluster, reorderNetwork) onFailure.release(); } JNI_METHOD(void, NetworkCommissioningCluster, scanNetworks) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray ssid, jobject breadcrumb) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray ssid, jobject breadcrumb, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13412,7 +14702,15 @@ JNI_METHOD(void, NetworkCommissioningCluster, scanNetworks) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -13422,7 +14720,7 @@ JNI_METHOD(void, NetworkCommissioningCluster, scanNetworks) } JNI_METHOD(void, NetworkCommissioningCluster, writeInterfaceEnabledAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; @@ -13450,7 +14748,16 @@ JNI_METHOD(void, NetworkCommissioningCluster, writeInterfaceEnabledAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -13542,7 +14849,8 @@ JNI_METHOD(jlong, OtaSoftwareUpdateProviderCluster, initWithDevice)(JNIEnv * env } JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, applyUpdateRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray updateToken, jobject newVersion) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray updateToken, jobject newVersion, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13575,7 +14883,15 @@ JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, applyUpdateRequest) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -13584,7 +14900,8 @@ JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, applyUpdateRequest) onFailure.release(); } JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, notifyUpdateApplied) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray updateToken, jobject softwareVersion) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray updateToken, jobject softwareVersion, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13615,7 +14932,15 @@ JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, notifyUpdateApplied) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -13625,7 +14950,8 @@ JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, notifyUpdateApplied) } JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, queryImage) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject vendorId, jobject productId, jobject softwareVersion, - jobject protocolsSupported, jobject hardwareVersion, jobject location, jobject requestorCanConsent, jobject metadataForProvider) + jobject protocolsSupported, jobject hardwareVersion, jobject location, jobject requestorCanConsent, jobject metadataForProvider, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13673,7 +14999,15 @@ JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, queryImage) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -13730,7 +15064,7 @@ JNI_METHOD(jlong, OtaSoftwareUpdateRequestorCluster, initWithDevice)(JNIEnv * en JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, announceOtaProvider) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject providerNodeId, jobject vendorId, - jobject announcementReason, jobject metadataForNode, jobject endpoint) + jobject announcementReason, jobject metadataForNode, jobject endpoint, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13767,7 +15101,15 @@ JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, announceOtaProvider) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -14097,7 +15439,7 @@ JNI_METHOD(jlong, OnOffCluster, initWithDevice)(JNIEnv * env, jobject self, jlon return reinterpret_cast(cppCluster); } -JNI_METHOD(void, OnOffCluster, off)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, OnOffCluster, off)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14124,7 +15466,15 @@ JNI_METHOD(void, OnOffCluster, off)(JNIEnv * env, jobject self, jlong clusterPtr auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -14133,7 +15483,8 @@ JNI_METHOD(void, OnOffCluster, off)(JNIEnv * env, jobject self, jlong clusterPtr onFailure.release(); } JNI_METHOD(void, OnOffCluster, offWithEffect) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject effectId, jobject effectVariant) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject effectId, jobject effectVariant, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14164,7 +15515,15 @@ JNI_METHOD(void, OnOffCluster, offWithEffect) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -14172,7 +15531,7 @@ JNI_METHOD(void, OnOffCluster, offWithEffect) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OnOffCluster, on)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, OnOffCluster, on)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14199,7 +15558,15 @@ JNI_METHOD(void, OnOffCluster, on)(JNIEnv * env, jobject self, jlong clusterPtr, auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -14207,7 +15574,8 @@ JNI_METHOD(void, OnOffCluster, on)(JNIEnv * env, jobject self, jlong clusterPtr, onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OnOffCluster, onWithRecallGlobalScene)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, OnOffCluster, onWithRecallGlobalScene) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14234,7 +15602,15 @@ JNI_METHOD(void, OnOffCluster, onWithRecallGlobalScene)(JNIEnv * env, jobject se auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -14243,7 +15619,8 @@ JNI_METHOD(void, OnOffCluster, onWithRecallGlobalScene)(JNIEnv * env, jobject se onFailure.release(); } JNI_METHOD(void, OnOffCluster, onWithTimedOff) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject onOffControl, jobject onTime, jobject offWaitTime) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject onOffControl, jobject onTime, jobject offWaitTime, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14276,7 +15653,15 @@ JNI_METHOD(void, OnOffCluster, onWithTimedOff) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -14284,7 +15669,7 @@ JNI_METHOD(void, OnOffCluster, onWithTimedOff) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OnOffCluster, toggle)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, OnOffCluster, toggle)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14311,7 +15696,15 @@ JNI_METHOD(void, OnOffCluster, toggle)(JNIEnv * env, jobject self, jlong cluster auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -14393,7 +15786,8 @@ JNI_METHOD(void, OnOffCluster, subscribeGlobalSceneControlAttribute) onFailure.release(); } -JNI_METHOD(void, OnOffCluster, writeOnTimeAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +JNI_METHOD(void, OnOffCluster, writeOnTimeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::OnOff::Attributes::OnTime::TypeInfo; @@ -14421,7 +15815,16 @@ JNI_METHOD(void, OnOffCluster, writeOnTimeAttribute)(JNIEnv * env, jobject self, 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -14467,7 +15870,7 @@ JNI_METHOD(void, OnOffCluster, subscribeOnTimeAttribute) } JNI_METHOD(void, OnOffCluster, writeOffWaitTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::OnOff::Attributes::OffWaitTime::TypeInfo; @@ -14495,7 +15898,16 @@ JNI_METHOD(void, OnOffCluster, writeOffWaitTimeAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -14542,7 +15954,7 @@ JNI_METHOD(void, OnOffCluster, subscribeOffWaitTimeAttribute) } JNI_METHOD(void, OnOffCluster, writeStartUpOnOffAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::OnOff::Attributes::StartUpOnOff::TypeInfo; @@ -14570,7 +15982,16 @@ JNI_METHOD(void, OnOffCluster, writeStartUpOnOffAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -14736,7 +16157,7 @@ JNI_METHOD(void, OnOffSwitchConfigurationCluster, subscribeSwitchTypeAttribute) } JNI_METHOD(void, OnOffSwitchConfigurationCluster, writeSwitchActionsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; @@ -14764,7 +16185,16 @@ JNI_METHOD(void, OnOffSwitchConfigurationCluster, writeSwitchActionsAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -14859,7 +16289,7 @@ JNI_METHOD(jlong, OperationalCredentialsCluster, initWithDevice)(JNIEnv * env, j JNI_METHOD(void, OperationalCredentialsCluster, addNOC) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray NOCValue, jobject ICACValue, jbyteArray IPKValue, - jobject caseAdminNode, jobject adminVendorId) + jobject caseAdminNode, jobject adminVendorId, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14898,7 +16328,15 @@ JNI_METHOD(void, OperationalCredentialsCluster, addNOC) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -14907,7 +16345,7 @@ JNI_METHOD(void, OperationalCredentialsCluster, addNOC) onFailure.release(); } JNI_METHOD(void, OperationalCredentialsCluster, addTrustedRootCertificate) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray rootCertificate) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray rootCertificate, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14936,7 +16374,15 @@ JNI_METHOD(void, OperationalCredentialsCluster, addTrustedRootCertificate) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -14945,7 +16391,7 @@ JNI_METHOD(void, OperationalCredentialsCluster, addTrustedRootCertificate) onFailure.release(); } JNI_METHOD(void, OperationalCredentialsCluster, attestationRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray attestationNonce) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray attestationNonce, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14977,7 +16423,15 @@ JNI_METHOD(void, OperationalCredentialsCluster, attestationRequest) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -14986,7 +16440,7 @@ JNI_METHOD(void, OperationalCredentialsCluster, attestationRequest) onFailure.release(); } JNI_METHOD(void, OperationalCredentialsCluster, certificateChainRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject certificateType) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject certificateType, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15020,7 +16474,15 @@ JNI_METHOD(void, OperationalCredentialsCluster, certificateChainRequest) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -15029,7 +16491,7 @@ JNI_METHOD(void, OperationalCredentialsCluster, certificateChainRequest) onFailure.release(); } JNI_METHOD(void, OperationalCredentialsCluster, opCSRRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray CSRNonce) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray CSRNonce, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15061,7 +16523,15 @@ JNI_METHOD(void, OperationalCredentialsCluster, opCSRRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -15070,7 +16540,7 @@ JNI_METHOD(void, OperationalCredentialsCluster, opCSRRequest) onFailure.release(); } JNI_METHOD(void, OperationalCredentialsCluster, removeFabric) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject fabricIndex) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject fabricIndex, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15103,7 +16573,15 @@ JNI_METHOD(void, OperationalCredentialsCluster, removeFabric) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -15112,7 +16590,7 @@ JNI_METHOD(void, OperationalCredentialsCluster, removeFabric) onFailure.release(); } JNI_METHOD(void, OperationalCredentialsCluster, removeTrustedRootCertificate) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray trustedRootIdentifier) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray trustedRootIdentifier, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15141,7 +16619,15 @@ JNI_METHOD(void, OperationalCredentialsCluster, removeTrustedRootCertificate) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -15150,7 +16636,7 @@ JNI_METHOD(void, OperationalCredentialsCluster, removeTrustedRootCertificate) onFailure.release(); } JNI_METHOD(void, OperationalCredentialsCluster, updateFabricLabel) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring label) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring label, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15182,7 +16668,15 @@ JNI_METHOD(void, OperationalCredentialsCluster, updateFabricLabel) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -15191,7 +16685,8 @@ JNI_METHOD(void, OperationalCredentialsCluster, updateFabricLabel) onFailure.release(); } JNI_METHOD(void, OperationalCredentialsCluster, updateNOC) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray NOCValue, jobject ICACValue) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray NOCValue, jobject ICACValue, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15225,7 +16720,15 @@ JNI_METHOD(void, OperationalCredentialsCluster, updateNOC) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -16624,7 +18127,7 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeSpeedAttribute) } JNI_METHOD(void, PumpConfigurationAndControlCluster, writeLifetimeRunningHoursAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; @@ -16657,7 +18160,16 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeLifetimeRunningHoursAt 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -16745,7 +18257,7 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribePowerAttribute) } JNI_METHOD(void, PumpConfigurationAndControlCluster, writeLifetimeEnergyConsumedAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; @@ -16778,7 +18290,16 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeLifetimeEnergyConsumed 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -16829,7 +18350,7 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeLifetimeEnergyCons } JNI_METHOD(void, PumpConfigurationAndControlCluster, writeOperationModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; @@ -16857,7 +18378,16 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeOperationModeAttribute 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -16905,7 +18435,7 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeOperationModeAttri } JNI_METHOD(void, PumpConfigurationAndControlCluster, writeControlModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; @@ -16933,7 +18463,16 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeControlModeAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -17301,7 +18840,7 @@ JNI_METHOD(jlong, ScenesCluster, initWithDevice)(JNIEnv * env, jobject self, jlo JNI_METHOD(void, ScenesCluster, addScene) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject sceneId, jobject transitionTime, - jstring sceneName, jobject clusterId, jobject length, jobject value) + jstring sceneName, jobject clusterId, jobject length, jobject value, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17337,7 +18876,15 @@ JNI_METHOD(void, ScenesCluster, addScene) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -17345,7 +18892,8 @@ JNI_METHOD(void, ScenesCluster, addScene) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ScenesCluster, getSceneMembership)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId) +JNI_METHOD(void, ScenesCluster, getSceneMembership) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17377,7 +18925,15 @@ JNI_METHOD(void, ScenesCluster, getSceneMembership)(JNIEnv * env, jobject self, chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -17386,7 +18942,8 @@ JNI_METHOD(void, ScenesCluster, getSceneMembership)(JNIEnv * env, jobject self, onFailure.release(); } JNI_METHOD(void, ScenesCluster, recallScene) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject sceneId, jobject transitionTime) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject sceneId, jobject transitionTime, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17418,7 +18975,15 @@ JNI_METHOD(void, ScenesCluster, recallScene) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -17426,7 +18991,8 @@ JNI_METHOD(void, ScenesCluster, recallScene) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ScenesCluster, removeAllScenes)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId) +JNI_METHOD(void, ScenesCluster, removeAllScenes) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17457,7 +19023,15 @@ JNI_METHOD(void, ScenesCluster, removeAllScenes)(JNIEnv * env, jobject self, jlo chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -17466,7 +19040,7 @@ JNI_METHOD(void, ScenesCluster, removeAllScenes)(JNIEnv * env, jobject self, jlo onFailure.release(); } JNI_METHOD(void, ScenesCluster, removeScene) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject sceneId) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject sceneId, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17498,7 +19072,15 @@ JNI_METHOD(void, ScenesCluster, removeScene) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -17507,7 +19089,7 @@ JNI_METHOD(void, ScenesCluster, removeScene) onFailure.release(); } JNI_METHOD(void, ScenesCluster, storeScene) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject sceneId) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject sceneId, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17538,7 +19120,15 @@ JNI_METHOD(void, ScenesCluster, storeScene) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -17547,7 +19137,7 @@ JNI_METHOD(void, ScenesCluster, storeScene) onFailure.release(); } JNI_METHOD(void, ScenesCluster, viewScene) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject sceneId) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject sceneId, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17578,7 +19168,15 @@ JNI_METHOD(void, ScenesCluster, viewScene) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -17817,7 +19415,8 @@ JNI_METHOD(jlong, SoftwareDiagnosticsCluster, initWithDevice)(JNIEnv * env, jobj return reinterpret_cast(cppCluster); } -JNI_METHOD(void, SoftwareDiagnosticsCluster, resetWatermarks)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, SoftwareDiagnosticsCluster, resetWatermarks) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17844,7 +19443,15 @@ JNI_METHOD(void, SoftwareDiagnosticsCluster, resetWatermarks)(JNIEnv * env, jobj auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -18205,7 +19812,7 @@ JNI_METHOD(jlong, TargetNavigatorCluster, initWithDevice)(JNIEnv * env, jobject } JNI_METHOD(void, TargetNavigatorCluster, navigateTargetRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject target, jstring data) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject target, jstring data, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18238,7 +19845,15 @@ JNI_METHOD(void, TargetNavigatorCluster, navigateTargetRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -18529,7 +20144,7 @@ JNI_METHOD(jlong, TestClusterCluster, initWithDevice)(JNIEnv * env, jobject self JNI_METHOD(void, TestClusterCluster, simpleStructEchoRequest) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jbyteArray d, jstring e, - jobject f, jobject g, jobject h) + jobject f, jobject g, jobject h, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18561,7 +20176,15 @@ JNI_METHOD(void, TestClusterCluster, simpleStructEchoRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -18569,7 +20192,8 @@ JNI_METHOD(void, TestClusterCluster, simpleStructEchoRequest) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, test)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, TestClusterCluster, test) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18596,7 +20220,15 @@ JNI_METHOD(void, TestClusterCluster, test)(JNIEnv * env, jobject self, jlong clu auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -18605,7 +20237,7 @@ JNI_METHOD(void, TestClusterCluster, test)(JNIEnv * env, jobject self, jlong clu onFailure.release(); } JNI_METHOD(void, TestClusterCluster, testAddArguments) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject arg2) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject arg2, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18638,7 +20270,67 @@ JNI_METHOD(void, TestClusterCluster, testAddArguments) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } + VerifyOrReturn(err == CHIP_NO_ERROR, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, TestClusterCluster, testEmitTestEventRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject arg2, jobject arg3, + jobject timedInvokeTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster; + + chip::app::Clusters::TestCluster::Commands::TestEmitTestEventRequest::Type request; + + request.arg1 = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(arg1)); + request.arg2 = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(arg2)); + request.arg3 = static_cast(chip::JniReferences::GetInstance().BooleanToPrimitive(arg3)); + + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + VerifyOrReturn(onFailure.get() != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + + cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -18647,7 +20339,7 @@ JNI_METHOD(void, TestClusterCluster, testAddArguments) onFailure.release(); } JNI_METHOD(void, TestClusterCluster, testEnumsRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject arg2) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject arg2, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18679,7 +20371,15 @@ JNI_METHOD(void, TestClusterCluster, testEnumsRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -18688,7 +20388,7 @@ JNI_METHOD(void, TestClusterCluster, testEnumsRequest) onFailure.release(); } JNI_METHOD(void, TestClusterCluster, testListInt8UArgumentRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18719,7 +20419,15 @@ JNI_METHOD(void, TestClusterCluster, testListInt8UArgumentRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -18728,7 +20436,7 @@ JNI_METHOD(void, TestClusterCluster, testListInt8UArgumentRequest) onFailure.release(); } JNI_METHOD(void, TestClusterCluster, testListInt8UReverseRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18760,7 +20468,15 @@ JNI_METHOD(void, TestClusterCluster, testListInt8UReverseRequest) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -18770,7 +20486,7 @@ JNI_METHOD(void, TestClusterCluster, testListInt8UReverseRequest) } JNI_METHOD(void, TestClusterCluster, testListNestedStructListArgumentRequest) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jobject d, jobject e, - jbyteArray f, jobject g) + jbyteArray f, jobject g, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18801,7 +20517,15 @@ JNI_METHOD(void, TestClusterCluster, testListNestedStructListArgumentRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -18811,7 +20535,7 @@ JNI_METHOD(void, TestClusterCluster, testListNestedStructListArgumentRequest) } JNI_METHOD(void, TestClusterCluster, testListStructArgumentRequest) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jbyteArray d, jstring e, - jobject f, jobject g, jobject h) + jobject f, jobject g, jobject h, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18842,7 +20566,15 @@ JNI_METHOD(void, TestClusterCluster, testListStructArgumentRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -18851,7 +20583,7 @@ JNI_METHOD(void, TestClusterCluster, testListStructArgumentRequest) onFailure.release(); } JNI_METHOD(void, TestClusterCluster, testNestedStructArgumentRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18882,7 +20614,15 @@ JNI_METHOD(void, TestClusterCluster, testNestedStructArgumentRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -18892,7 +20632,7 @@ JNI_METHOD(void, TestClusterCluster, testNestedStructArgumentRequest) } JNI_METHOD(void, TestClusterCluster, testNestedStructListArgumentRequest) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jobject d, jobject e, - jbyteArray f, jobject g) + jbyteArray f, jobject g, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18923,7 +20663,15 @@ JNI_METHOD(void, TestClusterCluster, testNestedStructListArgumentRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -18931,7 +20679,8 @@ JNI_METHOD(void, TestClusterCluster, testNestedStructListArgumentRequest) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, testNotHandled)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, TestClusterCluster, testNotHandled) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18958,7 +20707,15 @@ JNI_METHOD(void, TestClusterCluster, testNotHandled)(JNIEnv * env, jobject self, auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -18967,7 +20724,7 @@ JNI_METHOD(void, TestClusterCluster, testNotHandled)(JNIEnv * env, jobject self, onFailure.release(); } JNI_METHOD(void, TestClusterCluster, testNullableOptionalRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19006,7 +20763,15 @@ JNI_METHOD(void, TestClusterCluster, testNullableOptionalRequest) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -19015,7 +20780,7 @@ JNI_METHOD(void, TestClusterCluster, testNullableOptionalRequest) onFailure.release(); } JNI_METHOD(void, TestClusterCluster, testSimpleOptionalArgumentRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19046,7 +20811,15 @@ JNI_METHOD(void, TestClusterCluster, testSimpleOptionalArgumentRequest) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -19054,7 +20827,8 @@ JNI_METHOD(void, TestClusterCluster, testSimpleOptionalArgumentRequest) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, testSpecific)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, TestClusterCluster, testSpecific) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19084,7 +20858,15 @@ JNI_METHOD(void, TestClusterCluster, testSpecific)(JNIEnv * env, jobject self, j chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -19094,7 +20876,7 @@ JNI_METHOD(void, TestClusterCluster, testSpecific)(JNIEnv * env, jobject self, j } JNI_METHOD(void, TestClusterCluster, testStructArgumentRequest) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jbyteArray d, jstring e, - jobject f, jobject g, jobject h) + jobject f, jobject g, jobject h, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19125,7 +20907,15 @@ JNI_METHOD(void, TestClusterCluster, testStructArgumentRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -19133,7 +20923,8 @@ JNI_METHOD(void, TestClusterCluster, testStructArgumentRequest) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, testUnknownCommand)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, TestClusterCluster, testUnknownCommand) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19160,7 +20951,15 @@ JNI_METHOD(void, TestClusterCluster, testUnknownCommand)(JNIEnv * env, jobject s auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -19168,7 +20967,8 @@ JNI_METHOD(void, TestClusterCluster, testUnknownCommand)(JNIEnv * env, jobject s onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, timedInvokeRequest)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, TestClusterCluster, timedInvokeRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19195,7 +20995,8 @@ JNI_METHOD(void, TestClusterCluster, timedInvokeRequest)(JNIEnv * env, jobject s auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, 10000); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -19205,7 +21006,7 @@ JNI_METHOD(void, TestClusterCluster, timedInvokeRequest)(JNIEnv * env, jobject s } JNI_METHOD(void, TestClusterCluster, writeBooleanAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Boolean::TypeInfo; @@ -19233,7 +21034,16 @@ JNI_METHOD(void, TestClusterCluster, writeBooleanAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -19280,7 +21090,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeBooleanAttribute) } JNI_METHOD(void, TestClusterCluster, writeBitmap8Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap8::TypeInfo; @@ -19308,7 +21118,16 @@ JNI_METHOD(void, TestClusterCluster, writeBitmap8Attribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -19355,7 +21174,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeBitmap8Attribute) } JNI_METHOD(void, TestClusterCluster, writeBitmap16Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap16::TypeInfo; @@ -19383,7 +21202,16 @@ JNI_METHOD(void, TestClusterCluster, writeBitmap16Attribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -19430,7 +21258,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeBitmap16Attribute) } JNI_METHOD(void, TestClusterCluster, writeBitmap32Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap32::TypeInfo; @@ -19458,7 +21286,16 @@ JNI_METHOD(void, TestClusterCluster, writeBitmap32Attribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -19505,7 +21342,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeBitmap32Attribute) } JNI_METHOD(void, TestClusterCluster, writeBitmap64Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap64::TypeInfo; @@ -19533,7 +21370,16 @@ JNI_METHOD(void, TestClusterCluster, writeBitmap64Attribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -19580,7 +21426,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeBitmap64Attribute) } JNI_METHOD(void, TestClusterCluster, writeInt8uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int8u::TypeInfo; @@ -19608,7 +21454,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt8uAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -19655,7 +21510,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt8uAttribute) } JNI_METHOD(void, TestClusterCluster, writeInt16uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int16u::TypeInfo; @@ -19683,7 +21538,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt16uAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -19730,7 +21594,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt16uAttribute) } JNI_METHOD(void, TestClusterCluster, writeInt24uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int24u::TypeInfo; @@ -19758,7 +21622,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt24uAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -19805,7 +21678,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt24uAttribute) } JNI_METHOD(void, TestClusterCluster, writeInt32uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int32u::TypeInfo; @@ -19833,7 +21706,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt32uAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -19880,7 +21762,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt32uAttribute) } JNI_METHOD(void, TestClusterCluster, writeInt40uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int40u::TypeInfo; @@ -19908,7 +21790,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt40uAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -19955,7 +21846,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt40uAttribute) } JNI_METHOD(void, TestClusterCluster, writeInt48uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int48u::TypeInfo; @@ -19983,7 +21874,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt48uAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -20030,7 +21930,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt48uAttribute) } JNI_METHOD(void, TestClusterCluster, writeInt56uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int56u::TypeInfo; @@ -20058,7 +21958,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt56uAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -20105,7 +22014,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt56uAttribute) } JNI_METHOD(void, TestClusterCluster, writeInt64uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int64u::TypeInfo; @@ -20133,7 +22042,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt64uAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -20180,7 +22098,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt64uAttribute) } JNI_METHOD(void, TestClusterCluster, writeInt8sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int8s::TypeInfo; @@ -20208,7 +22126,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt8sAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -20255,7 +22182,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt8sAttribute) } JNI_METHOD(void, TestClusterCluster, writeInt16sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int16s::TypeInfo; @@ -20283,7 +22210,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt16sAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -20330,7 +22266,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt16sAttribute) } JNI_METHOD(void, TestClusterCluster, writeInt24sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int24s::TypeInfo; @@ -20358,7 +22294,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt24sAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -20405,7 +22350,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt24sAttribute) } JNI_METHOD(void, TestClusterCluster, writeInt32sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int32s::TypeInfo; @@ -20433,7 +22378,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt32sAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -20480,7 +22434,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt32sAttribute) } JNI_METHOD(void, TestClusterCluster, writeInt40sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int40s::TypeInfo; @@ -20508,7 +22462,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt40sAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -20555,7 +22518,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt40sAttribute) } JNI_METHOD(void, TestClusterCluster, writeInt48sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int48s::TypeInfo; @@ -20583,7 +22546,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt48sAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -20630,7 +22602,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt48sAttribute) } JNI_METHOD(void, TestClusterCluster, writeInt56sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int56s::TypeInfo; @@ -20658,7 +22630,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt56sAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -20705,7 +22686,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt56sAttribute) } JNI_METHOD(void, TestClusterCluster, writeInt64sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int64s::TypeInfo; @@ -20733,7 +22714,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt64sAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -20780,7 +22770,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt64sAttribute) } JNI_METHOD(void, TestClusterCluster, writeEnum8Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Enum8::TypeInfo; @@ -20808,7 +22798,16 @@ JNI_METHOD(void, TestClusterCluster, writeEnum8Attribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -20855,7 +22854,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeEnum8Attribute) } JNI_METHOD(void, TestClusterCluster, writeEnum16Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Enum16::TypeInfo; @@ -20883,7 +22882,16 @@ JNI_METHOD(void, TestClusterCluster, writeEnum16Attribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -20930,7 +22938,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeEnum16Attribute) } JNI_METHOD(void, TestClusterCluster, writeFloatSingleAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::FloatSingle::TypeInfo; @@ -20958,7 +22966,16 @@ JNI_METHOD(void, TestClusterCluster, writeFloatSingleAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -21005,7 +23022,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeFloatSingleAttribute) } JNI_METHOD(void, TestClusterCluster, writeFloatDoubleAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::FloatDouble::TypeInfo; @@ -21033,7 +23050,16 @@ JNI_METHOD(void, TestClusterCluster, writeFloatDoubleAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -21080,7 +23106,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeFloatDoubleAttribute) } JNI_METHOD(void, TestClusterCluster, writeOctetStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::OctetString::TypeInfo; @@ -21108,7 +23134,16 @@ JNI_METHOD(void, TestClusterCluster, writeOctetStringAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -21155,7 +23190,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeOctetStringAttribute) } JNI_METHOD(void, TestClusterCluster, writeLongOctetStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::LongOctetString::TypeInfo; @@ -21183,7 +23218,16 @@ JNI_METHOD(void, TestClusterCluster, writeLongOctetStringAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -21230,7 +23274,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeLongOctetStringAttribute) } JNI_METHOD(void, TestClusterCluster, writeCharStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::CharString::TypeInfo; @@ -21258,7 +23302,16 @@ JNI_METHOD(void, TestClusterCluster, writeCharStringAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -21305,7 +23358,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeCharStringAttribute) } JNI_METHOD(void, TestClusterCluster, writeLongCharStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::LongCharString::TypeInfo; @@ -21333,7 +23386,16 @@ JNI_METHOD(void, TestClusterCluster, writeLongCharStringAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -21380,7 +23442,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeLongCharStringAttribute) } JNI_METHOD(void, TestClusterCluster, writeEpochUsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::EpochUs::TypeInfo; @@ -21408,7 +23470,16 @@ JNI_METHOD(void, TestClusterCluster, writeEpochUsAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -21455,7 +23526,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeEpochUsAttribute) } JNI_METHOD(void, TestClusterCluster, writeEpochSAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::EpochS::TypeInfo; @@ -21483,7 +23554,16 @@ JNI_METHOD(void, TestClusterCluster, writeEpochSAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -21530,7 +23610,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeEpochSAttribute) } JNI_METHOD(void, TestClusterCluster, writeVendorIdAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::VendorId::TypeInfo; @@ -21558,7 +23638,16 @@ JNI_METHOD(void, TestClusterCluster, writeVendorIdAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -21606,7 +23695,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeVendorIdAttribute) } JNI_METHOD(void, TestClusterCluster, writeEnumAttrAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::EnumAttr::TypeInfo; @@ -21634,7 +23723,16 @@ JNI_METHOD(void, TestClusterCluster, writeEnumAttrAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -21681,7 +23779,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeEnumAttrAttribute) } JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt8uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; @@ -21709,7 +23807,16 @@ JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt8uAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -21756,7 +23863,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeRangeRestrictedInt8uAttribute) } JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt8sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; @@ -21784,7 +23891,16 @@ JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt8sAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -21831,7 +23947,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeRangeRestrictedInt8sAttribute) } JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt16uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; @@ -21859,7 +23975,16 @@ JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt16uAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -21906,7 +24031,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeRangeRestrictedInt16uAttribute) } JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt16sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; @@ -21934,7 +24059,16 @@ JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt16sAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -21981,7 +24115,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeRangeRestrictedInt16sAttribute) } JNI_METHOD(void, TestClusterCluster, writeTimedWriteBooleanAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::TimedWriteBoolean::TypeInfo; @@ -22009,7 +24143,9 @@ JNI_METHOD(void, TestClusterCluster, writeTimedWriteBooleanAttribute) 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, 10000); + + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -22019,7 +24155,7 @@ JNI_METHOD(void, TestClusterCluster, writeTimedWriteBooleanAttribute) } JNI_METHOD(void, TestClusterCluster, writeUnsupportedAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Unsupported::TypeInfo; @@ -22047,7 +24183,16 @@ JNI_METHOD(void, TestClusterCluster, writeUnsupportedAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -22094,7 +24239,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeUnsupportedAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableBooleanAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBoolean::TypeInfo; @@ -22127,7 +24272,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableBooleanAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -22175,7 +24329,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableBooleanAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableBitmap8Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap8::TypeInfo; @@ -22208,7 +24362,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableBitmap8Attribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -22256,7 +24419,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableBitmap8Attribute) } JNI_METHOD(void, TestClusterCluster, writeNullableBitmap16Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap16::TypeInfo; @@ -22289,7 +24452,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableBitmap16Attribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -22337,7 +24509,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableBitmap16Attribute) } JNI_METHOD(void, TestClusterCluster, writeNullableBitmap32Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap32::TypeInfo; @@ -22370,7 +24542,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableBitmap32Attribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -22418,7 +24599,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableBitmap32Attribute) } JNI_METHOD(void, TestClusterCluster, writeNullableBitmap64Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap64::TypeInfo; @@ -22451,7 +24632,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableBitmap64Attribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -22499,7 +24689,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableBitmap64Attribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt8uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt8u::TypeInfo; @@ -22532,7 +24722,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt8uAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -22580,7 +24779,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt8uAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt16uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt16u::TypeInfo; @@ -22613,7 +24812,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt16uAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -22661,7 +24869,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt16uAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt24uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt24u::TypeInfo; @@ -22694,7 +24902,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt24uAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -22742,7 +24959,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt24uAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt32uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt32u::TypeInfo; @@ -22775,7 +24992,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt32uAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -22823,7 +25049,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt32uAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt40uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt40u::TypeInfo; @@ -22856,7 +25082,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt40uAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -22904,7 +25139,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt40uAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt48uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt48u::TypeInfo; @@ -22937,7 +25172,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt48uAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -22985,7 +25229,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt48uAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt56uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt56u::TypeInfo; @@ -23018,7 +25262,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt56uAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -23066,7 +25319,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt56uAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt64uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt64u::TypeInfo; @@ -23099,7 +25352,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt64uAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -23147,7 +25409,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt64uAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt8sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt8s::TypeInfo; @@ -23180,7 +25442,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt8sAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -23228,7 +25499,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt8sAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt16sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt16s::TypeInfo; @@ -23261,7 +25532,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt16sAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -23309,7 +25589,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt16sAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt24sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt24s::TypeInfo; @@ -23342,7 +25622,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt24sAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -23390,7 +25679,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt24sAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt32sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt32s::TypeInfo; @@ -23423,7 +25712,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt32sAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -23471,7 +25769,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt32sAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt40sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt40s::TypeInfo; @@ -23504,7 +25802,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt40sAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -23552,7 +25859,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt40sAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt48sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt48s::TypeInfo; @@ -23585,7 +25892,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt48sAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -23633,7 +25949,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt48sAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt56sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt56s::TypeInfo; @@ -23666,7 +25982,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt56sAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -23714,7 +26039,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt56sAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt64sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt64s::TypeInfo; @@ -23747,7 +26072,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt64sAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -23795,7 +26129,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt64sAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableEnum8Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableEnum8::TypeInfo; @@ -23828,7 +26162,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableEnum8Attribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -23876,7 +26219,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableEnum8Attribute) } JNI_METHOD(void, TestClusterCluster, writeNullableEnum16Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableEnum16::TypeInfo; @@ -23909,7 +26252,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableEnum16Attribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -23957,7 +26309,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableEnum16Attribute) } JNI_METHOD(void, TestClusterCluster, writeNullableFloatSingleAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableFloatSingle::TypeInfo; @@ -23990,7 +26342,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableFloatSingleAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -24039,7 +26400,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableFloatSingleAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableFloatDoubleAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableFloatDouble::TypeInfo; @@ -24072,7 +26433,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableFloatDoubleAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -24121,7 +26491,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableFloatDoubleAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableOctetStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableOctetString::TypeInfo; @@ -24155,7 +26525,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableOctetStringAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -24204,7 +26583,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableOctetStringAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableCharStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableCharString::TypeInfo; @@ -24238,7 +26617,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableCharStringAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -24287,7 +26675,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableCharStringAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableEnumAttrAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableEnumAttr::TypeInfo; @@ -24321,7 +26709,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableEnumAttrAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -24369,7 +26766,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableEnumAttrAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt8uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; @@ -24402,7 +26799,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt8uAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -24453,7 +26859,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableRangeRestrictedInt8uAttrib } JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt8sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; @@ -24486,7 +26892,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt8sAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -24537,7 +26952,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableRangeRestrictedInt8sAttrib } JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt16uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; @@ -24570,7 +26985,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt16uAttribute 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -24621,7 +27045,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableRangeRestrictedInt16uAttri } JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt16sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; @@ -24654,7 +27078,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt16sAttribute 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -24749,7 +27182,8 @@ JNI_METHOD(jlong, ThermostatCluster, initWithDevice)(JNIEnv * env, jobject self, return reinterpret_cast(cppCluster); } -JNI_METHOD(void, ThermostatCluster, clearWeeklySchedule)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, ThermostatCluster, clearWeeklySchedule) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24776,7 +27210,15 @@ JNI_METHOD(void, ThermostatCluster, clearWeeklySchedule)(JNIEnv * env, jobject s auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -24784,7 +27226,8 @@ JNI_METHOD(void, ThermostatCluster, clearWeeklySchedule)(JNIEnv * env, jobject s onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ThermostatCluster, getRelayStatusLog)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, ThermostatCluster, getRelayStatusLog) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24814,7 +27257,15 @@ JNI_METHOD(void, ThermostatCluster, getRelayStatusLog)(JNIEnv * env, jobject sel chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -24823,7 +27274,8 @@ JNI_METHOD(void, ThermostatCluster, getRelayStatusLog)(JNIEnv * env, jobject sel onFailure.release(); } JNI_METHOD(void, ThermostatCluster, getWeeklySchedule) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject daysToReturn, jobject modeToReturn) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject daysToReturn, jobject modeToReturn, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24858,7 +27310,15 @@ JNI_METHOD(void, ThermostatCluster, getWeeklySchedule) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -24868,7 +27328,7 @@ JNI_METHOD(void, ThermostatCluster, getWeeklySchedule) } JNI_METHOD(void, ThermostatCluster, setWeeklySchedule) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject numberOfTransitionsForSequence, - jobject dayOfWeekForSequence, jobject modeForSequence, jobject payload) + jobject dayOfWeekForSequence, jobject modeForSequence, jobject payload, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24903,7 +27363,15 @@ JNI_METHOD(void, ThermostatCluster, setWeeklySchedule) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -24912,7 +27380,7 @@ JNI_METHOD(void, ThermostatCluster, setWeeklySchedule) onFailure.release(); } JNI_METHOD(void, ThermostatCluster, setpointRaiseLower) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject mode, jobject amount) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject mode, jobject amount, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24942,7 +27410,15 @@ JNI_METHOD(void, ThermostatCluster, setpointRaiseLower) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -25137,7 +27613,7 @@ JNI_METHOD(void, ThermostatCluster, subscribeAbsMaxCoolSetpointLimitAttribute) } JNI_METHOD(void, ThermostatCluster, writeOccupiedCoolingSetpointAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; @@ -25165,7 +27641,16 @@ JNI_METHOD(void, ThermostatCluster, writeOccupiedCoolingSetpointAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -25212,7 +27697,7 @@ JNI_METHOD(void, ThermostatCluster, subscribeOccupiedCoolingSetpointAttribute) } JNI_METHOD(void, ThermostatCluster, writeOccupiedHeatingSetpointAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; @@ -25240,7 +27725,16 @@ JNI_METHOD(void, ThermostatCluster, writeOccupiedHeatingSetpointAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -25287,7 +27781,7 @@ JNI_METHOD(void, ThermostatCluster, subscribeOccupiedHeatingSetpointAttribute) } JNI_METHOD(void, ThermostatCluster, writeMinHeatSetpointLimitAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; @@ -25315,7 +27809,16 @@ JNI_METHOD(void, ThermostatCluster, writeMinHeatSetpointLimitAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -25362,7 +27865,7 @@ JNI_METHOD(void, ThermostatCluster, subscribeMinHeatSetpointLimitAttribute) } JNI_METHOD(void, ThermostatCluster, writeMaxHeatSetpointLimitAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; @@ -25390,7 +27893,16 @@ JNI_METHOD(void, ThermostatCluster, writeMaxHeatSetpointLimitAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -25437,7 +27949,7 @@ JNI_METHOD(void, ThermostatCluster, subscribeMaxHeatSetpointLimitAttribute) } JNI_METHOD(void, ThermostatCluster, writeMinCoolSetpointLimitAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; @@ -25465,7 +27977,16 @@ JNI_METHOD(void, ThermostatCluster, writeMinCoolSetpointLimitAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -25512,7 +28033,7 @@ JNI_METHOD(void, ThermostatCluster, subscribeMinCoolSetpointLimitAttribute) } JNI_METHOD(void, ThermostatCluster, writeMaxCoolSetpointLimitAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; @@ -25540,7 +28061,16 @@ JNI_METHOD(void, ThermostatCluster, writeMaxCoolSetpointLimitAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -25587,7 +28117,7 @@ JNI_METHOD(void, ThermostatCluster, subscribeMaxCoolSetpointLimitAttribute) } JNI_METHOD(void, ThermostatCluster, writeMinSetpointDeadBandAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; @@ -25615,7 +28145,16 @@ JNI_METHOD(void, ThermostatCluster, writeMinSetpointDeadBandAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -25662,7 +28201,7 @@ JNI_METHOD(void, ThermostatCluster, subscribeMinSetpointDeadBandAttribute) } JNI_METHOD(void, ThermostatCluster, writeControlSequenceOfOperationAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; @@ -25690,7 +28229,16 @@ JNI_METHOD(void, ThermostatCluster, writeControlSequenceOfOperationAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -25737,7 +28285,7 @@ JNI_METHOD(void, ThermostatCluster, subscribeControlSequenceOfOperationAttribute } JNI_METHOD(void, ThermostatCluster, writeSystemModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::Thermostat::Attributes::SystemMode::TypeInfo; @@ -25765,7 +28313,16 @@ JNI_METHOD(void, ThermostatCluster, writeSystemModeAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -26006,7 +28563,7 @@ JNI_METHOD(jlong, ThermostatUserInterfaceConfigurationCluster, initWithDevice) } JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, writeTemperatureDisplayModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; @@ -26035,7 +28592,16 @@ JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, writeTemperatureDi 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -26084,7 +28650,7 @@ JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, subscribeTemperatu } JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, writeKeypadLockoutAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; @@ -26113,7 +28679,16 @@ JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, writeKeypadLockout 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -26162,7 +28737,7 @@ JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, subscribeKeypadLoc } JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, writeScheduleProgrammingVisibilityAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; @@ -26191,7 +28766,16 @@ JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, writeScheduleProgr 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -26285,7 +28869,8 @@ JNI_METHOD(jlong, ThreadNetworkDiagnosticsCluster, initWithDevice)(JNIEnv * env, return reinterpret_cast(cppCluster); } -JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, resetCounts)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, resetCounts) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26312,7 +28897,15 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, resetCounts)(JNIEnv * env, job auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -28643,7 +31236,8 @@ JNI_METHOD(jlong, WiFiNetworkDiagnosticsCluster, initWithDevice)(JNIEnv * env, j return reinterpret_cast(cppCluster); } -JNI_METHOD(void, WiFiNetworkDiagnosticsCluster, resetCounts)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, WiFiNetworkDiagnosticsCluster, resetCounts) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28670,7 +31264,15 @@ JNI_METHOD(void, WiFiNetworkDiagnosticsCluster, resetCounts)(JNIEnv * env, jobje auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -29211,7 +31813,8 @@ JNI_METHOD(jlong, WindowCoveringCluster, initWithDevice)(JNIEnv * env, jobject s return reinterpret_cast(cppCluster); } -JNI_METHOD(void, WindowCoveringCluster, downOrClose)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, WindowCoveringCluster, downOrClose) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29238,7 +31841,15 @@ JNI_METHOD(void, WindowCoveringCluster, downOrClose)(JNIEnv * env, jobject self, auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -29247,7 +31858,8 @@ JNI_METHOD(void, WindowCoveringCluster, downOrClose)(JNIEnv * env, jobject self, onFailure.release(); } JNI_METHOD(void, WindowCoveringCluster, goToLiftPercentage) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject liftPercentageValue, jobject liftPercent100thsValue) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject liftPercentageValue, jobject liftPercent100thsValue, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29279,7 +31891,15 @@ JNI_METHOD(void, WindowCoveringCluster, goToLiftPercentage) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -29288,7 +31908,7 @@ JNI_METHOD(void, WindowCoveringCluster, goToLiftPercentage) onFailure.release(); } JNI_METHOD(void, WindowCoveringCluster, goToLiftValue) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject liftValue) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject liftValue, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29317,7 +31937,15 @@ JNI_METHOD(void, WindowCoveringCluster, goToLiftValue) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -29326,7 +31954,8 @@ JNI_METHOD(void, WindowCoveringCluster, goToLiftValue) onFailure.release(); } JNI_METHOD(void, WindowCoveringCluster, goToTiltPercentage) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject tiltPercentageValue, jobject tiltPercent100thsValue) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject tiltPercentageValue, jobject tiltPercent100thsValue, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29358,7 +31987,15 @@ JNI_METHOD(void, WindowCoveringCluster, goToTiltPercentage) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -29367,7 +32004,7 @@ JNI_METHOD(void, WindowCoveringCluster, goToTiltPercentage) onFailure.release(); } JNI_METHOD(void, WindowCoveringCluster, goToTiltValue) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject tiltValue) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject tiltValue, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29396,7 +32033,15 @@ JNI_METHOD(void, WindowCoveringCluster, goToTiltValue) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -29404,7 +32049,8 @@ JNI_METHOD(void, WindowCoveringCluster, goToTiltValue) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, WindowCoveringCluster, stopMotion)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, WindowCoveringCluster, stopMotion) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29431,7 +32077,15 @@ JNI_METHOD(void, WindowCoveringCluster, stopMotion)(JNIEnv * env, jobject self, auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -29439,7 +32093,8 @@ JNI_METHOD(void, WindowCoveringCluster, stopMotion)(JNIEnv * env, jobject self, onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, WindowCoveringCluster, upOrOpen)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, WindowCoveringCluster, upOrOpen) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29466,7 +32121,15 @@ JNI_METHOD(void, WindowCoveringCluster, upOrOpen)(JNIEnv * env, jobject self, jl auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -30098,7 +32761,7 @@ JNI_METHOD(void, WindowCoveringCluster, subscribeInstalledClosedLimitTiltAttribu } JNI_METHOD(void, WindowCoveringCluster, writeModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::WindowCovering::Attributes::Mode::TypeInfo; @@ -30126,7 +32789,16 @@ JNI_METHOD(void, WindowCoveringCluster, writeModeAttribute) 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); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); diff --git a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp index 9aa754e40fb606..35059ef7947460 100644 --- a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp @@ -8695,6 +8695,83 @@ JNI_METHOD(void, LevelControlCluster, readClusterRevisionAttribute)(JNIEnv * env onFailure.release(); } +JNI_METHOD(void, LocalizationConfigurationCluster, readActiveLocaleAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::LocalizationConfiguration::Attributes::ActiveLocale::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::LocalizationConfigurationCluster * 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, LocalizationConfigurationCluster, readSupportedLocalesAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::LocalizationConfiguration::Attributes::SupportedLocales::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::LocalizationConfigurationCluster * 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, LowPowerCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp index 20f677bc24e216..ba3e43d7e1653e 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -2828,6 +2828,68 @@ void CHIPTestClusterClusterTestAddArgumentsResponseCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, returnValue); } +CHIPTestClusterClusterTestEmitTestEventResponseCallback::CHIPTestClusterClusterTestEmitTestEventResponseCallback( + jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = 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"); + } +} + +CHIPTestClusterClusterTestEmitTestEventResponseCallback::~CHIPTestClusterClusterTestEmitTestEventResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPTestClusterClusterTestEmitTestEventResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject value; + + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + dataResponse.value, value); + + env->CallVoidMethod(javaCallbackRef, javaMethod, value); +} CHIPTestClusterClusterTestEnumsResponseCallback::CHIPTestClusterClusterTestEnumsResponseCallback(jobject javaCallback) : Callback::Callback(CallbackFn, this) { diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h index 79fade03a2f5f6..43e6b2fb38c7d6 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h @@ -595,6 +595,21 @@ class CHIPTestClusterClusterTestAddArgumentsResponseCallback jobject javaCallbackRef; }; +class CHIPTestClusterClusterTestEmitTestEventResponseCallback + : public Callback::Callback +{ +public: + CHIPTestClusterClusterTestEmitTestEventResponseCallback(jobject javaCallback); + + ~CHIPTestClusterClusterTestEmitTestEventResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + class CHIPTestClusterClusterTestEnumsResponseCallback : public Callback::Callback { diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index b94fe8f896d4f6..d601ecc1a90fc6 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -6623,6 +6623,93 @@ void CHIPLevelControlAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } +CHIPLocalizationConfigurationSupportedLocalesAttributeCallback::CHIPLocalizationConfigurationSupportedLocalesAttributeCallback( + 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"); + } +} + +CHIPLocalizationConfigurationSupportedLocalesAttributeCallback::~CHIPLocalizationConfigurationSupportedLocalesAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPLocalizationConfigurationSupportedLocalesAttributeCallback::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; + chip::CharSpan entryValue = entry; + + jstring entryObject = nullptr; + chip::UtfString entryStr(env, entryValue); + if (!entryNull) + { + entryObject = jstring(entryStr.jniValue()); + } + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding SupportedLocalesAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + CHIPLowPowerAttributeListAttributeCallback::CHIPLowPowerAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index e8318d9d36a451..63517b51228b9f 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -2336,6 +2336,36 @@ class CHIPLevelControlAttributeListAttributeCallback bool keepAlive; }; +class CHIPLocalizationConfigurationSupportedLocalesAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPLocalizationConfigurationSupportedLocalesAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPLocalizationConfigurationSupportedLocalesAttributeCallback(); + + static void maybeDestroy(CHIPLocalizationConfigurationSupportedLocalesAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + class CHIPLowPowerAttributeListAttributeCallback : 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 20ff51cc26ce34..685d6d85a0eb2f 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -113,14 +113,12 @@ protected void finalize() throws Throwable { } public static class AccessControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 31L; + public AccessControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("31"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -231,41 +229,56 @@ private native void readClusterRevisionAttribute( } public static class AccountLoginCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1294L; + public AccountLoginCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1294"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); public void getSetupPINRequest( - GetSetupPINResponseCallback callback, String tempAccountIdentifier) { - getSetupPINRequest(chipClusterPtr, callback, tempAccountIdentifier); + GetSetupPINResponseCallback callback, + String tempAccountIdentifier, + int timedInvokeTimeoutMs) { + getSetupPINRequest(chipClusterPtr, callback, tempAccountIdentifier, timedInvokeTimeoutMs); } public void loginRequest( DefaultClusterCallback callback, String tempAccountIdentifier, String setupPIN) { - loginRequest(chipClusterPtr, callback, tempAccountIdentifier, setupPIN); + loginRequest(chipClusterPtr, callback, tempAccountIdentifier, setupPIN, null); + } + + public void loginRequest( + DefaultClusterCallback callback, + String tempAccountIdentifier, + String setupPIN, + int timedInvokeTimeoutMs) { + loginRequest(chipClusterPtr, callback, tempAccountIdentifier, setupPIN, timedInvokeTimeoutMs); } - public void logoutRequest(DefaultClusterCallback callback) { - logoutRequest(chipClusterPtr, callback); + public void logoutRequest(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + logoutRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } private native void getSetupPINRequest( - long chipClusterPtr, GetSetupPINResponseCallback Callback, String tempAccountIdentifier); + long chipClusterPtr, + GetSetupPINResponseCallback Callback, + String tempAccountIdentifier, + @Nullable Integer timedInvokeTimeoutMs); private native void loginRequest( long chipClusterPtr, DefaultClusterCallback Callback, String tempAccountIdentifier, - String setupPIN); + String setupPIN, + @Nullable Integer timedInvokeTimeoutMs); - private native void logoutRequest(long chipClusterPtr, DefaultClusterCallback Callback); + private native void logoutRequest( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); public interface GetSetupPINResponseCallback { void onSuccess(String setupPIN); @@ -305,20 +318,24 @@ private native void subscribeClusterRevisionAttribute( } public static class AdministratorCommissioningCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 60L; + public AdministratorCommissioningCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("60"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); public void openBasicCommissioningWindow( DefaultClusterCallback callback, Integer commissioningTimeout) { - openBasicCommissioningWindow(chipClusterPtr, callback, commissioningTimeout); + openBasicCommissioningWindow(chipClusterPtr, callback, commissioningTimeout, null); + } + + public void openBasicCommissioningWindow( + DefaultClusterCallback callback, Integer commissioningTimeout, int timedInvokeTimeoutMs) { + openBasicCommissioningWindow( + chipClusterPtr, callback, commissioningTimeout, timedInvokeTimeoutMs); } public void openCommissioningWindow( @@ -337,15 +354,44 @@ public void openCommissioningWindow( discriminator, iterations, salt, - passcodeID); + passcodeID, + null); + } + + public void openCommissioningWindow( + DefaultClusterCallback callback, + Integer commissioningTimeout, + byte[] PAKEVerifier, + Integer discriminator, + Long iterations, + byte[] salt, + Integer passcodeID, + int timedInvokeTimeoutMs) { + openCommissioningWindow( + chipClusterPtr, + callback, + commissioningTimeout, + PAKEVerifier, + discriminator, + iterations, + salt, + passcodeID, + timedInvokeTimeoutMs); } public void revokeCommissioning(DefaultClusterCallback callback) { - revokeCommissioning(chipClusterPtr, callback); + revokeCommissioning(chipClusterPtr, callback, null); + } + + public void revokeCommissioning(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + revokeCommissioning(chipClusterPtr, callback, timedInvokeTimeoutMs); } private native void openBasicCommissioningWindow( - long chipClusterPtr, DefaultClusterCallback Callback, Integer commissioningTimeout); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer commissioningTimeout, + @Nullable Integer timedInvokeTimeoutMs); private native void openCommissioningWindow( long chipClusterPtr, @@ -355,9 +401,13 @@ private native void openCommissioningWindow( Integer discriminator, Long iterations, byte[] salt, - Integer passcodeID); + Integer passcodeID, + @Nullable Integer timedInvokeTimeoutMs); - private native void revokeCommissioning(long chipClusterPtr, DefaultClusterCallback Callback); + private native void revokeCommissioning( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); public interface AdminFabricIndexAttributeCallback { void onSuccess(Integer value); @@ -420,14 +470,12 @@ private native void subscribeClusterRevisionAttribute( } public static class ApplicationBasicCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1293L; + public ApplicationBasicCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1293"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -577,20 +625,27 @@ private native void subscribeClusterRevisionAttribute( } public static class ApplicationLauncherCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1292L; + public ApplicationLauncherCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1292"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); public void hideAppRequest( LauncherResponseCallback callback, Integer catalogVendorId, String applicationId) { - hideAppRequest(chipClusterPtr, callback, catalogVendorId, applicationId); + hideAppRequest(chipClusterPtr, callback, catalogVendorId, applicationId, null); + } + + public void hideAppRequest( + LauncherResponseCallback callback, + Integer catalogVendorId, + String applicationId, + int timedInvokeTimeoutMs) { + hideAppRequest( + chipClusterPtr, callback, catalogVendorId, applicationId, timedInvokeTimeoutMs); } public void launchAppRequest( @@ -598,32 +653,54 @@ public void launchAppRequest( String data, Integer catalogVendorId, String applicationId) { - launchAppRequest(chipClusterPtr, callback, data, catalogVendorId, applicationId); + launchAppRequest(chipClusterPtr, callback, data, catalogVendorId, applicationId, null); + } + + public void launchAppRequest( + LauncherResponseCallback callback, + String data, + Integer catalogVendorId, + String applicationId, + int timedInvokeTimeoutMs) { + launchAppRequest( + chipClusterPtr, callback, data, catalogVendorId, applicationId, timedInvokeTimeoutMs); } public void stopAppRequest( LauncherResponseCallback callback, Integer catalogVendorId, String applicationId) { - stopAppRequest(chipClusterPtr, callback, catalogVendorId, applicationId); + stopAppRequest(chipClusterPtr, callback, catalogVendorId, applicationId, null); + } + + public void stopAppRequest( + LauncherResponseCallback callback, + Integer catalogVendorId, + String applicationId, + int timedInvokeTimeoutMs) { + stopAppRequest( + chipClusterPtr, callback, catalogVendorId, applicationId, timedInvokeTimeoutMs); } private native void hideAppRequest( long chipClusterPtr, LauncherResponseCallback Callback, Integer catalogVendorId, - String applicationId); + String applicationId, + @Nullable Integer timedInvokeTimeoutMs); private native void launchAppRequest( long chipClusterPtr, LauncherResponseCallback Callback, String data, Integer catalogVendorId, - String applicationId); + String applicationId, + @Nullable Integer timedInvokeTimeoutMs); private native void stopAppRequest( long chipClusterPtr, LauncherResponseCallback Callback, Integer catalogVendorId, - String applicationId); + String applicationId, + @Nullable Integer timedInvokeTimeoutMs); public interface LauncherResponseCallback { void onSuccess(Integer status, String data); @@ -679,30 +756,45 @@ private native void subscribeClusterRevisionAttribute( } public static class AudioOutputCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1291L; + public AudioOutputCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1291"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); public void renameOutputRequest(DefaultClusterCallback callback, Integer index, String name) { - renameOutputRequest(chipClusterPtr, callback, index, name); + renameOutputRequest(chipClusterPtr, callback, index, name, null); + } + + public void renameOutputRequest( + DefaultClusterCallback callback, Integer index, String name, int timedInvokeTimeoutMs) { + renameOutputRequest(chipClusterPtr, callback, index, name, timedInvokeTimeoutMs); } public void selectOutputRequest(DefaultClusterCallback callback, Integer index) { - selectOutputRequest(chipClusterPtr, callback, index); + selectOutputRequest(chipClusterPtr, callback, index, null); + } + + public void selectOutputRequest( + DefaultClusterCallback callback, Integer index, int timedInvokeTimeoutMs) { + selectOutputRequest(chipClusterPtr, callback, index, timedInvokeTimeoutMs); } private native void renameOutputRequest( - long chipClusterPtr, DefaultClusterCallback Callback, Integer index, String name); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer index, + String name, + @Nullable Integer timedInvokeTimeoutMs); private native void selectOutputRequest( - long chipClusterPtr, DefaultClusterCallback Callback, Integer index); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer index, + @Nullable Integer timedInvokeTimeoutMs); public static class AudioOutputListAttribute { public Integer index; @@ -796,29 +888,42 @@ private native void subscribeClusterRevisionAttribute( } public static class BarrierControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 259L; + public BarrierControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("259"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); public void barrierControlGoToPercent(DefaultClusterCallback callback, Integer percentOpen) { - barrierControlGoToPercent(chipClusterPtr, callback, percentOpen); + barrierControlGoToPercent(chipClusterPtr, callback, percentOpen, null); + } + + public void barrierControlGoToPercent( + DefaultClusterCallback callback, Integer percentOpen, int timedInvokeTimeoutMs) { + barrierControlGoToPercent(chipClusterPtr, callback, percentOpen, timedInvokeTimeoutMs); } public void barrierControlStop(DefaultClusterCallback callback) { - barrierControlStop(chipClusterPtr, callback); + barrierControlStop(chipClusterPtr, callback, null); + } + + public void barrierControlStop(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + barrierControlStop(chipClusterPtr, callback, timedInvokeTimeoutMs); } private native void barrierControlGoToPercent( - long chipClusterPtr, DefaultClusterCallback Callback, Integer percentOpen); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer percentOpen, + @Nullable Integer timedInvokeTimeoutMs); - private native void barrierControlStop(long chipClusterPtr, DefaultClusterCallback Callback); + private native void barrierControlStop( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); public interface AttributeListAttributeCallback { void onSuccess(List valueList); @@ -912,22 +1017,27 @@ private native void subscribeClusterRevisionAttribute( } public static class BasicCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 40L; + public BasicCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("40"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); public void mfgSpecificPing(DefaultClusterCallback callback) { - mfgSpecificPing(chipClusterPtr, callback); + mfgSpecificPing(chipClusterPtr, callback, null); + } + + public void mfgSpecificPing(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + mfgSpecificPing(chipClusterPtr, callback, timedInvokeTimeoutMs); } - private native void mfgSpecificPing(long chipClusterPtr, DefaultClusterCallback Callback); + private native void mfgSpecificPing( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); public interface VendorIDAttributeCallback { void onSuccess(Integer value); @@ -995,7 +1105,12 @@ public void readNodeLabelAttribute(CharStringAttributeCallback callback) { } public void writeNodeLabelAttribute(DefaultClusterCallback callback, String value) { - writeNodeLabelAttribute(chipClusterPtr, callback, value); + writeNodeLabelAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNodeLabelAttribute( + DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + writeNodeLabelAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNodeLabelAttribute( @@ -1008,7 +1123,12 @@ public void readLocationAttribute(CharStringAttributeCallback callback) { } public void writeLocationAttribute(DefaultClusterCallback callback, String value) { - writeLocationAttribute(chipClusterPtr, callback, value); + writeLocationAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLocationAttribute( + DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + writeLocationAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeLocationAttribute( @@ -1102,7 +1222,12 @@ public void readLocalConfigDisabledAttribute(BooleanAttributeCallback callback) } public void writeLocalConfigDisabledAttribute(DefaultClusterCallback callback, Boolean value) { - writeLocalConfigDisabledAttribute(chipClusterPtr, callback, value); + writeLocalConfigDisabledAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLocalConfigDisabledAttribute( + DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeLocalConfigDisabledAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeLocalConfigDisabledAttribute( @@ -1176,7 +1301,10 @@ private native void readNodeLabelAttribute( long chipClusterPtr, CharStringAttributeCallback callback); private native void writeNodeLabelAttribute( - long chipClusterPtr, DefaultClusterCallback callback, String value); + long chipClusterPtr, + DefaultClusterCallback callback, + String value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNodeLabelAttribute( long chipClusterPtr, @@ -1188,7 +1316,10 @@ private native void readLocationAttribute( long chipClusterPtr, CharStringAttributeCallback callback); private native void writeLocationAttribute( - long chipClusterPtr, DefaultClusterCallback callback, String value); + long chipClusterPtr, + DefaultClusterCallback callback, + String value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeLocationAttribute( long chipClusterPtr, @@ -1275,7 +1406,10 @@ private native void readLocalConfigDisabledAttribute( long chipClusterPtr, BooleanAttributeCallback callback); private native void writeLocalConfigDisabledAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Boolean value); + long chipClusterPtr, + DefaultClusterCallback callback, + Boolean value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeLocalConfigDisabledAttribute( long chipClusterPtr, BooleanAttributeCallback callback, int minInterval, int maxInterval); @@ -1300,14 +1434,12 @@ private native void subscribeClusterRevisionAttribute( } public static class BinaryInputBasicCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 15L; + public BinaryInputBasicCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("15"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -1324,7 +1456,12 @@ public void readOutOfServiceAttribute(BooleanAttributeCallback callback) { } public void writeOutOfServiceAttribute(DefaultClusterCallback callback, Boolean value) { - writeOutOfServiceAttribute(chipClusterPtr, callback, value); + writeOutOfServiceAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOutOfServiceAttribute( + DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeOutOfServiceAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeOutOfServiceAttribute( @@ -1337,7 +1474,12 @@ public void readPresentValueAttribute(BooleanAttributeCallback callback) { } public void writePresentValueAttribute(DefaultClusterCallback callback, Boolean value) { - writePresentValueAttribute(chipClusterPtr, callback, value); + writePresentValueAttribute(chipClusterPtr, callback, value, null); + } + + public void writePresentValueAttribute( + DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writePresentValueAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribePresentValueAttribute( @@ -1371,7 +1513,10 @@ private native void readOutOfServiceAttribute( long chipClusterPtr, BooleanAttributeCallback callback); private native void writeOutOfServiceAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Boolean value); + long chipClusterPtr, + DefaultClusterCallback callback, + Boolean value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeOutOfServiceAttribute( long chipClusterPtr, BooleanAttributeCallback callback, int minInterval, int maxInterval); @@ -1380,7 +1525,10 @@ private native void readPresentValueAttribute( long chipClusterPtr, BooleanAttributeCallback callback); private native void writePresentValueAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Boolean value); + long chipClusterPtr, + DefaultClusterCallback callback, + Boolean value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribePresentValueAttribute( long chipClusterPtr, BooleanAttributeCallback callback, int minInterval, int maxInterval); @@ -1402,14 +1550,12 @@ private native void subscribeClusterRevisionAttribute( } public static class BindingCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 30L; + public BindingCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("30"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -1419,7 +1565,17 @@ public void bind( Integer groupId, Integer endpointId, Long clusterId) { - bind(chipClusterPtr, callback, nodeId, groupId, endpointId, clusterId); + bind(chipClusterPtr, callback, nodeId, groupId, endpointId, clusterId, null); + } + + public void bind( + DefaultClusterCallback callback, + Long nodeId, + Integer groupId, + Integer endpointId, + Long clusterId, + int timedInvokeTimeoutMs) { + bind(chipClusterPtr, callback, nodeId, groupId, endpointId, clusterId, timedInvokeTimeoutMs); } public void unbind( @@ -1428,7 +1584,18 @@ public void unbind( Integer groupId, Integer endpointId, Long clusterId) { - unbind(chipClusterPtr, callback, nodeId, groupId, endpointId, clusterId); + unbind(chipClusterPtr, callback, nodeId, groupId, endpointId, clusterId, null); + } + + public void unbind( + DefaultClusterCallback callback, + Long nodeId, + Integer groupId, + Integer endpointId, + Long clusterId, + int timedInvokeTimeoutMs) { + unbind( + chipClusterPtr, callback, nodeId, groupId, endpointId, clusterId, timedInvokeTimeoutMs); } private native void bind( @@ -1437,7 +1604,8 @@ private native void bind( Long nodeId, Integer groupId, Integer endpointId, - Long clusterId); + Long clusterId, + @Nullable Integer timedInvokeTimeoutMs); private native void unbind( long chipClusterPtr, @@ -1445,7 +1613,8 @@ private native void unbind( Long nodeId, Integer groupId, Integer endpointId, - Long clusterId); + Long clusterId, + @Nullable Integer timedInvokeTimeoutMs); public interface AttributeListAttributeCallback { void onSuccess(List valueList); @@ -1479,14 +1648,12 @@ private native void subscribeClusterRevisionAttribute( } public static class BooleanStateCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 69L; + public BooleanStateCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("69"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -1537,40 +1704,82 @@ private native void subscribeClusterRevisionAttribute( } public static class BridgedActionsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 37L; + public BridgedActionsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("37"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); public void disableAction( DefaultClusterCallback callback, Integer actionID, Optional invokeID) { - disableAction(chipClusterPtr, callback, actionID, invokeID); + disableAction(chipClusterPtr, callback, actionID, invokeID, null); + } + + public void disableAction( + DefaultClusterCallback callback, + Integer actionID, + Optional invokeID, + int timedInvokeTimeoutMs) { + disableAction(chipClusterPtr, callback, actionID, invokeID, timedInvokeTimeoutMs); } public void disableActionWithDuration( DefaultClusterCallback callback, Integer actionID, Optional invokeID, Long duration) { - disableActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration); + disableActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration, null); + } + + public void disableActionWithDuration( + DefaultClusterCallback callback, + Integer actionID, + Optional invokeID, + Long duration, + int timedInvokeTimeoutMs) { + disableActionWithDuration( + chipClusterPtr, callback, actionID, invokeID, duration, timedInvokeTimeoutMs); } public void enableAction( DefaultClusterCallback callback, Integer actionID, Optional invokeID) { - enableAction(chipClusterPtr, callback, actionID, invokeID); + enableAction(chipClusterPtr, callback, actionID, invokeID, null); + } + + public void enableAction( + DefaultClusterCallback callback, + Integer actionID, + Optional invokeID, + int timedInvokeTimeoutMs) { + enableAction(chipClusterPtr, callback, actionID, invokeID, timedInvokeTimeoutMs); } public void enableActionWithDuration( DefaultClusterCallback callback, Integer actionID, Optional invokeID, Long duration) { - enableActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration); + enableActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration, null); + } + + public void enableActionWithDuration( + DefaultClusterCallback callback, + Integer actionID, + Optional invokeID, + Long duration, + int timedInvokeTimeoutMs) { + enableActionWithDuration( + chipClusterPtr, callback, actionID, invokeID, duration, timedInvokeTimeoutMs); } public void instantAction( DefaultClusterCallback callback, Integer actionID, Optional invokeID) { - instantAction(chipClusterPtr, callback, actionID, invokeID); + instantAction(chipClusterPtr, callback, actionID, invokeID, null); + } + + public void instantAction( + DefaultClusterCallback callback, + Integer actionID, + Optional invokeID, + int timedInvokeTimeoutMs) { + instantAction(chipClusterPtr, callback, actionID, invokeID, timedInvokeTimeoutMs); } public void instantActionWithTransition( @@ -1578,115 +1787,190 @@ public void instantActionWithTransition( Integer actionID, Optional invokeID, Integer transitionTime) { - instantActionWithTransition(chipClusterPtr, callback, actionID, invokeID, transitionTime); + instantActionWithTransition( + chipClusterPtr, callback, actionID, invokeID, transitionTime, null); + } + + public void instantActionWithTransition( + DefaultClusterCallback callback, + Integer actionID, + Optional invokeID, + Integer transitionTime, + int timedInvokeTimeoutMs) { + instantActionWithTransition( + chipClusterPtr, callback, actionID, invokeID, transitionTime, timedInvokeTimeoutMs); } public void pauseAction( DefaultClusterCallback callback, Integer actionID, Optional invokeID) { - pauseAction(chipClusterPtr, callback, actionID, invokeID); + pauseAction(chipClusterPtr, callback, actionID, invokeID, null); + } + + public void pauseAction( + DefaultClusterCallback callback, + Integer actionID, + Optional invokeID, + int timedInvokeTimeoutMs) { + pauseAction(chipClusterPtr, callback, actionID, invokeID, timedInvokeTimeoutMs); } public void pauseActionWithDuration( DefaultClusterCallback callback, Integer actionID, Optional invokeID, Long duration) { - pauseActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration); + pauseActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration, null); + } + + public void pauseActionWithDuration( + DefaultClusterCallback callback, + Integer actionID, + Optional invokeID, + Long duration, + int timedInvokeTimeoutMs) { + pauseActionWithDuration( + chipClusterPtr, callback, actionID, invokeID, duration, timedInvokeTimeoutMs); } public void resumeAction( DefaultClusterCallback callback, Integer actionID, Optional invokeID) { - resumeAction(chipClusterPtr, callback, actionID, invokeID); + resumeAction(chipClusterPtr, callback, actionID, invokeID, null); + } + + public void resumeAction( + DefaultClusterCallback callback, + Integer actionID, + Optional invokeID, + int timedInvokeTimeoutMs) { + resumeAction(chipClusterPtr, callback, actionID, invokeID, timedInvokeTimeoutMs); } public void startAction( DefaultClusterCallback callback, Integer actionID, Optional invokeID) { - startAction(chipClusterPtr, callback, actionID, invokeID); + startAction(chipClusterPtr, callback, actionID, invokeID, null); + } + + public void startAction( + DefaultClusterCallback callback, + Integer actionID, + Optional invokeID, + int timedInvokeTimeoutMs) { + startAction(chipClusterPtr, callback, actionID, invokeID, timedInvokeTimeoutMs); } public void startActionWithDuration( DefaultClusterCallback callback, Integer actionID, Optional invokeID, Long duration) { - startActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration); + startActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration, null); + } + + public void startActionWithDuration( + DefaultClusterCallback callback, + Integer actionID, + Optional invokeID, + Long duration, + int timedInvokeTimeoutMs) { + startActionWithDuration( + chipClusterPtr, callback, actionID, invokeID, duration, timedInvokeTimeoutMs); } public void stopAction( DefaultClusterCallback callback, Integer actionID, Optional invokeID) { - stopAction(chipClusterPtr, callback, actionID, invokeID); + stopAction(chipClusterPtr, callback, actionID, invokeID, null); + } + + public void stopAction( + DefaultClusterCallback callback, + Integer actionID, + Optional invokeID, + int timedInvokeTimeoutMs) { + stopAction(chipClusterPtr, callback, actionID, invokeID, timedInvokeTimeoutMs); } private native void disableAction( long chipClusterPtr, DefaultClusterCallback Callback, Integer actionID, - Optional invokeID); + Optional invokeID, + @Nullable Integer timedInvokeTimeoutMs); private native void disableActionWithDuration( long chipClusterPtr, DefaultClusterCallback Callback, Integer actionID, Optional invokeID, - Long duration); + Long duration, + @Nullable Integer timedInvokeTimeoutMs); private native void enableAction( long chipClusterPtr, DefaultClusterCallback Callback, Integer actionID, - Optional invokeID); + Optional invokeID, + @Nullable Integer timedInvokeTimeoutMs); private native void enableActionWithDuration( long chipClusterPtr, DefaultClusterCallback Callback, Integer actionID, Optional invokeID, - Long duration); + Long duration, + @Nullable Integer timedInvokeTimeoutMs); private native void instantAction( long chipClusterPtr, DefaultClusterCallback Callback, Integer actionID, - Optional invokeID); + Optional invokeID, + @Nullable Integer timedInvokeTimeoutMs); private native void instantActionWithTransition( long chipClusterPtr, DefaultClusterCallback Callback, Integer actionID, Optional invokeID, - Integer transitionTime); + Integer transitionTime, + @Nullable Integer timedInvokeTimeoutMs); private native void pauseAction( long chipClusterPtr, DefaultClusterCallback Callback, Integer actionID, - Optional invokeID); + Optional invokeID, + @Nullable Integer timedInvokeTimeoutMs); private native void pauseActionWithDuration( long chipClusterPtr, DefaultClusterCallback Callback, Integer actionID, Optional invokeID, - Long duration); + Long duration, + @Nullable Integer timedInvokeTimeoutMs); private native void resumeAction( long chipClusterPtr, DefaultClusterCallback Callback, Integer actionID, - Optional invokeID); + Optional invokeID, + @Nullable Integer timedInvokeTimeoutMs); private native void startAction( long chipClusterPtr, DefaultClusterCallback Callback, Integer actionID, - Optional invokeID); + Optional invokeID, + @Nullable Integer timedInvokeTimeoutMs); private native void startActionWithDuration( long chipClusterPtr, DefaultClusterCallback Callback, Integer actionID, Optional invokeID, - Long duration); + Long duration, + @Nullable Integer timedInvokeTimeoutMs); private native void stopAction( long chipClusterPtr, DefaultClusterCallback Callback, Integer actionID, - Optional invokeID); + Optional invokeID, + @Nullable Integer timedInvokeTimeoutMs); public static class ActionListAttribute { public Integer actionID; @@ -1852,14 +2136,12 @@ private native void subscribeClusterRevisionAttribute( } public static class BridgedDeviceBasicCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 57L; + public BridgedDeviceBasicCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("57"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -1895,41 +2177,65 @@ private native void subscribeClusterRevisionAttribute( } public static class ChannelCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1284L; + public ChannelCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1284"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); public void changeChannelByNumberRequest( DefaultClusterCallback callback, Integer majorNumber, Integer minorNumber) { - changeChannelByNumberRequest(chipClusterPtr, callback, majorNumber, minorNumber); + changeChannelByNumberRequest(chipClusterPtr, callback, majorNumber, minorNumber, null); + } + + public void changeChannelByNumberRequest( + DefaultClusterCallback callback, + Integer majorNumber, + Integer minorNumber, + int timedInvokeTimeoutMs) { + changeChannelByNumberRequest( + chipClusterPtr, callback, majorNumber, minorNumber, timedInvokeTimeoutMs); } public void changeChannelRequest(ChangeChannelResponseCallback callback, String match) { - changeChannelRequest(chipClusterPtr, callback, match); + changeChannelRequest(chipClusterPtr, callback, match, null); + } + + public void changeChannelRequest( + ChangeChannelResponseCallback callback, String match, int timedInvokeTimeoutMs) { + changeChannelRequest(chipClusterPtr, callback, match, timedInvokeTimeoutMs); } public void skipChannelRequest(DefaultClusterCallback callback, Integer count) { - skipChannelRequest(chipClusterPtr, callback, count); + skipChannelRequest(chipClusterPtr, callback, count, null); + } + + public void skipChannelRequest( + DefaultClusterCallback callback, Integer count, int timedInvokeTimeoutMs) { + skipChannelRequest(chipClusterPtr, callback, count, timedInvokeTimeoutMs); } private native void changeChannelByNumberRequest( long chipClusterPtr, DefaultClusterCallback Callback, Integer majorNumber, - Integer minorNumber); + Integer minorNumber, + @Nullable Integer timedInvokeTimeoutMs); private native void changeChannelRequest( - long chipClusterPtr, ChangeChannelResponseCallback Callback, String match); + long chipClusterPtr, + ChangeChannelResponseCallback Callback, + String match, + @Nullable Integer timedInvokeTimeoutMs); private native void skipChannelRequest( - long chipClusterPtr, DefaultClusterCallback Callback, Integer count); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer count, + @Nullable Integer timedInvokeTimeoutMs); public interface ChangeChannelResponseCallback { void onSuccess( // channelMatch: Struct ChannelInfo @@ -2033,14 +2339,12 @@ private native void subscribeClusterRevisionAttribute( } public static class ColorControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 768L; + public ColorControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("768"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -2062,17 +2366,58 @@ public void colorLoopSet( time, startHue, optionsMask, - optionsOverride); + optionsOverride, + null); } - public void enhancedMoveHue( + public void colorLoopSet( DefaultClusterCallback callback, - Integer moveMode, - Integer rate, - Integer optionsMask, - Integer optionsOverride) { - enhancedMoveHue(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride); - } + Integer updateFlags, + Integer action, + Integer direction, + Integer time, + Integer startHue, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + colorLoopSet( + chipClusterPtr, + callback, + updateFlags, + action, + direction, + time, + startHue, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); + } + + public void enhancedMoveHue( + DefaultClusterCallback callback, + Integer moveMode, + Integer rate, + Integer optionsMask, + Integer optionsOverride) { + enhancedMoveHue(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride, null); + } + + public void enhancedMoveHue( + DefaultClusterCallback callback, + Integer moveMode, + Integer rate, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + enhancedMoveHue( + chipClusterPtr, + callback, + moveMode, + rate, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); + } public void enhancedMoveToHue( DefaultClusterCallback callback, @@ -2088,7 +2433,27 @@ public void enhancedMoveToHue( direction, transitionTime, optionsMask, - optionsOverride); + optionsOverride, + null); + } + + public void enhancedMoveToHue( + DefaultClusterCallback callback, + Integer enhancedHue, + Integer direction, + Integer transitionTime, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + enhancedMoveToHue( + chipClusterPtr, + callback, + enhancedHue, + direction, + transitionTime, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void enhancedMoveToHueAndSaturation( @@ -2105,7 +2470,27 @@ public void enhancedMoveToHueAndSaturation( saturation, transitionTime, optionsMask, - optionsOverride); + optionsOverride, + null); + } + + public void enhancedMoveToHueAndSaturation( + DefaultClusterCallback callback, + Integer enhancedHue, + Integer saturation, + Integer transitionTime, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + enhancedMoveToHueAndSaturation( + chipClusterPtr, + callback, + enhancedHue, + saturation, + transitionTime, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void enhancedStepHue( @@ -2122,7 +2507,27 @@ public void enhancedStepHue( stepSize, transitionTime, optionsMask, - optionsOverride); + optionsOverride, + null); + } + + public void enhancedStepHue( + DefaultClusterCallback callback, + Integer stepMode, + Integer stepSize, + Integer transitionTime, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + enhancedStepHue( + chipClusterPtr, + callback, + stepMode, + stepSize, + transitionTime, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void moveColor( @@ -2131,7 +2536,24 @@ public void moveColor( Integer rateY, Integer optionsMask, Integer optionsOverride) { - moveColor(chipClusterPtr, callback, rateX, rateY, optionsMask, optionsOverride); + moveColor(chipClusterPtr, callback, rateX, rateY, optionsMask, optionsOverride, null); + } + + public void moveColor( + DefaultClusterCallback callback, + Integer rateX, + Integer rateY, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + moveColor( + chipClusterPtr, + callback, + rateX, + rateY, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void moveColorTemperature( @@ -2150,7 +2572,29 @@ public void moveColorTemperature( colorTemperatureMinimum, colorTemperatureMaximum, optionsMask, - optionsOverride); + optionsOverride, + null); + } + + public void moveColorTemperature( + DefaultClusterCallback callback, + Integer moveMode, + Integer rate, + Integer colorTemperatureMinimum, + Integer colorTemperatureMaximum, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + moveColorTemperature( + chipClusterPtr, + callback, + moveMode, + rate, + colorTemperatureMinimum, + colorTemperatureMaximum, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void moveHue( @@ -2159,7 +2603,24 @@ public void moveHue( Integer rate, Integer optionsMask, Integer optionsOverride) { - moveHue(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride); + moveHue(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride, null); + } + + public void moveHue( + DefaultClusterCallback callback, + Integer moveMode, + Integer rate, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + moveHue( + chipClusterPtr, + callback, + moveMode, + rate, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void moveSaturation( @@ -2168,7 +2629,24 @@ public void moveSaturation( Integer rate, Integer optionsMask, Integer optionsOverride) { - moveSaturation(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride); + moveSaturation(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride, null); + } + + public void moveSaturation( + DefaultClusterCallback callback, + Integer moveMode, + Integer rate, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + moveSaturation( + chipClusterPtr, + callback, + moveMode, + rate, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void moveToColor( @@ -2179,7 +2657,33 @@ public void moveToColor( Integer optionsMask, Integer optionsOverride) { moveToColor( - chipClusterPtr, callback, colorX, colorY, transitionTime, optionsMask, optionsOverride); + chipClusterPtr, + callback, + colorX, + colorY, + transitionTime, + optionsMask, + optionsOverride, + null); + } + + public void moveToColor( + DefaultClusterCallback callback, + Integer colorX, + Integer colorY, + Integer transitionTime, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + moveToColor( + chipClusterPtr, + callback, + colorX, + colorY, + transitionTime, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void moveToColorTemperature( @@ -2189,7 +2693,30 @@ public void moveToColorTemperature( Integer optionsMask, Integer optionsOverride) { moveToColorTemperature( - chipClusterPtr, callback, colorTemperature, transitionTime, optionsMask, optionsOverride); + chipClusterPtr, + callback, + colorTemperature, + transitionTime, + optionsMask, + optionsOverride, + null); + } + + public void moveToColorTemperature( + DefaultClusterCallback callback, + Integer colorTemperature, + Integer transitionTime, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + moveToColorTemperature( + chipClusterPtr, + callback, + colorTemperature, + transitionTime, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void moveToHue( @@ -2200,7 +2727,33 @@ public void moveToHue( Integer optionsMask, Integer optionsOverride) { moveToHue( - chipClusterPtr, callback, hue, direction, transitionTime, optionsMask, optionsOverride); + chipClusterPtr, + callback, + hue, + direction, + transitionTime, + optionsMask, + optionsOverride, + null); + } + + public void moveToHue( + DefaultClusterCallback callback, + Integer hue, + Integer direction, + Integer transitionTime, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + moveToHue( + chipClusterPtr, + callback, + hue, + direction, + transitionTime, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void moveToHueAndSaturation( @@ -2211,7 +2764,33 @@ public void moveToHueAndSaturation( Integer optionsMask, Integer optionsOverride) { moveToHueAndSaturation( - chipClusterPtr, callback, hue, saturation, transitionTime, optionsMask, optionsOverride); + chipClusterPtr, + callback, + hue, + saturation, + transitionTime, + optionsMask, + optionsOverride, + null); + } + + public void moveToHueAndSaturation( + DefaultClusterCallback callback, + Integer hue, + Integer saturation, + Integer transitionTime, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + moveToHueAndSaturation( + chipClusterPtr, + callback, + hue, + saturation, + transitionTime, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void moveToSaturation( @@ -2221,7 +2800,24 @@ public void moveToSaturation( Integer optionsMask, Integer optionsOverride) { moveToSaturation( - chipClusterPtr, callback, saturation, transitionTime, optionsMask, optionsOverride); + chipClusterPtr, callback, saturation, transitionTime, optionsMask, optionsOverride, null); + } + + public void moveToSaturation( + DefaultClusterCallback callback, + Integer saturation, + Integer transitionTime, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + moveToSaturation( + chipClusterPtr, + callback, + saturation, + transitionTime, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void stepColor( @@ -2232,7 +2828,33 @@ public void stepColor( Integer optionsMask, Integer optionsOverride) { stepColor( - chipClusterPtr, callback, stepX, stepY, transitionTime, optionsMask, optionsOverride); + chipClusterPtr, + callback, + stepX, + stepY, + transitionTime, + optionsMask, + optionsOverride, + null); + } + + public void stepColor( + DefaultClusterCallback callback, + Integer stepX, + Integer stepY, + Integer transitionTime, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + stepColor( + chipClusterPtr, + callback, + stepX, + stepY, + transitionTime, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void stepColorTemperature( @@ -2253,7 +2875,31 @@ public void stepColorTemperature( colorTemperatureMinimum, colorTemperatureMaximum, optionsMask, - optionsOverride); + optionsOverride, + null); + } + + public void stepColorTemperature( + DefaultClusterCallback callback, + Integer stepMode, + Integer stepSize, + Integer transitionTime, + Integer colorTemperatureMinimum, + Integer colorTemperatureMaximum, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + stepColorTemperature( + chipClusterPtr, + callback, + stepMode, + stepSize, + transitionTime, + colorTemperatureMinimum, + colorTemperatureMaximum, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void stepHue( @@ -2270,7 +2916,27 @@ public void stepHue( stepSize, transitionTime, optionsMask, - optionsOverride); + optionsOverride, + null); + } + + public void stepHue( + DefaultClusterCallback callback, + Integer stepMode, + Integer stepSize, + Integer transitionTime, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + stepHue( + chipClusterPtr, + callback, + stepMode, + stepSize, + transitionTime, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void stepSaturation( @@ -2287,12 +2953,40 @@ public void stepSaturation( stepSize, transitionTime, optionsMask, - optionsOverride); + optionsOverride, + null); + } + + public void stepSaturation( + DefaultClusterCallback callback, + Integer stepMode, + Integer stepSize, + Integer transitionTime, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + stepSaturation( + chipClusterPtr, + callback, + stepMode, + stepSize, + transitionTime, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void stopMoveStep( DefaultClusterCallback callback, Integer optionsMask, Integer optionsOverride) { - stopMoveStep(chipClusterPtr, callback, optionsMask, optionsOverride); + stopMoveStep(chipClusterPtr, callback, optionsMask, optionsOverride, null); + } + + public void stopMoveStep( + DefaultClusterCallback callback, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + stopMoveStep(chipClusterPtr, callback, optionsMask, optionsOverride, timedInvokeTimeoutMs); } private native void colorLoopSet( @@ -2304,7 +2998,8 @@ private native void colorLoopSet( Integer time, Integer startHue, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void enhancedMoveHue( long chipClusterPtr, @@ -2312,7 +3007,8 @@ private native void enhancedMoveHue( Integer moveMode, Integer rate, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void enhancedMoveToHue( long chipClusterPtr, @@ -2321,7 +3017,8 @@ private native void enhancedMoveToHue( Integer direction, Integer transitionTime, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void enhancedMoveToHueAndSaturation( long chipClusterPtr, @@ -2330,7 +3027,8 @@ private native void enhancedMoveToHueAndSaturation( Integer saturation, Integer transitionTime, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void enhancedStepHue( long chipClusterPtr, @@ -2339,7 +3037,8 @@ private native void enhancedStepHue( Integer stepSize, Integer transitionTime, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void moveColor( long chipClusterPtr, @@ -2347,7 +3046,8 @@ private native void moveColor( Integer rateX, Integer rateY, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void moveColorTemperature( long chipClusterPtr, @@ -2357,7 +3057,8 @@ private native void moveColorTemperature( Integer colorTemperatureMinimum, Integer colorTemperatureMaximum, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void moveHue( long chipClusterPtr, @@ -2365,7 +3066,8 @@ private native void moveHue( Integer moveMode, Integer rate, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void moveSaturation( long chipClusterPtr, @@ -2373,7 +3075,8 @@ private native void moveSaturation( Integer moveMode, Integer rate, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void moveToColor( long chipClusterPtr, @@ -2382,7 +3085,8 @@ private native void moveToColor( Integer colorY, Integer transitionTime, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void moveToColorTemperature( long chipClusterPtr, @@ -2390,7 +3094,8 @@ private native void moveToColorTemperature( Integer colorTemperature, Integer transitionTime, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void moveToHue( long chipClusterPtr, @@ -2399,7 +3104,8 @@ private native void moveToHue( Integer direction, Integer transitionTime, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void moveToHueAndSaturation( long chipClusterPtr, @@ -2408,7 +3114,8 @@ private native void moveToHueAndSaturation( Integer saturation, Integer transitionTime, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void moveToSaturation( long chipClusterPtr, @@ -2416,7 +3123,8 @@ private native void moveToSaturation( Integer saturation, Integer transitionTime, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void stepColor( long chipClusterPtr, @@ -2425,7 +3133,8 @@ private native void stepColor( Integer stepY, Integer transitionTime, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void stepColorTemperature( long chipClusterPtr, @@ -2436,7 +3145,8 @@ private native void stepColorTemperature( Integer colorTemperatureMinimum, Integer colorTemperatureMaximum, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void stepHue( long chipClusterPtr, @@ -2445,7 +3155,8 @@ private native void stepHue( Integer stepSize, Integer transitionTime, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void stepSaturation( long chipClusterPtr, @@ -2454,13 +3165,15 @@ private native void stepSaturation( Integer stepSize, Integer transitionTime, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void stopMoveStep( long chipClusterPtr, DefaultClusterCallback Callback, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); public interface AttributeListAttributeCallback { void onSuccess(List valueList); @@ -2556,7 +3269,12 @@ public void readColorControlOptionsAttribute(IntegerAttributeCallback callback) } public void writeColorControlOptionsAttribute(DefaultClusterCallback callback, Integer value) { - writeColorControlOptionsAttribute(chipClusterPtr, callback, value); + writeColorControlOptionsAttribute(chipClusterPtr, callback, value, null); + } + + public void writeColorControlOptionsAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeColorControlOptionsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeColorControlOptionsAttribute( @@ -2740,7 +3458,12 @@ public void readWhitePointXAttribute(IntegerAttributeCallback callback) { } public void writeWhitePointXAttribute(DefaultClusterCallback callback, Integer value) { - writeWhitePointXAttribute(chipClusterPtr, callback, value); + writeWhitePointXAttribute(chipClusterPtr, callback, value, null); + } + + public void writeWhitePointXAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeWhitePointXAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeWhitePointXAttribute( @@ -2753,7 +3476,12 @@ public void readWhitePointYAttribute(IntegerAttributeCallback callback) { } public void writeWhitePointYAttribute(DefaultClusterCallback callback, Integer value) { - writeWhitePointYAttribute(chipClusterPtr, callback, value); + writeWhitePointYAttribute(chipClusterPtr, callback, value, null); + } + + public void writeWhitePointYAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeWhitePointYAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeWhitePointYAttribute( @@ -2766,7 +3494,12 @@ public void readColorPointRXAttribute(IntegerAttributeCallback callback) { } public void writeColorPointRXAttribute(DefaultClusterCallback callback, Integer value) { - writeColorPointRXAttribute(chipClusterPtr, callback, value); + writeColorPointRXAttribute(chipClusterPtr, callback, value, null); + } + + public void writeColorPointRXAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeColorPointRXAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeColorPointRXAttribute( @@ -2779,7 +3512,12 @@ public void readColorPointRYAttribute(IntegerAttributeCallback callback) { } public void writeColorPointRYAttribute(DefaultClusterCallback callback, Integer value) { - writeColorPointRYAttribute(chipClusterPtr, callback, value); + writeColorPointRYAttribute(chipClusterPtr, callback, value, null); + } + + public void writeColorPointRYAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeColorPointRYAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeColorPointRYAttribute( @@ -2792,7 +3530,12 @@ public void readColorPointRIntensityAttribute(IntegerAttributeCallback callback) } public void writeColorPointRIntensityAttribute(DefaultClusterCallback callback, Integer value) { - writeColorPointRIntensityAttribute(chipClusterPtr, callback, value); + writeColorPointRIntensityAttribute(chipClusterPtr, callback, value, null); + } + + public void writeColorPointRIntensityAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeColorPointRIntensityAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeColorPointRIntensityAttribute( @@ -2805,7 +3548,12 @@ public void readColorPointGXAttribute(IntegerAttributeCallback callback) { } public void writeColorPointGXAttribute(DefaultClusterCallback callback, Integer value) { - writeColorPointGXAttribute(chipClusterPtr, callback, value); + writeColorPointGXAttribute(chipClusterPtr, callback, value, null); + } + + public void writeColorPointGXAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeColorPointGXAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeColorPointGXAttribute( @@ -2818,7 +3566,12 @@ public void readColorPointGYAttribute(IntegerAttributeCallback callback) { } public void writeColorPointGYAttribute(DefaultClusterCallback callback, Integer value) { - writeColorPointGYAttribute(chipClusterPtr, callback, value); + writeColorPointGYAttribute(chipClusterPtr, callback, value, null); + } + + public void writeColorPointGYAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeColorPointGYAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeColorPointGYAttribute( @@ -2831,7 +3584,12 @@ public void readColorPointGIntensityAttribute(IntegerAttributeCallback callback) } public void writeColorPointGIntensityAttribute(DefaultClusterCallback callback, Integer value) { - writeColorPointGIntensityAttribute(chipClusterPtr, callback, value); + writeColorPointGIntensityAttribute(chipClusterPtr, callback, value, null); + } + + public void writeColorPointGIntensityAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeColorPointGIntensityAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeColorPointGIntensityAttribute( @@ -2844,7 +3602,12 @@ public void readColorPointBXAttribute(IntegerAttributeCallback callback) { } public void writeColorPointBXAttribute(DefaultClusterCallback callback, Integer value) { - writeColorPointBXAttribute(chipClusterPtr, callback, value); + writeColorPointBXAttribute(chipClusterPtr, callback, value, null); + } + + public void writeColorPointBXAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeColorPointBXAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeColorPointBXAttribute( @@ -2857,7 +3620,12 @@ public void readColorPointBYAttribute(IntegerAttributeCallback callback) { } public void writeColorPointBYAttribute(DefaultClusterCallback callback, Integer value) { - writeColorPointBYAttribute(chipClusterPtr, callback, value); + writeColorPointBYAttribute(chipClusterPtr, callback, value, null); + } + + public void writeColorPointBYAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeColorPointBYAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeColorPointBYAttribute( @@ -2870,7 +3638,12 @@ public void readColorPointBIntensityAttribute(IntegerAttributeCallback callback) } public void writeColorPointBIntensityAttribute(DefaultClusterCallback callback, Integer value) { - writeColorPointBIntensityAttribute(chipClusterPtr, callback, value); + writeColorPointBIntensityAttribute(chipClusterPtr, callback, value, null); + } + + public void writeColorPointBIntensityAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeColorPointBIntensityAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeColorPointBIntensityAttribute( @@ -2986,7 +3759,13 @@ public void readStartUpColorTemperatureMiredsAttribute(IntegerAttributeCallback public void writeStartUpColorTemperatureMiredsAttribute( DefaultClusterCallback callback, Integer value) { - writeStartUpColorTemperatureMiredsAttribute(chipClusterPtr, callback, value); + writeStartUpColorTemperatureMiredsAttribute(chipClusterPtr, callback, value, null); + } + + public void writeStartUpColorTemperatureMiredsAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeStartUpColorTemperatureMiredsAttribute( + chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeStartUpColorTemperatureMiredsAttribute( @@ -3069,7 +3848,10 @@ private native void readColorControlOptionsAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeColorControlOptionsAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeColorControlOptionsAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -3192,7 +3974,10 @@ private native void readWhitePointXAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeWhitePointXAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeWhitePointXAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -3201,7 +3986,10 @@ private native void readWhitePointYAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeWhitePointYAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeWhitePointYAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -3210,7 +3998,10 @@ private native void readColorPointRXAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeColorPointRXAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeColorPointRXAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -3219,7 +4010,10 @@ private native void readColorPointRYAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeColorPointRYAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeColorPointRYAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -3228,7 +4022,10 @@ private native void readColorPointRIntensityAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeColorPointRIntensityAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeColorPointRIntensityAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -3237,7 +4034,10 @@ private native void readColorPointGXAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeColorPointGXAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeColorPointGXAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -3246,7 +4046,10 @@ private native void readColorPointGYAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeColorPointGYAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeColorPointGYAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -3255,7 +4058,10 @@ private native void readColorPointGIntensityAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeColorPointGIntensityAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeColorPointGIntensityAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -3264,7 +4070,10 @@ private native void readColorPointBXAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeColorPointBXAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeColorPointBXAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -3273,7 +4082,10 @@ private native void readColorPointBYAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeColorPointBYAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeColorPointBYAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -3282,7 +4094,10 @@ private native void readColorPointBIntensityAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeColorPointBIntensityAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeColorPointBIntensityAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -3357,7 +4172,10 @@ private native void readStartUpColorTemperatureMiredsAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeStartUpColorTemperatureMiredsAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeStartUpColorTemperatureMiredsAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -3373,20 +4191,23 @@ private native void subscribeClusterRevisionAttribute( } public static class ContentLauncherCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1290L; + public ContentLauncherCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1290"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); public void launchContentRequest( LaunchResponseCallback callback, Boolean autoPlay, String data) { - launchContentRequest(chipClusterPtr, callback, autoPlay, data); + launchContentRequest(chipClusterPtr, callback, autoPlay, data, null); + } + + public void launchContentRequest( + LaunchResponseCallback callback, Boolean autoPlay, String data, int timedInvokeTimeoutMs) { + launchContentRequest(chipClusterPtr, callback, autoPlay, data, timedInvokeTimeoutMs); } public void launchURLRequest( @@ -3394,18 +4215,33 @@ public void launchURLRequest( String contentURL, String displayString, String providerName) { - launchURLRequest(chipClusterPtr, callback, contentURL, displayString, providerName); + launchURLRequest(chipClusterPtr, callback, contentURL, displayString, providerName, null); + } + + public void launchURLRequest( + LaunchResponseCallback callback, + String contentURL, + String displayString, + String providerName, + int timedInvokeTimeoutMs) { + launchURLRequest( + chipClusterPtr, callback, contentURL, displayString, providerName, timedInvokeTimeoutMs); } private native void launchContentRequest( - long chipClusterPtr, LaunchResponseCallback Callback, Boolean autoPlay, String data); + long chipClusterPtr, + LaunchResponseCallback Callback, + Boolean autoPlay, + String data, + @Nullable Integer timedInvokeTimeoutMs); private native void launchURLRequest( long chipClusterPtr, LaunchResponseCallback Callback, String contentURL, String displayString, - String providerName); + String providerName, + @Nullable Integer timedInvokeTimeoutMs); public interface LaunchResponseCallback { void onSuccess(Integer status, String data); @@ -3439,7 +4275,13 @@ public void readSupportedStreamingProtocolsAttribute(LongAttributeCallback callb public void writeSupportedStreamingProtocolsAttribute( DefaultClusterCallback callback, Long value) { - writeSupportedStreamingProtocolsAttribute(chipClusterPtr, callback, value); + writeSupportedStreamingProtocolsAttribute(chipClusterPtr, callback, value, null); + } + + public void writeSupportedStreamingProtocolsAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeSupportedStreamingProtocolsAttribute( + chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeSupportedStreamingProtocolsAttribute( @@ -3468,7 +4310,10 @@ private native void readSupportedStreamingProtocolsAttribute( long chipClusterPtr, LongAttributeCallback callback); private native void writeSupportedStreamingProtocolsAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeSupportedStreamingProtocolsAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -3484,14 +4329,12 @@ private native void subscribeClusterRevisionAttribute( } public static class DescriptorCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 29L; + public DescriptorCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("29"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -3611,14 +4454,12 @@ private native void subscribeClusterRevisionAttribute( } public static class DiagnosticLogsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 50L; + public DiagnosticLogsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("50"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -3628,7 +4469,22 @@ public void retrieveLogsRequest( Integer requestedProtocol, byte[] transferFileDesignator) { retrieveLogsRequest( - chipClusterPtr, callback, intent, requestedProtocol, transferFileDesignator); + chipClusterPtr, callback, intent, requestedProtocol, transferFileDesignator, null); + } + + public void retrieveLogsRequest( + RetrieveLogsResponseCallback callback, + Integer intent, + Integer requestedProtocol, + byte[] transferFileDesignator, + int timedInvokeTimeoutMs) { + retrieveLogsRequest( + chipClusterPtr, + callback, + intent, + requestedProtocol, + transferFileDesignator, + timedInvokeTimeoutMs); } private native void retrieveLogsRequest( @@ -3636,7 +4492,8 @@ private native void retrieveLogsRequest( RetrieveLogsResponseCallback Callback, Integer intent, Integer requestedProtocol, - byte[] transferFileDesignator); + byte[] transferFileDesignator, + @Nullable Integer timedInvokeTimeoutMs); public interface RetrieveLogsResponseCallback { void onSuccess(Integer status, byte[] content, Long timeStamp, Long timeSinceBoot); @@ -3661,39 +4518,70 @@ private native void readAttributeListAttribute( } public static class DoorLockCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 257L; + public DoorLockCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("257"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); public void clearCredential( DefaultClusterCallback callback, Integer credentialType, Integer credentialIndex) { - clearCredential(chipClusterPtr, callback, credentialType, credentialIndex); + clearCredential(chipClusterPtr, callback, credentialType, credentialIndex, null); + } + + public void clearCredential( + DefaultClusterCallback callback, + Integer credentialType, + Integer credentialIndex, + int timedInvokeTimeoutMs) { + clearCredential( + chipClusterPtr, callback, credentialType, credentialIndex, timedInvokeTimeoutMs); } public void clearUser(DefaultClusterCallback callback, Integer userIndex) { - clearUser(chipClusterPtr, callback, userIndex); + clearUser(chipClusterPtr, callback, userIndex, null); + } + + public void clearUser( + DefaultClusterCallback callback, Integer userIndex, int timedInvokeTimeoutMs) { + clearUser(chipClusterPtr, callback, userIndex, timedInvokeTimeoutMs); } public void getCredentialStatus( GetCredentialStatusResponseCallback callback, Integer credentialType, Integer credentialIndex) { - getCredentialStatus(chipClusterPtr, callback, credentialType, credentialIndex); + getCredentialStatus(chipClusterPtr, callback, credentialType, credentialIndex, null); + } + + public void getCredentialStatus( + GetCredentialStatusResponseCallback callback, + Integer credentialType, + Integer credentialIndex, + int timedInvokeTimeoutMs) { + getCredentialStatus( + chipClusterPtr, callback, credentialType, credentialIndex, timedInvokeTimeoutMs); } public void getUser(GetUserResponseCallback callback, Integer userIndex) { - getUser(chipClusterPtr, callback, userIndex); + getUser(chipClusterPtr, callback, userIndex, null); + } + + public void getUser( + GetUserResponseCallback callback, Integer userIndex, int timedInvokeTimeoutMs) { + getUser(chipClusterPtr, callback, userIndex, timedInvokeTimeoutMs); } public void lockDoor(DefaultClusterCallback callback, Optional pinCode) { - lockDoor(chipClusterPtr, callback, pinCode); + lockDoor(chipClusterPtr, callback, pinCode, null); + } + + public void lockDoor( + DefaultClusterCallback callback, Optional pinCode, int timedInvokeTimeoutMs) { + lockDoor(chipClusterPtr, callback, pinCode, timedInvokeTimeoutMs); } public void setCredential( @@ -3712,7 +4600,29 @@ public void setCredential( credentialIndex, credentialData, userIndex, - userStatus); + userStatus, + null); + } + + public void setCredential( + SetCredentialResponseCallback callback, + Integer operationType, + Integer credentialType, + Integer credentialIndex, + byte[] credentialData, + Integer userIndex, + Integer userStatus, + int timedInvokeTimeoutMs) { + setCredential( + chipClusterPtr, + callback, + operationType, + credentialType, + credentialIndex, + credentialData, + userIndex, + userStatus, + timedInvokeTimeoutMs); } public void setUser( @@ -3733,33 +4643,73 @@ public void setUser( userUniqueId, userStatus, userType, - credentialRule); + credentialRule, + null); + } + + public void setUser( + DefaultClusterCallback callback, + Integer operationType, + Integer userIndex, + @Nullable String userName, + @Nullable Long userUniqueId, + Integer userStatus, + Integer userType, + Integer credentialRule, + int timedInvokeTimeoutMs) { + setUser( + chipClusterPtr, + callback, + operationType, + userIndex, + userName, + userUniqueId, + userStatus, + userType, + credentialRule, + timedInvokeTimeoutMs); } public void unlockDoor(DefaultClusterCallback callback, Optional pinCode) { - unlockDoor(chipClusterPtr, callback, pinCode); + unlockDoor(chipClusterPtr, callback, pinCode, null); + } + + public void unlockDoor( + DefaultClusterCallback callback, Optional pinCode, int timedInvokeTimeoutMs) { + unlockDoor(chipClusterPtr, callback, pinCode, timedInvokeTimeoutMs); } private native void clearCredential( long chipClusterPtr, DefaultClusterCallback Callback, Integer credentialType, - Integer credentialIndex); + Integer credentialIndex, + @Nullable Integer timedInvokeTimeoutMs); private native void clearUser( - long chipClusterPtr, DefaultClusterCallback Callback, Integer userIndex); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer userIndex, + @Nullable Integer timedInvokeTimeoutMs); private native void getCredentialStatus( long chipClusterPtr, GetCredentialStatusResponseCallback Callback, Integer credentialType, - Integer credentialIndex); + Integer credentialIndex, + @Nullable Integer timedInvokeTimeoutMs); private native void getUser( - long chipClusterPtr, GetUserResponseCallback Callback, Integer userIndex); + long chipClusterPtr, + GetUserResponseCallback Callback, + Integer userIndex, + @Nullable Integer timedInvokeTimeoutMs); private native void lockDoor( - long chipClusterPtr, DefaultClusterCallback Callback, Optional pinCode); + long chipClusterPtr, + DefaultClusterCallback Callback, + Optional pinCode, + @Nullable Integer timedInvokeTimeoutMs); private native void setCredential( long chipClusterPtr, @@ -3769,7 +4719,8 @@ private native void setCredential( Integer credentialIndex, byte[] credentialData, Integer userIndex, - Integer userStatus); + Integer userStatus, + @Nullable Integer timedInvokeTimeoutMs); private native void setUser( long chipClusterPtr, @@ -3780,10 +4731,14 @@ private native void setUser( @Nullable Long userUniqueId, Integer userStatus, Integer userType, - Integer credentialRule); + Integer credentialRule, + @Nullable Integer timedInvokeTimeoutMs); private native void unlockDoor( - long chipClusterPtr, DefaultClusterCallback Callback, Optional pinCode); + long chipClusterPtr, + DefaultClusterCallback Callback, + Optional pinCode, + @Nullable Integer timedInvokeTimeoutMs); public interface GetCredentialStatusResponseCallback { void onSuccess( @@ -3899,7 +4854,12 @@ public void readLanguageAttribute(CharStringAttributeCallback callback) { } public void writeLanguageAttribute(DefaultClusterCallback callback, String value) { - writeLanguageAttribute(chipClusterPtr, callback, value); + writeLanguageAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLanguageAttribute( + DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + writeLanguageAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeLanguageAttribute( @@ -3912,7 +4872,12 @@ public void readAutoRelockTimeAttribute(LongAttributeCallback callback) { } public void writeAutoRelockTimeAttribute(DefaultClusterCallback callback, Long value) { - writeAutoRelockTimeAttribute(chipClusterPtr, callback, value); + writeAutoRelockTimeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeAutoRelockTimeAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeAutoRelockTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeAutoRelockTimeAttribute( @@ -3925,7 +4890,12 @@ public void readSoundVolumeAttribute(IntegerAttributeCallback callback) { } public void writeSoundVolumeAttribute(DefaultClusterCallback callback, Integer value) { - writeSoundVolumeAttribute(chipClusterPtr, callback, value); + writeSoundVolumeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeSoundVolumeAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeSoundVolumeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeSoundVolumeAttribute( @@ -3938,7 +4908,12 @@ public void readOperatingModeAttribute(IntegerAttributeCallback callback) { } public void writeOperatingModeAttribute(DefaultClusterCallback callback, Integer value) { - writeOperatingModeAttribute(chipClusterPtr, callback, value); + writeOperatingModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOperatingModeAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOperatingModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeOperatingModeAttribute( @@ -3956,7 +4931,12 @@ public void readEnableOneTouchLockingAttribute(BooleanAttributeCallback callback public void writeEnableOneTouchLockingAttribute( DefaultClusterCallback callback, Boolean value) { - writeEnableOneTouchLockingAttribute(chipClusterPtr, callback, value); + writeEnableOneTouchLockingAttribute(chipClusterPtr, callback, value, null); + } + + public void writeEnableOneTouchLockingAttribute( + DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeEnableOneTouchLockingAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeEnableOneTouchLockingAttribute( @@ -3970,7 +4950,12 @@ public void readEnablePrivacyModeButtonAttribute(BooleanAttributeCallback callba public void writeEnablePrivacyModeButtonAttribute( DefaultClusterCallback callback, Boolean value) { - writeEnablePrivacyModeButtonAttribute(chipClusterPtr, callback, value); + writeEnablePrivacyModeButtonAttribute(chipClusterPtr, callback, value, null); + } + + public void writeEnablePrivacyModeButtonAttribute( + DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeEnablePrivacyModeButtonAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeEnablePrivacyModeButtonAttribute( @@ -3983,7 +4968,12 @@ public void readWrongCodeEntryLimitAttribute(IntegerAttributeCallback callback) } public void writeWrongCodeEntryLimitAttribute(DefaultClusterCallback callback, Integer value) { - writeWrongCodeEntryLimitAttribute(chipClusterPtr, callback, value); + writeWrongCodeEntryLimitAttribute(chipClusterPtr, callback, value, null); + } + + public void writeWrongCodeEntryLimitAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeWrongCodeEntryLimitAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeWrongCodeEntryLimitAttribute( @@ -4044,7 +5034,10 @@ private native void readLanguageAttribute( long chipClusterPtr, CharStringAttributeCallback callback); private native void writeLanguageAttribute( - long chipClusterPtr, DefaultClusterCallback callback, String value); + long chipClusterPtr, + DefaultClusterCallback callback, + String value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeLanguageAttribute( long chipClusterPtr, @@ -4056,7 +5049,10 @@ private native void readAutoRelockTimeAttribute( long chipClusterPtr, LongAttributeCallback callback); private native void writeAutoRelockTimeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeAutoRelockTimeAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -4065,7 +5061,10 @@ private native void readSoundVolumeAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeSoundVolumeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeSoundVolumeAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -4074,7 +5073,10 @@ private native void readOperatingModeAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeOperatingModeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeOperatingModeAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -4086,7 +5088,10 @@ private native void readEnableOneTouchLockingAttribute( long chipClusterPtr, BooleanAttributeCallback callback); private native void writeEnableOneTouchLockingAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Boolean value); + long chipClusterPtr, + DefaultClusterCallback callback, + Boolean value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeEnableOneTouchLockingAttribute( long chipClusterPtr, BooleanAttributeCallback callback, int minInterval, int maxInterval); @@ -4095,7 +5100,10 @@ private native void readEnablePrivacyModeButtonAttribute( long chipClusterPtr, BooleanAttributeCallback callback); private native void writeEnablePrivacyModeButtonAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Boolean value); + long chipClusterPtr, + DefaultClusterCallback callback, + Boolean value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeEnablePrivacyModeButtonAttribute( long chipClusterPtr, BooleanAttributeCallback callback, int minInterval, int maxInterval); @@ -4104,7 +5112,10 @@ private native void readWrongCodeEntryLimitAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeWrongCodeEntryLimitAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeWrongCodeEntryLimitAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -4120,14 +5131,12 @@ private native void subscribeClusterRevisionAttribute( } public static class ElectricalMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 2820L; + public ElectricalMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("2820"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -4328,22 +5337,27 @@ private native void subscribeClusterRevisionAttribute( } public static class EthernetNetworkDiagnosticsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 55L; + public EthernetNetworkDiagnosticsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("55"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); public void resetCounts(DefaultClusterCallback callback) { - resetCounts(chipClusterPtr, callback); + resetCounts(chipClusterPtr, callback, null); + } + + public void resetCounts(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + resetCounts(chipClusterPtr, callback, timedInvokeTimeoutMs); } - private native void resetCounts(long chipClusterPtr, DefaultClusterCallback Callback); + private native void resetCounts( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); public interface AttributeListAttributeCallback { void onSuccess(List valueList); @@ -4519,14 +5533,12 @@ private native void subscribeClusterRevisionAttribute( } public static class FixedLabelCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 64L; + public FixedLabelCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("64"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -4601,14 +5613,12 @@ private native void subscribeClusterRevisionAttribute( } public static class FlowMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1028L; + public FlowMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1028"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -4704,14 +5714,12 @@ private native void subscribeClusterRevisionAttribute( } public static class GeneralCommissioningCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 48L; + public GeneralCommissioningCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("48"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -4720,11 +5728,31 @@ public void armFailSafe( Integer expiryLengthSeconds, Long breadcrumb, Long timeoutMs) { - armFailSafe(chipClusterPtr, callback, expiryLengthSeconds, breadcrumb, timeoutMs); + armFailSafe(chipClusterPtr, callback, expiryLengthSeconds, breadcrumb, timeoutMs, null); + } + + public void armFailSafe( + ArmFailSafeResponseCallback callback, + Integer expiryLengthSeconds, + Long breadcrumb, + Long timeoutMs, + int timedInvokeTimeoutMs) { + armFailSafe( + chipClusterPtr, + callback, + expiryLengthSeconds, + breadcrumb, + timeoutMs, + timedInvokeTimeoutMs); } public void commissioningComplete(CommissioningCompleteResponseCallback callback) { - commissioningComplete(chipClusterPtr, callback); + commissioningComplete(chipClusterPtr, callback, null); + } + + public void commissioningComplete( + CommissioningCompleteResponseCallback callback, int timedInvokeTimeoutMs) { + commissioningComplete(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void setRegulatoryConfig( @@ -4733,7 +5761,25 @@ public void setRegulatoryConfig( String countryCode, Long breadcrumb, Long timeoutMs) { - setRegulatoryConfig(chipClusterPtr, callback, location, countryCode, breadcrumb, timeoutMs); + setRegulatoryConfig( + chipClusterPtr, callback, location, countryCode, breadcrumb, timeoutMs, null); + } + + public void setRegulatoryConfig( + SetRegulatoryConfigResponseCallback callback, + Integer location, + String countryCode, + Long breadcrumb, + Long timeoutMs, + int timedInvokeTimeoutMs) { + setRegulatoryConfig( + chipClusterPtr, + callback, + location, + countryCode, + breadcrumb, + timeoutMs, + timedInvokeTimeoutMs); } private native void armFailSafe( @@ -4741,10 +5787,13 @@ private native void armFailSafe( ArmFailSafeResponseCallback Callback, Integer expiryLengthSeconds, Long breadcrumb, - Long timeoutMs); + Long timeoutMs, + @Nullable Integer timedInvokeTimeoutMs); private native void commissioningComplete( - long chipClusterPtr, CommissioningCompleteResponseCallback Callback); + long chipClusterPtr, + CommissioningCompleteResponseCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); private native void setRegulatoryConfig( long chipClusterPtr, @@ -4752,7 +5801,8 @@ private native void setRegulatoryConfig( Integer location, String countryCode, Long breadcrumb, - Long timeoutMs); + Long timeoutMs, + @Nullable Integer timedInvokeTimeoutMs); public interface ArmFailSafeResponseCallback { void onSuccess(Integer errorCode, String debugText); @@ -4811,7 +5861,12 @@ public void readBreadcrumbAttribute(LongAttributeCallback callback) { } public void writeBreadcrumbAttribute(DefaultClusterCallback callback, Long value) { - writeBreadcrumbAttribute(chipClusterPtr, callback, value); + writeBreadcrumbAttribute(chipClusterPtr, callback, value, null); + } + + public void writeBreadcrumbAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeBreadcrumbAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeBreadcrumbAttribute( @@ -4849,7 +5904,10 @@ private native void readBreadcrumbAttribute( long chipClusterPtr, LongAttributeCallback callback); private native void writeBreadcrumbAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeBreadcrumbAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -4874,14 +5932,12 @@ private native void subscribeClusterRevisionAttribute( } public static class GeneralDiagnosticsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 51L; + public GeneralDiagnosticsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("51"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -5090,28 +6146,43 @@ private native void subscribeClusterRevisionAttribute( } public static class GroupKeyManagementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 63L; + public GroupKeyManagementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("63"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); public void keySetRead(KeySetReadResponseCallback callback, Integer groupKeySetID) { - keySetRead(chipClusterPtr, callback, groupKeySetID); + keySetRead(chipClusterPtr, callback, groupKeySetID, null); + } + + public void keySetRead( + KeySetReadResponseCallback callback, Integer groupKeySetID, int timedInvokeTimeoutMs) { + keySetRead(chipClusterPtr, callback, groupKeySetID, timedInvokeTimeoutMs); } public void keySetReadAllIndices( KeySetReadAllIndicesResponseCallback callback, Integer groupKeySetIDs) { - keySetReadAllIndices(chipClusterPtr, callback, groupKeySetIDs); + keySetReadAllIndices(chipClusterPtr, callback, groupKeySetIDs, null); + } + + public void keySetReadAllIndices( + KeySetReadAllIndicesResponseCallback callback, + Integer groupKeySetIDs, + int timedInvokeTimeoutMs) { + keySetReadAllIndices(chipClusterPtr, callback, groupKeySetIDs, timedInvokeTimeoutMs); } public void keySetRemove(DefaultClusterCallback callback, Integer groupKeySetID) { - keySetRemove(chipClusterPtr, callback, groupKeySetID); + keySetRemove(chipClusterPtr, callback, groupKeySetID, null); + } + + public void keySetRemove( + DefaultClusterCallback callback, Integer groupKeySetID, int timedInvokeTimeoutMs) { + keySetRemove(chipClusterPtr, callback, groupKeySetID, timedInvokeTimeoutMs); } public void keySetWrite( @@ -5134,17 +6205,52 @@ public void keySetWrite( epochKey1, epochStartTime1, epochKey2, - epochStartTime2); + epochStartTime2, + null); + } + + public void keySetWrite( + DefaultClusterCallback callback, + Integer groupKeySetID, + Integer securityPolicy, + byte[] epochKey0, + Long epochStartTime0, + byte[] epochKey1, + Long epochStartTime1, + byte[] epochKey2, + Long epochStartTime2, + int timedInvokeTimeoutMs) { + keySetWrite( + chipClusterPtr, + callback, + groupKeySetID, + securityPolicy, + epochKey0, + epochStartTime0, + epochKey1, + epochStartTime1, + epochKey2, + epochStartTime2, + timedInvokeTimeoutMs); } private native void keySetRead( - long chipClusterPtr, KeySetReadResponseCallback Callback, Integer groupKeySetID); + long chipClusterPtr, + KeySetReadResponseCallback Callback, + Integer groupKeySetID, + @Nullable Integer timedInvokeTimeoutMs); private native void keySetReadAllIndices( - long chipClusterPtr, KeySetReadAllIndicesResponseCallback Callback, Integer groupKeySetIDs); + long chipClusterPtr, + KeySetReadAllIndicesResponseCallback Callback, + Integer groupKeySetIDs, + @Nullable Integer timedInvokeTimeoutMs); private native void keySetRemove( - long chipClusterPtr, DefaultClusterCallback Callback, Integer groupKeySetID); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer groupKeySetID, + @Nullable Integer timedInvokeTimeoutMs); private native void keySetWrite( long chipClusterPtr, @@ -5156,7 +6262,8 @@ private native void keySetWrite( byte[] epochKey1, Long epochStartTime1, byte[] epochKey2, - Long epochStartTime2); + Long epochStartTime2, + @Nullable Integer timedInvokeTimeoutMs); public interface KeySetReadAllIndicesResponseCallback { void onSuccess( // groupKeySetIDs: /* TYPE WARNING: array array defaults to */ uint8_t * @@ -5310,58 +6417,111 @@ private native void subscribeClusterRevisionAttribute( } public static class GroupsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 4L; + public GroupsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("4"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); public void addGroup(AddGroupResponseCallback callback, Integer groupId, String groupName) { - addGroup(chipClusterPtr, callback, groupId, groupName); + addGroup(chipClusterPtr, callback, groupId, groupName, null); + } + + public void addGroup( + AddGroupResponseCallback callback, + Integer groupId, + String groupName, + int timedInvokeTimeoutMs) { + addGroup(chipClusterPtr, callback, groupId, groupName, timedInvokeTimeoutMs); } public void addGroupIfIdentifying( DefaultClusterCallback callback, Integer groupId, String groupName) { - addGroupIfIdentifying(chipClusterPtr, callback, groupId, groupName); + addGroupIfIdentifying(chipClusterPtr, callback, groupId, groupName, null); + } + + public void addGroupIfIdentifying( + DefaultClusterCallback callback, + Integer groupId, + String groupName, + int timedInvokeTimeoutMs) { + addGroupIfIdentifying(chipClusterPtr, callback, groupId, groupName, timedInvokeTimeoutMs); } public void getGroupMembership(GetGroupMembershipResponseCallback callback, Integer groupList) { - getGroupMembership(chipClusterPtr, callback, groupList); + getGroupMembership(chipClusterPtr, callback, groupList, null); + } + + public void getGroupMembership( + GetGroupMembershipResponseCallback callback, Integer groupList, int timedInvokeTimeoutMs) { + getGroupMembership(chipClusterPtr, callback, groupList, timedInvokeTimeoutMs); } public void removeAllGroups(DefaultClusterCallback callback) { - removeAllGroups(chipClusterPtr, callback); + removeAllGroups(chipClusterPtr, callback, null); + } + + public void removeAllGroups(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + removeAllGroups(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void removeGroup(RemoveGroupResponseCallback callback, Integer groupId) { - removeGroup(chipClusterPtr, callback, groupId); + removeGroup(chipClusterPtr, callback, groupId, null); + } + + public void removeGroup( + RemoveGroupResponseCallback callback, Integer groupId, int timedInvokeTimeoutMs) { + removeGroup(chipClusterPtr, callback, groupId, timedInvokeTimeoutMs); } public void viewGroup(ViewGroupResponseCallback callback, Integer groupId) { - viewGroup(chipClusterPtr, callback, groupId); + viewGroup(chipClusterPtr, callback, groupId, null); + } + + public void viewGroup( + ViewGroupResponseCallback callback, Integer groupId, int timedInvokeTimeoutMs) { + viewGroup(chipClusterPtr, callback, groupId, timedInvokeTimeoutMs); } private native void addGroup( - long chipClusterPtr, AddGroupResponseCallback Callback, Integer groupId, String groupName); + long chipClusterPtr, + AddGroupResponseCallback Callback, + Integer groupId, + String groupName, + @Nullable Integer timedInvokeTimeoutMs); private native void addGroupIfIdentifying( - long chipClusterPtr, DefaultClusterCallback Callback, Integer groupId, String groupName); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer groupId, + String groupName, + @Nullable Integer timedInvokeTimeoutMs); private native void getGroupMembership( - long chipClusterPtr, GetGroupMembershipResponseCallback Callback, Integer groupList); + long chipClusterPtr, + GetGroupMembershipResponseCallback Callback, + Integer groupList, + @Nullable Integer timedInvokeTimeoutMs); - private native void removeAllGroups(long chipClusterPtr, DefaultClusterCallback Callback); + private native void removeAllGroups( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); private native void removeGroup( - long chipClusterPtr, RemoveGroupResponseCallback Callback, Integer groupId); + long chipClusterPtr, + RemoveGroupResponseCallback Callback, + Integer groupId, + @Nullable Integer timedInvokeTimeoutMs); private native void viewGroup( - long chipClusterPtr, ViewGroupResponseCallback Callback, Integer groupId); + long chipClusterPtr, + ViewGroupResponseCallback Callback, + Integer groupId, + @Nullable Integer timedInvokeTimeoutMs); public interface AddGroupResponseCallback { void onSuccess(Integer status, Integer groupId); @@ -5437,40 +6597,63 @@ private native void subscribeClusterRevisionAttribute( } public static class IdentifyCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 3L; + public IdentifyCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("3"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); public void identify(DefaultClusterCallback callback, Integer identifyTime) { - identify(chipClusterPtr, callback, identifyTime); + identify(chipClusterPtr, callback, identifyTime, null); + } + + public void identify( + DefaultClusterCallback callback, Integer identifyTime, int timedInvokeTimeoutMs) { + identify(chipClusterPtr, callback, identifyTime, timedInvokeTimeoutMs); } public void identifyQuery(IdentifyQueryResponseCallback callback) { - identifyQuery(chipClusterPtr, callback); + identifyQuery(chipClusterPtr, callback, null); + } + + public void identifyQuery(IdentifyQueryResponseCallback callback, int timedInvokeTimeoutMs) { + identifyQuery(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void triggerEffect( DefaultClusterCallback callback, Integer effectIdentifier, Integer effectVariant) { - triggerEffect(chipClusterPtr, callback, effectIdentifier, effectVariant); + triggerEffect(chipClusterPtr, callback, effectIdentifier, effectVariant, null); + } + + public void triggerEffect( + DefaultClusterCallback callback, + Integer effectIdentifier, + Integer effectVariant, + int timedInvokeTimeoutMs) { + triggerEffect( + chipClusterPtr, callback, effectIdentifier, effectVariant, timedInvokeTimeoutMs); } private native void identify( - long chipClusterPtr, DefaultClusterCallback Callback, Integer identifyTime); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer identifyTime, + @Nullable Integer timedInvokeTimeoutMs); - private native void identifyQuery(long chipClusterPtr, IdentifyQueryResponseCallback Callback); + private native void identifyQuery( + long chipClusterPtr, + IdentifyQueryResponseCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); private native void triggerEffect( long chipClusterPtr, DefaultClusterCallback Callback, Integer effectIdentifier, - Integer effectVariant); + Integer effectVariant, + @Nullable Integer timedInvokeTimeoutMs); public interface IdentifyQueryResponseCallback { void onSuccess(Integer timeout); @@ -5491,7 +6674,12 @@ public void readIdentifyTimeAttribute(IntegerAttributeCallback callback) { } public void writeIdentifyTimeAttribute(DefaultClusterCallback callback, Integer value) { - writeIdentifyTimeAttribute(chipClusterPtr, callback, value); + writeIdentifyTimeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeIdentifyTimeAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeIdentifyTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeIdentifyTimeAttribute( @@ -5525,7 +6713,10 @@ private native void readIdentifyTimeAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeIdentifyTimeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeIdentifyTimeAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -5547,14 +6738,12 @@ private native void subscribeClusterRevisionAttribute( } public static class IlluminanceMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1024L; + public IlluminanceMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1024"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -5709,23 +6898,29 @@ private native void subscribeClusterRevisionAttribute( } public static class KeypadInputCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1289L; + public KeypadInputCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1289"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); public void sendKeyRequest(SendKeyResponseCallback callback, Integer keyCode) { - sendKeyRequest(chipClusterPtr, callback, keyCode); + sendKeyRequest(chipClusterPtr, callback, keyCode, null); + } + + public void sendKeyRequest( + SendKeyResponseCallback callback, Integer keyCode, int timedInvokeTimeoutMs) { + sendKeyRequest(chipClusterPtr, callback, keyCode, timedInvokeTimeoutMs); } private native void sendKeyRequest( - long chipClusterPtr, SendKeyResponseCallback Callback, Integer keyCode); + long chipClusterPtr, + SendKeyResponseCallback Callback, + Integer keyCode, + @Nullable Integer timedInvokeTimeoutMs); public interface SendKeyResponseCallback { void onSuccess(Integer status); @@ -5765,14 +6960,12 @@ private native void subscribeClusterRevisionAttribute( } public static class LevelControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 8L; + public LevelControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("8"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -5782,7 +6975,24 @@ public void move( Integer rate, Integer optionMask, Integer optionOverride) { - move(chipClusterPtr, callback, moveMode, rate, optionMask, optionOverride); + move(chipClusterPtr, callback, moveMode, rate, optionMask, optionOverride, null); + } + + public void move( + DefaultClusterCallback callback, + Integer moveMode, + Integer rate, + Integer optionMask, + Integer optionOverride, + int timedInvokeTimeoutMs) { + move( + chipClusterPtr, + callback, + moveMode, + rate, + optionMask, + optionOverride, + timedInvokeTimeoutMs); } public void moveToLevel( @@ -5791,16 +7001,47 @@ public void moveToLevel( Integer transitionTime, Integer optionMask, Integer optionOverride) { - moveToLevel(chipClusterPtr, callback, level, transitionTime, optionMask, optionOverride); + moveToLevel( + chipClusterPtr, callback, level, transitionTime, optionMask, optionOverride, null); + } + + public void moveToLevel( + DefaultClusterCallback callback, + Integer level, + Integer transitionTime, + Integer optionMask, + Integer optionOverride, + int timedInvokeTimeoutMs) { + moveToLevel( + chipClusterPtr, + callback, + level, + transitionTime, + optionMask, + optionOverride, + timedInvokeTimeoutMs); } public void moveToLevelWithOnOff( DefaultClusterCallback callback, Integer level, Integer transitionTime) { - moveToLevelWithOnOff(chipClusterPtr, callback, level, transitionTime); + moveToLevelWithOnOff(chipClusterPtr, callback, level, transitionTime, null); + } + + public void moveToLevelWithOnOff( + DefaultClusterCallback callback, + Integer level, + Integer transitionTime, + int timedInvokeTimeoutMs) { + moveToLevelWithOnOff(chipClusterPtr, callback, level, transitionTime, timedInvokeTimeoutMs); } public void moveWithOnOff(DefaultClusterCallback callback, Integer moveMode, Integer rate) { - moveWithOnOff(chipClusterPtr, callback, moveMode, rate); + moveWithOnOff(chipClusterPtr, callback, moveMode, rate, null); + } + + public void moveWithOnOff( + DefaultClusterCallback callback, Integer moveMode, Integer rate, int timedInvokeTimeoutMs) { + moveWithOnOff(chipClusterPtr, callback, moveMode, rate, timedInvokeTimeoutMs); } public void step( @@ -5811,7 +7052,33 @@ public void step( Integer optionMask, Integer optionOverride) { step( - chipClusterPtr, callback, stepMode, stepSize, transitionTime, optionMask, optionOverride); + chipClusterPtr, + callback, + stepMode, + stepSize, + transitionTime, + optionMask, + optionOverride, + null); + } + + public void step( + DefaultClusterCallback callback, + Integer stepMode, + Integer stepSize, + Integer transitionTime, + Integer optionMask, + Integer optionOverride, + int timedInvokeTimeoutMs) { + step( + chipClusterPtr, + callback, + stepMode, + stepSize, + transitionTime, + optionMask, + optionOverride, + timedInvokeTimeoutMs); } public void stepWithOnOff( @@ -5819,15 +7086,37 @@ public void stepWithOnOff( Integer stepMode, Integer stepSize, Integer transitionTime) { - stepWithOnOff(chipClusterPtr, callback, stepMode, stepSize, transitionTime); + stepWithOnOff(chipClusterPtr, callback, stepMode, stepSize, transitionTime, null); + } + + public void stepWithOnOff( + DefaultClusterCallback callback, + Integer stepMode, + Integer stepSize, + Integer transitionTime, + int timedInvokeTimeoutMs) { + stepWithOnOff( + chipClusterPtr, callback, stepMode, stepSize, transitionTime, timedInvokeTimeoutMs); } public void stop(DefaultClusterCallback callback, Integer optionMask, Integer optionOverride) { - stop(chipClusterPtr, callback, optionMask, optionOverride); + stop(chipClusterPtr, callback, optionMask, optionOverride, null); + } + + public void stop( + DefaultClusterCallback callback, + Integer optionMask, + Integer optionOverride, + int timedInvokeTimeoutMs) { + stop(chipClusterPtr, callback, optionMask, optionOverride, timedInvokeTimeoutMs); } public void stopWithOnOff(DefaultClusterCallback callback) { - stopWithOnOff(chipClusterPtr, callback); + stopWithOnOff(chipClusterPtr, callback, null); + } + + public void stopWithOnOff(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + stopWithOnOff(chipClusterPtr, callback, timedInvokeTimeoutMs); } private native void move( @@ -5836,7 +7125,8 @@ private native void move( Integer moveMode, Integer rate, Integer optionMask, - Integer optionOverride); + Integer optionOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void moveToLevel( long chipClusterPtr, @@ -5844,16 +7134,22 @@ private native void moveToLevel( Integer level, Integer transitionTime, Integer optionMask, - Integer optionOverride); + Integer optionOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void moveToLevelWithOnOff( long chipClusterPtr, DefaultClusterCallback Callback, Integer level, - Integer transitionTime); + Integer transitionTime, + @Nullable Integer timedInvokeTimeoutMs); private native void moveWithOnOff( - long chipClusterPtr, DefaultClusterCallback Callback, Integer moveMode, Integer rate); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer moveMode, + Integer rate, + @Nullable Integer timedInvokeTimeoutMs); private native void step( long chipClusterPtr, @@ -5862,22 +7158,28 @@ private native void step( Integer stepSize, Integer transitionTime, Integer optionMask, - Integer optionOverride); + Integer optionOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void stepWithOnOff( long chipClusterPtr, DefaultClusterCallback Callback, Integer stepMode, Integer stepSize, - Integer transitionTime); + Integer transitionTime, + @Nullable Integer timedInvokeTimeoutMs); private native void stop( long chipClusterPtr, DefaultClusterCallback Callback, Integer optionMask, - Integer optionOverride); + Integer optionOverride, + @Nullable Integer timedInvokeTimeoutMs); - private native void stopWithOnOff(long chipClusterPtr, DefaultClusterCallback Callback); + private native void stopWithOnOff( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); public interface OnLevelAttributeCallback { void onSuccess(@Nullable Integer value); @@ -5987,7 +7289,12 @@ public void readOptionsAttribute(IntegerAttributeCallback callback) { } public void writeOptionsAttribute(DefaultClusterCallback callback, Integer value) { - writeOptionsAttribute(chipClusterPtr, callback, value); + writeOptionsAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOptionsAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOptionsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeOptionsAttribute( @@ -6000,7 +7307,12 @@ public void readOnOffTransitionTimeAttribute(IntegerAttributeCallback callback) } public void writeOnOffTransitionTimeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnOffTransitionTimeAttribute(chipClusterPtr, callback, value); + writeOnOffTransitionTimeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOnOffTransitionTimeAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOnOffTransitionTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeOnOffTransitionTimeAttribute( @@ -6013,7 +7325,12 @@ public void readOnLevelAttribute(OnLevelAttributeCallback callback) { } public void writeOnLevelAttribute(DefaultClusterCallback callback, @Nullable Integer value) { - writeOnLevelAttribute(chipClusterPtr, callback, value); + writeOnLevelAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOnLevelAttribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeOnLevelAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeOnLevelAttribute( @@ -6027,7 +7344,12 @@ public void readOnTransitionTimeAttribute(OnTransitionTimeAttributeCallback call public void writeOnTransitionTimeAttribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeOnTransitionTimeAttribute(chipClusterPtr, callback, value); + writeOnTransitionTimeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOnTransitionTimeAttribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeOnTransitionTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeOnTransitionTimeAttribute( @@ -6041,7 +7363,12 @@ public void readOffTransitionTimeAttribute(OffTransitionTimeAttributeCallback ca public void writeOffTransitionTimeAttribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeOffTransitionTimeAttribute(chipClusterPtr, callback, value); + writeOffTransitionTimeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOffTransitionTimeAttribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeOffTransitionTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeOffTransitionTimeAttribute( @@ -6055,7 +7382,12 @@ public void readDefaultMoveRateAttribute(DefaultMoveRateAttributeCallback callba public void writeDefaultMoveRateAttribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeDefaultMoveRateAttribute(chipClusterPtr, callback, value); + writeDefaultMoveRateAttribute(chipClusterPtr, callback, value, null); + } + + public void writeDefaultMoveRateAttribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeDefaultMoveRateAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeDefaultMoveRateAttribute( @@ -6068,7 +7400,12 @@ public void readStartUpCurrentLevelAttribute(IntegerAttributeCallback callback) } public void writeStartUpCurrentLevelAttribute(DefaultClusterCallback callback, Integer value) { - writeStartUpCurrentLevelAttribute(chipClusterPtr, callback, value); + writeStartUpCurrentLevelAttribute(chipClusterPtr, callback, value, null); + } + + public void writeStartUpCurrentLevelAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeStartUpCurrentLevelAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeStartUpCurrentLevelAttribute( @@ -6135,7 +7472,10 @@ private native void readOptionsAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeOptionsAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeOptionsAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -6144,7 +7484,10 @@ private native void readOnOffTransitionTimeAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeOnOffTransitionTimeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeOnOffTransitionTimeAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -6153,7 +7496,10 @@ private native void readOnLevelAttribute( long chipClusterPtr, OnLevelAttributeCallback callback); private native void writeOnLevelAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeOnLevelAttribute( long chipClusterPtr, OnLevelAttributeCallback callback, int minInterval, int maxInterval); @@ -6162,7 +7508,10 @@ private native void readOnTransitionTimeAttribute( long chipClusterPtr, OnTransitionTimeAttributeCallback callback); private native void writeOnTransitionTimeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeOnTransitionTimeAttribute( long chipClusterPtr, @@ -6174,7 +7523,10 @@ private native void readOffTransitionTimeAttribute( long chipClusterPtr, OffTransitionTimeAttributeCallback callback); private native void writeOffTransitionTimeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeOffTransitionTimeAttribute( long chipClusterPtr, @@ -6186,7 +7538,10 @@ private native void readDefaultMoveRateAttribute( long chipClusterPtr, DefaultMoveRateAttributeCallback callback); private native void writeDefaultMoveRateAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeDefaultMoveRateAttribute( long chipClusterPtr, @@ -6198,7 +7553,10 @@ private native void readStartUpCurrentLevelAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeStartUpCurrentLevelAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeStartUpCurrentLevelAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -6213,23 +7571,76 @@ private native void subscribeClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); } - public static class LowPowerCluster extends BaseChipCluster { - public LowPowerCluster(long devicePtr, int endpointId) { + public static class LocalizationConfigurationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 43L; + + public LocalizationConfigurationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1288"); + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface SupportedLocalesAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public void readActiveLocaleAttribute(CharStringAttributeCallback callback) { + readActiveLocaleAttribute(chipClusterPtr, callback); + } + + public void writeActiveLocaleAttribute(DefaultClusterCallback callback, String value) { + writeActiveLocaleAttribute(chipClusterPtr, callback, value, null); + } + + public void writeActiveLocaleAttribute( + DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + writeActiveLocaleAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + + public void readSupportedLocalesAttribute(SupportedLocalesAttributeCallback callback) { + readSupportedLocalesAttribute(chipClusterPtr, callback); + } + + private native void readActiveLocaleAttribute( + long chipClusterPtr, CharStringAttributeCallback callback); + + private native void writeActiveLocaleAttribute( + long chipClusterPtr, + DefaultClusterCallback callback, + String value, + @Nullable Integer timedWriteTimeoutMs); + + private native void readSupportedLocalesAttribute( + long chipClusterPtr, SupportedLocalesAttributeCallback callback); + } + + public static class LowPowerCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1288L; + + public LowPowerCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); } @Override public native long initWithDevice(long devicePtr, int endpointId); public void sleep(DefaultClusterCallback callback) { - sleep(chipClusterPtr, callback); + sleep(chipClusterPtr, callback, null); + } + + public void sleep(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + sleep(chipClusterPtr, callback, timedInvokeTimeoutMs); } - private native void sleep(long chipClusterPtr, DefaultClusterCallback Callback); + private native void sleep( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); public interface AttributeListAttributeCallback { void onSuccess(List valueList); @@ -6263,44 +7674,71 @@ private native void subscribeClusterRevisionAttribute( } public static class MediaInputCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1287L; + public MediaInputCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1287"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); public void hideInputStatusRequest(DefaultClusterCallback callback) { - hideInputStatusRequest(chipClusterPtr, callback); + hideInputStatusRequest(chipClusterPtr, callback, null); + } + + public void hideInputStatusRequest(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + hideInputStatusRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void renameInputRequest(DefaultClusterCallback callback, Integer index, String name) { - renameInputRequest(chipClusterPtr, callback, index, name); + renameInputRequest(chipClusterPtr, callback, index, name, null); + } + + public void renameInputRequest( + DefaultClusterCallback callback, Integer index, String name, int timedInvokeTimeoutMs) { + renameInputRequest(chipClusterPtr, callback, index, name, timedInvokeTimeoutMs); } public void selectInputRequest(DefaultClusterCallback callback, Integer index) { - selectInputRequest(chipClusterPtr, callback, index); + selectInputRequest(chipClusterPtr, callback, index, null); + } + + public void selectInputRequest( + DefaultClusterCallback callback, Integer index, int timedInvokeTimeoutMs) { + selectInputRequest(chipClusterPtr, callback, index, timedInvokeTimeoutMs); } public void showInputStatusRequest(DefaultClusterCallback callback) { - showInputStatusRequest(chipClusterPtr, callback); + showInputStatusRequest(chipClusterPtr, callback, null); + } + + public void showInputStatusRequest(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + showInputStatusRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } private native void hideInputStatusRequest( - long chipClusterPtr, DefaultClusterCallback Callback); + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); private native void renameInputRequest( - long chipClusterPtr, DefaultClusterCallback Callback, Integer index, String name); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer index, + String name, + @Nullable Integer timedInvokeTimeoutMs); private native void selectInputRequest( - long chipClusterPtr, DefaultClusterCallback Callback, Integer index); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer index, + @Nullable Integer timedInvokeTimeoutMs); private native void showInputStatusRequest( - long chipClusterPtr, DefaultClusterCallback Callback); + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); public static class MediaInputListAttribute { public Integer index; @@ -6401,87 +7839,170 @@ private native void subscribeClusterRevisionAttribute( } public static class MediaPlaybackCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1286L; + public MediaPlaybackCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1286"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); public void fastForwardRequest(PlaybackResponseCallback callback) { - fastForwardRequest(chipClusterPtr, callback); + fastForwardRequest(chipClusterPtr, callback, null); + } + + public void fastForwardRequest(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { + fastForwardRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void nextRequest(PlaybackResponseCallback callback) { - nextRequest(chipClusterPtr, callback); + nextRequest(chipClusterPtr, callback, null); + } + + public void nextRequest(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { + nextRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void pauseRequest(PlaybackResponseCallback callback) { - pauseRequest(chipClusterPtr, callback); + pauseRequest(chipClusterPtr, callback, null); + } + + public void pauseRequest(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { + pauseRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void playRequest(PlaybackResponseCallback callback) { - playRequest(chipClusterPtr, callback); + playRequest(chipClusterPtr, callback, null); + } + + public void playRequest(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { + playRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void previousRequest(PlaybackResponseCallback callback) { - previousRequest(chipClusterPtr, callback); + previousRequest(chipClusterPtr, callback, null); + } + + public void previousRequest(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { + previousRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void rewindRequest(PlaybackResponseCallback callback) { - rewindRequest(chipClusterPtr, callback); + rewindRequest(chipClusterPtr, callback, null); + } + + public void rewindRequest(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { + rewindRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void seekRequest(PlaybackResponseCallback callback, Long position) { - seekRequest(chipClusterPtr, callback, position); + seekRequest(chipClusterPtr, callback, position, null); + } + + public void seekRequest( + PlaybackResponseCallback callback, Long position, int timedInvokeTimeoutMs) { + seekRequest(chipClusterPtr, callback, position, timedInvokeTimeoutMs); } public void skipBackwardRequest( PlaybackResponseCallback callback, Long deltaPositionMilliseconds) { - skipBackwardRequest(chipClusterPtr, callback, deltaPositionMilliseconds); + skipBackwardRequest(chipClusterPtr, callback, deltaPositionMilliseconds, null); + } + + public void skipBackwardRequest( + PlaybackResponseCallback callback, + Long deltaPositionMilliseconds, + int timedInvokeTimeoutMs) { + skipBackwardRequest( + chipClusterPtr, callback, deltaPositionMilliseconds, timedInvokeTimeoutMs); } public void skipForwardRequest( PlaybackResponseCallback callback, Long deltaPositionMilliseconds) { - skipForwardRequest(chipClusterPtr, callback, deltaPositionMilliseconds); + skipForwardRequest(chipClusterPtr, callback, deltaPositionMilliseconds, null); + } + + public void skipForwardRequest( + PlaybackResponseCallback callback, + Long deltaPositionMilliseconds, + int timedInvokeTimeoutMs) { + skipForwardRequest(chipClusterPtr, callback, deltaPositionMilliseconds, timedInvokeTimeoutMs); } public void startOverRequest(PlaybackResponseCallback callback) { - startOverRequest(chipClusterPtr, callback); + startOverRequest(chipClusterPtr, callback, null); + } + + public void startOverRequest(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { + startOverRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void stopRequest(PlaybackResponseCallback callback) { - stopRequest(chipClusterPtr, callback); + stopRequest(chipClusterPtr, callback, null); + } + + public void stopRequest(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { + stopRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } - private native void fastForwardRequest(long chipClusterPtr, PlaybackResponseCallback Callback); + private native void fastForwardRequest( + long chipClusterPtr, + PlaybackResponseCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); - private native void nextRequest(long chipClusterPtr, PlaybackResponseCallback Callback); + private native void nextRequest( + long chipClusterPtr, + PlaybackResponseCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); - private native void pauseRequest(long chipClusterPtr, PlaybackResponseCallback Callback); + private native void pauseRequest( + long chipClusterPtr, + PlaybackResponseCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); - private native void playRequest(long chipClusterPtr, PlaybackResponseCallback Callback); + private native void playRequest( + long chipClusterPtr, + PlaybackResponseCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); - private native void previousRequest(long chipClusterPtr, PlaybackResponseCallback Callback); + private native void previousRequest( + long chipClusterPtr, + PlaybackResponseCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); - private native void rewindRequest(long chipClusterPtr, PlaybackResponseCallback Callback); + private native void rewindRequest( + long chipClusterPtr, + PlaybackResponseCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); private native void seekRequest( - long chipClusterPtr, PlaybackResponseCallback Callback, Long position); + long chipClusterPtr, + PlaybackResponseCallback Callback, + Long position, + @Nullable Integer timedInvokeTimeoutMs); private native void skipBackwardRequest( - long chipClusterPtr, PlaybackResponseCallback Callback, Long deltaPositionMilliseconds); + long chipClusterPtr, + PlaybackResponseCallback Callback, + Long deltaPositionMilliseconds, + @Nullable Integer timedInvokeTimeoutMs); private native void skipForwardRequest( - long chipClusterPtr, PlaybackResponseCallback Callback, Long deltaPositionMilliseconds); + long chipClusterPtr, + PlaybackResponseCallback Callback, + Long deltaPositionMilliseconds, + @Nullable Integer timedInvokeTimeoutMs); - private native void startOverRequest(long chipClusterPtr, PlaybackResponseCallback Callback); + private native void startOverRequest( + long chipClusterPtr, + PlaybackResponseCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); - private native void stopRequest(long chipClusterPtr, PlaybackResponseCallback Callback); + private native void stopRequest( + long chipClusterPtr, + PlaybackResponseCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); public interface PlaybackResponseCallback { void onSuccess(Integer status); @@ -6601,23 +8122,29 @@ private native void subscribeClusterRevisionAttribute( } public static class ModeSelectCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 80L; + public ModeSelectCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("80"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); public void changeToMode(DefaultClusterCallback callback, Integer newMode) { - changeToMode(chipClusterPtr, callback, newMode); + changeToMode(chipClusterPtr, callback, newMode, null); + } + + public void changeToMode( + DefaultClusterCallback callback, Integer newMode, int timedInvokeTimeoutMs) { + changeToMode(chipClusterPtr, callback, newMode, timedInvokeTimeoutMs); } private native void changeToMode( - long chipClusterPtr, DefaultClusterCallback Callback, Integer newMode); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer newMode, + @Nullable Integer timedInvokeTimeoutMs); public static class SupportedModesAttribute { public String label; @@ -6683,7 +8210,12 @@ public void readOnModeAttribute(IntegerAttributeCallback callback) { } public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnModeAttribute(chipClusterPtr, callback, value); + writeOnModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOnModeAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOnModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeOnModeAttribute( @@ -6734,7 +8266,10 @@ private native void readSupportedModesAttribute( private native void readOnModeAttribute(long chipClusterPtr, IntegerAttributeCallback callback); private native void writeOnModeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeOnModeAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -6765,35 +8300,68 @@ private native void subscribeClusterRevisionAttribute( } public static class NetworkCommissioningCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 49L; + public NetworkCommissioningCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("49"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); public void addOrUpdateThreadNetwork( NetworkConfigResponseCallback callback, byte[] operationalDataset, Long breadcrumb) { - addOrUpdateThreadNetwork(chipClusterPtr, callback, operationalDataset, breadcrumb); + addOrUpdateThreadNetwork(chipClusterPtr, callback, operationalDataset, breadcrumb, null); + } + + public void addOrUpdateThreadNetwork( + NetworkConfigResponseCallback callback, + byte[] operationalDataset, + Long breadcrumb, + int timedInvokeTimeoutMs) { + addOrUpdateThreadNetwork( + chipClusterPtr, callback, operationalDataset, breadcrumb, timedInvokeTimeoutMs); } public void addOrUpdateWiFiNetwork( NetworkConfigResponseCallback callback, byte[] ssid, byte[] credentials, Long breadcrumb) { - addOrUpdateWiFiNetwork(chipClusterPtr, callback, ssid, credentials, breadcrumb); + addOrUpdateWiFiNetwork(chipClusterPtr, callback, ssid, credentials, breadcrumb, null); + } + + public void addOrUpdateWiFiNetwork( + NetworkConfigResponseCallback callback, + byte[] ssid, + byte[] credentials, + Long breadcrumb, + int timedInvokeTimeoutMs) { + addOrUpdateWiFiNetwork( + chipClusterPtr, callback, ssid, credentials, breadcrumb, timedInvokeTimeoutMs); } public void connectNetwork( ConnectNetworkResponseCallback callback, byte[] networkID, Long breadcrumb) { - connectNetwork(chipClusterPtr, callback, networkID, breadcrumb); + connectNetwork(chipClusterPtr, callback, networkID, breadcrumb, null); + } + + public void connectNetwork( + ConnectNetworkResponseCallback callback, + byte[] networkID, + Long breadcrumb, + int timedInvokeTimeoutMs) { + connectNetwork(chipClusterPtr, callback, networkID, breadcrumb, timedInvokeTimeoutMs); } public void removeNetwork( NetworkConfigResponseCallback callback, byte[] networkID, Long breadcrumb) { - removeNetwork(chipClusterPtr, callback, networkID, breadcrumb); + removeNetwork(chipClusterPtr, callback, networkID, breadcrumb, null); + } + + public void removeNetwork( + NetworkConfigResponseCallback callback, + byte[] networkID, + Long breadcrumb, + int timedInvokeTimeoutMs) { + removeNetwork(chipClusterPtr, callback, networkID, breadcrumb, timedInvokeTimeoutMs); } public void reorderNetwork( @@ -6801,47 +8369,74 @@ public void reorderNetwork( byte[] networkID, Integer networkIndex, Long breadcrumb) { - reorderNetwork(chipClusterPtr, callback, networkID, networkIndex, breadcrumb); + reorderNetwork(chipClusterPtr, callback, networkID, networkIndex, breadcrumb, null); + } + + public void reorderNetwork( + NetworkConfigResponseCallback callback, + byte[] networkID, + Integer networkIndex, + Long breadcrumb, + int timedInvokeTimeoutMs) { + reorderNetwork( + chipClusterPtr, callback, networkID, networkIndex, breadcrumb, timedInvokeTimeoutMs); } public void scanNetworks(ScanNetworksResponseCallback callback, byte[] ssid, Long breadcrumb) { - scanNetworks(chipClusterPtr, callback, ssid, breadcrumb); + scanNetworks(chipClusterPtr, callback, ssid, breadcrumb, null); + } + + public void scanNetworks( + ScanNetworksResponseCallback callback, + byte[] ssid, + Long breadcrumb, + int timedInvokeTimeoutMs) { + scanNetworks(chipClusterPtr, callback, ssid, breadcrumb, timedInvokeTimeoutMs); } private native void addOrUpdateThreadNetwork( long chipClusterPtr, NetworkConfigResponseCallback Callback, byte[] operationalDataset, - Long breadcrumb); + Long breadcrumb, + @Nullable Integer timedInvokeTimeoutMs); private native void addOrUpdateWiFiNetwork( long chipClusterPtr, NetworkConfigResponseCallback Callback, byte[] ssid, byte[] credentials, - Long breadcrumb); + Long breadcrumb, + @Nullable Integer timedInvokeTimeoutMs); private native void connectNetwork( long chipClusterPtr, ConnectNetworkResponseCallback Callback, byte[] networkID, - Long breadcrumb); + Long breadcrumb, + @Nullable Integer timedInvokeTimeoutMs); private native void removeNetwork( long chipClusterPtr, NetworkConfigResponseCallback Callback, byte[] networkID, - Long breadcrumb); + Long breadcrumb, + @Nullable Integer timedInvokeTimeoutMs); private native void reorderNetwork( long chipClusterPtr, NetworkConfigResponseCallback Callback, byte[] networkID, Integer networkIndex, - Long breadcrumb); + Long breadcrumb, + @Nullable Integer timedInvokeTimeoutMs); private native void scanNetworks( - long chipClusterPtr, ScanNetworksResponseCallback Callback, byte[] ssid, Long breadcrumb); + long chipClusterPtr, + ScanNetworksResponseCallback Callback, + byte[] ssid, + Long breadcrumb, + @Nullable Integer timedInvokeTimeoutMs); public interface ConnectNetworkResponseCallback { void onSuccess(Integer NetworkingStatus, String DebugText, Long ErrorValue); @@ -6919,7 +8514,12 @@ public void readInterfaceEnabledAttribute(BooleanAttributeCallback callback) { } public void writeInterfaceEnabledAttribute(DefaultClusterCallback callback, Boolean value) { - writeInterfaceEnabledAttribute(chipClusterPtr, callback, value); + writeInterfaceEnabledAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInterfaceEnabledAttribute( + DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeInterfaceEnabledAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void readLastNetworkingStatusAttribute(IntegerAttributeCallback callback) { @@ -6968,7 +8568,10 @@ private native void readInterfaceEnabledAttribute( long chipClusterPtr, BooleanAttributeCallback callback); private native void writeInterfaceEnabledAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Boolean value); + long chipClusterPtr, + DefaultClusterCallback callback, + Boolean value, + @Nullable Integer timedWriteTimeoutMs); private native void readLastNetworkingStatusAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -6993,25 +8596,40 @@ private native void subscribeClusterRevisionAttribute( } public static class OtaSoftwareUpdateProviderCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 41L; + public OtaSoftwareUpdateProviderCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("41"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); public void applyUpdateRequest( ApplyUpdateResponseCallback callback, byte[] updateToken, Long newVersion) { - applyUpdateRequest(chipClusterPtr, callback, updateToken, newVersion); + applyUpdateRequest(chipClusterPtr, callback, updateToken, newVersion, null); + } + + public void applyUpdateRequest( + ApplyUpdateResponseCallback callback, + byte[] updateToken, + Long newVersion, + int timedInvokeTimeoutMs) { + applyUpdateRequest(chipClusterPtr, callback, updateToken, newVersion, timedInvokeTimeoutMs); } public void notifyUpdateApplied( DefaultClusterCallback callback, byte[] updateToken, Long softwareVersion) { - notifyUpdateApplied(chipClusterPtr, callback, updateToken, softwareVersion); + notifyUpdateApplied(chipClusterPtr, callback, updateToken, softwareVersion, null); + } + + public void notifyUpdateApplied( + DefaultClusterCallback callback, + byte[] updateToken, + Long softwareVersion, + int timedInvokeTimeoutMs) { + notifyUpdateApplied( + chipClusterPtr, callback, updateToken, softwareVersion, timedInvokeTimeoutMs); } public void queryImage( @@ -7034,20 +8652,48 @@ public void queryImage( hardwareVersion, location, requestorCanConsent, - metadataForProvider); + metadataForProvider, + null); + } + + public void queryImage( + QueryImageResponseCallback callback, + Integer vendorId, + Integer productId, + Long softwareVersion, + Integer protocolsSupported, + Optional hardwareVersion, + Optional location, + Optional requestorCanConsent, + Optional metadataForProvider, + int timedInvokeTimeoutMs) { + queryImage( + chipClusterPtr, + callback, + vendorId, + productId, + softwareVersion, + protocolsSupported, + hardwareVersion, + location, + requestorCanConsent, + metadataForProvider, + timedInvokeTimeoutMs); } private native void applyUpdateRequest( long chipClusterPtr, ApplyUpdateResponseCallback Callback, byte[] updateToken, - Long newVersion); + Long newVersion, + @Nullable Integer timedInvokeTimeoutMs); private native void notifyUpdateApplied( long chipClusterPtr, DefaultClusterCallback Callback, byte[] updateToken, - Long softwareVersion); + Long softwareVersion, + @Nullable Integer timedInvokeTimeoutMs); private native void queryImage( long chipClusterPtr, @@ -7059,7 +8705,8 @@ private native void queryImage( Optional hardwareVersion, Optional location, Optional requestorCanConsent, - Optional metadataForProvider); + Optional metadataForProvider, + @Nullable Integer timedInvokeTimeoutMs); public interface ApplyUpdateResponseCallback { void onSuccess(Integer action, Long delayedActionTime); @@ -7113,14 +8760,12 @@ private native void subscribeClusterRevisionAttribute( } public static class OtaSoftwareUpdateRequestorCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 42L; + public OtaSoftwareUpdateRequestorCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("42"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -7138,7 +8783,27 @@ public void announceOtaProvider( vendorId, announcementReason, metadataForNode, - endpoint); + endpoint, + null); + } + + public void announceOtaProvider( + DefaultClusterCallback callback, + Long providerNodeId, + Integer vendorId, + Integer announcementReason, + Optional metadataForNode, + Integer endpoint, + int timedInvokeTimeoutMs) { + announceOtaProvider( + chipClusterPtr, + callback, + providerNodeId, + vendorId, + announcementReason, + metadataForNode, + endpoint, + timedInvokeTimeoutMs); } private native void announceOtaProvider( @@ -7148,7 +8813,8 @@ private native void announceOtaProvider( Integer vendorId, Integer announcementReason, Optional metadataForNode, - Integer endpoint); + Integer endpoint, + @Nullable Integer timedInvokeTimeoutMs); public static class DefaultOtaProvidersAttribute { public Integer fabricIndex; @@ -7284,14 +8950,12 @@ private native void subscribeClusterRevisionAttribute( } public static class OccupancySensingCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1030L; + public OccupancySensingCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1030"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -7373,67 +9037,112 @@ private native void subscribeClusterRevisionAttribute( } public static class OnOffCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 6L; + public OnOffCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("6"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); public void off(DefaultClusterCallback callback) { - off(chipClusterPtr, callback); + off(chipClusterPtr, callback, null); + } + + public void off(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + off(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void offWithEffect( DefaultClusterCallback callback, Integer effectId, Integer effectVariant) { - offWithEffect(chipClusterPtr, callback, effectId, effectVariant); + offWithEffect(chipClusterPtr, callback, effectId, effectVariant, null); + } + + public void offWithEffect( + DefaultClusterCallback callback, + Integer effectId, + Integer effectVariant, + int timedInvokeTimeoutMs) { + offWithEffect(chipClusterPtr, callback, effectId, effectVariant, timedInvokeTimeoutMs); } public void on(DefaultClusterCallback callback) { - on(chipClusterPtr, callback); + on(chipClusterPtr, callback, null); + } + + public void on(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + on(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void onWithRecallGlobalScene(DefaultClusterCallback callback) { - onWithRecallGlobalScene(chipClusterPtr, callback); + onWithRecallGlobalScene(chipClusterPtr, callback, null); + } + + public void onWithRecallGlobalScene(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + onWithRecallGlobalScene(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void onWithTimedOff( + DefaultClusterCallback callback, + Integer onOffControl, + Integer onTime, + Integer offWaitTime) { + onWithTimedOff(chipClusterPtr, callback, onOffControl, onTime, offWaitTime, null); } public void onWithTimedOff( DefaultClusterCallback callback, Integer onOffControl, Integer onTime, - Integer offWaitTime) { - onWithTimedOff(chipClusterPtr, callback, onOffControl, onTime, offWaitTime); + Integer offWaitTime, + int timedInvokeTimeoutMs) { + onWithTimedOff( + chipClusterPtr, callback, onOffControl, onTime, offWaitTime, timedInvokeTimeoutMs); } public void toggle(DefaultClusterCallback callback) { - toggle(chipClusterPtr, callback); + toggle(chipClusterPtr, callback, null); + } + + public void toggle(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + toggle(chipClusterPtr, callback, timedInvokeTimeoutMs); } - private native void off(long chipClusterPtr, DefaultClusterCallback Callback); + private native void off( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); private native void offWithEffect( long chipClusterPtr, DefaultClusterCallback Callback, Integer effectId, - Integer effectVariant); + Integer effectVariant, + @Nullable Integer timedInvokeTimeoutMs); - private native void on(long chipClusterPtr, DefaultClusterCallback Callback); + private native void on( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); private native void onWithRecallGlobalScene( - long chipClusterPtr, DefaultClusterCallback Callback); + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); private native void onWithTimedOff( long chipClusterPtr, DefaultClusterCallback Callback, Integer onOffControl, Integer onTime, - Integer offWaitTime); + Integer offWaitTime, + @Nullable Integer timedInvokeTimeoutMs); - private native void toggle(long chipClusterPtr, DefaultClusterCallback Callback); + private native void toggle( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); public interface AttributeListAttributeCallback { void onSuccess(List valueList); @@ -7466,7 +9175,12 @@ public void readOnTimeAttribute(IntegerAttributeCallback callback) { } public void writeOnTimeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnTimeAttribute(chipClusterPtr, callback, value); + writeOnTimeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOnTimeAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOnTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeOnTimeAttribute( @@ -7479,7 +9193,12 @@ public void readOffWaitTimeAttribute(IntegerAttributeCallback callback) { } public void writeOffWaitTimeAttribute(DefaultClusterCallback callback, Integer value) { - writeOffWaitTimeAttribute(chipClusterPtr, callback, value); + writeOffWaitTimeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOffWaitTimeAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOffWaitTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeOffWaitTimeAttribute( @@ -7492,7 +9211,12 @@ public void readStartUpOnOffAttribute(IntegerAttributeCallback callback) { } public void writeStartUpOnOffAttribute(DefaultClusterCallback callback, Integer value) { - writeStartUpOnOffAttribute(chipClusterPtr, callback, value); + writeStartUpOnOffAttribute(chipClusterPtr, callback, value, null); + } + + public void writeStartUpOnOffAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeStartUpOnOffAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeStartUpOnOffAttribute( @@ -7536,7 +9260,10 @@ private native void subscribeGlobalSceneControlAttribute( private native void readOnTimeAttribute(long chipClusterPtr, IntegerAttributeCallback callback); private native void writeOnTimeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeOnTimeAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -7545,7 +9272,10 @@ private native void readOffWaitTimeAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeOffWaitTimeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeOffWaitTimeAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -7554,7 +9284,10 @@ private native void readStartUpOnOffAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeStartUpOnOffAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeStartUpOnOffAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -7576,14 +9309,12 @@ private native void subscribeClusterRevisionAttribute( } public static class OnOffSwitchConfigurationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 7L; + public OnOffSwitchConfigurationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("7"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -7609,7 +9340,12 @@ public void readSwitchActionsAttribute(IntegerAttributeCallback callback) { } public void writeSwitchActionsAttribute(DefaultClusterCallback callback, Integer value) { - writeSwitchActionsAttribute(chipClusterPtr, callback, value); + writeSwitchActionsAttribute(chipClusterPtr, callback, value, null); + } + + public void writeSwitchActionsAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeSwitchActionsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeSwitchActionsAttribute( @@ -7640,7 +9376,10 @@ private native void readSwitchActionsAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeSwitchActionsAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeSwitchActionsAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -7656,14 +9395,12 @@ private native void subscribeClusterRevisionAttribute( } public static class OperationalCredentialsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 62L; + public OperationalCredentialsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("62"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -7674,42 +9411,115 @@ public void addNOC( byte[] IPKValue, Long caseAdminNode, Integer adminVendorId) { - addNOC(chipClusterPtr, callback, NOCValue, ICACValue, IPKValue, caseAdminNode, adminVendorId); + addNOC( + chipClusterPtr, + callback, + NOCValue, + ICACValue, + IPKValue, + caseAdminNode, + adminVendorId, + null); + } + + public void addNOC( + NOCResponseCallback callback, + byte[] NOCValue, + Optional ICACValue, + byte[] IPKValue, + Long caseAdminNode, + Integer adminVendorId, + int timedInvokeTimeoutMs) { + addNOC( + chipClusterPtr, + callback, + NOCValue, + ICACValue, + IPKValue, + caseAdminNode, + adminVendorId, + timedInvokeTimeoutMs); } public void addTrustedRootCertificate(DefaultClusterCallback callback, byte[] rootCertificate) { - addTrustedRootCertificate(chipClusterPtr, callback, rootCertificate); + addTrustedRootCertificate(chipClusterPtr, callback, rootCertificate, null); + } + + public void addTrustedRootCertificate( + DefaultClusterCallback callback, byte[] rootCertificate, int timedInvokeTimeoutMs) { + addTrustedRootCertificate(chipClusterPtr, callback, rootCertificate, timedInvokeTimeoutMs); } public void attestationRequest(AttestationResponseCallback callback, byte[] attestationNonce) { - attestationRequest(chipClusterPtr, callback, attestationNonce); + attestationRequest(chipClusterPtr, callback, attestationNonce, null); + } + + public void attestationRequest( + AttestationResponseCallback callback, byte[] attestationNonce, int timedInvokeTimeoutMs) { + attestationRequest(chipClusterPtr, callback, attestationNonce, timedInvokeTimeoutMs); } public void certificateChainRequest( CertificateChainResponseCallback callback, Integer certificateType) { - certificateChainRequest(chipClusterPtr, callback, certificateType); + certificateChainRequest(chipClusterPtr, callback, certificateType, null); + } + + public void certificateChainRequest( + CertificateChainResponseCallback callback, + Integer certificateType, + int timedInvokeTimeoutMs) { + certificateChainRequest(chipClusterPtr, callback, certificateType, timedInvokeTimeoutMs); } public void opCSRRequest(OpCSRResponseCallback callback, byte[] CSRNonce) { - opCSRRequest(chipClusterPtr, callback, CSRNonce); + opCSRRequest(chipClusterPtr, callback, CSRNonce, null); + } + + public void opCSRRequest( + OpCSRResponseCallback callback, byte[] CSRNonce, int timedInvokeTimeoutMs) { + opCSRRequest(chipClusterPtr, callback, CSRNonce, timedInvokeTimeoutMs); } public void removeFabric(NOCResponseCallback callback, Integer fabricIndex) { - removeFabric(chipClusterPtr, callback, fabricIndex); + removeFabric(chipClusterPtr, callback, fabricIndex, null); + } + + public void removeFabric( + NOCResponseCallback callback, Integer fabricIndex, int timedInvokeTimeoutMs) { + removeFabric(chipClusterPtr, callback, fabricIndex, timedInvokeTimeoutMs); } public void removeTrustedRootCertificate( DefaultClusterCallback callback, byte[] trustedRootIdentifier) { - removeTrustedRootCertificate(chipClusterPtr, callback, trustedRootIdentifier); + removeTrustedRootCertificate(chipClusterPtr, callback, trustedRootIdentifier, null); + } + + public void removeTrustedRootCertificate( + DefaultClusterCallback callback, byte[] trustedRootIdentifier, int timedInvokeTimeoutMs) { + removeTrustedRootCertificate( + chipClusterPtr, callback, trustedRootIdentifier, timedInvokeTimeoutMs); } public void updateFabricLabel(NOCResponseCallback callback, String label) { - updateFabricLabel(chipClusterPtr, callback, label); + updateFabricLabel(chipClusterPtr, callback, label, null); + } + + public void updateFabricLabel( + NOCResponseCallback callback, String label, int timedInvokeTimeoutMs) { + updateFabricLabel(chipClusterPtr, callback, label, timedInvokeTimeoutMs); } public void updateNOC( NOCResponseCallback callback, byte[] NOCValue, Optional ICACValue) { - updateNOC(chipClusterPtr, callback, NOCValue, ICACValue); + updateNOC(chipClusterPtr, callback, NOCValue, ICACValue, null); + } + + public void updateNOC( + NOCResponseCallback callback, + byte[] NOCValue, + Optional ICACValue, + int timedInvokeTimeoutMs) { + updateNOC(chipClusterPtr, callback, NOCValue, ICACValue, timedInvokeTimeoutMs); } private native void addNOC( @@ -7719,34 +9529,57 @@ private native void addNOC( Optional ICACValue, byte[] IPKValue, Long caseAdminNode, - Integer adminVendorId); + Integer adminVendorId, + @Nullable Integer timedInvokeTimeoutMs); private native void addTrustedRootCertificate( - long chipClusterPtr, DefaultClusterCallback Callback, byte[] rootCertificate); + long chipClusterPtr, + DefaultClusterCallback Callback, + byte[] rootCertificate, + @Nullable Integer timedInvokeTimeoutMs); private native void attestationRequest( - long chipClusterPtr, AttestationResponseCallback Callback, byte[] attestationNonce); + long chipClusterPtr, + AttestationResponseCallback Callback, + byte[] attestationNonce, + @Nullable Integer timedInvokeTimeoutMs); private native void certificateChainRequest( - long chipClusterPtr, CertificateChainResponseCallback Callback, Integer certificateType); + long chipClusterPtr, + CertificateChainResponseCallback Callback, + Integer certificateType, + @Nullable Integer timedInvokeTimeoutMs); private native void opCSRRequest( - long chipClusterPtr, OpCSRResponseCallback Callback, byte[] CSRNonce); + long chipClusterPtr, + OpCSRResponseCallback Callback, + byte[] CSRNonce, + @Nullable Integer timedInvokeTimeoutMs); private native void removeFabric( - long chipClusterPtr, NOCResponseCallback Callback, Integer fabricIndex); + long chipClusterPtr, + NOCResponseCallback Callback, + Integer fabricIndex, + @Nullable Integer timedInvokeTimeoutMs); private native void removeTrustedRootCertificate( - long chipClusterPtr, DefaultClusterCallback Callback, byte[] trustedRootIdentifier); + long chipClusterPtr, + DefaultClusterCallback Callback, + byte[] trustedRootIdentifier, + @Nullable Integer timedInvokeTimeoutMs); private native void updateFabricLabel( - long chipClusterPtr, NOCResponseCallback Callback, String label); + long chipClusterPtr, + NOCResponseCallback Callback, + String label, + @Nullable Integer timedInvokeTimeoutMs); private native void updateNOC( long chipClusterPtr, NOCResponseCallback Callback, byte[] NOCValue, - Optional ICACValue); + Optional ICACValue, + @Nullable Integer timedInvokeTimeoutMs); public interface AttestationResponseCallback { void onSuccess(byte[] AttestationElements, byte[] Signature); @@ -7945,14 +9778,12 @@ private native void subscribeClusterRevisionAttribute( } public static class PowerSourceCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 47L; + public PowerSourceCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("47"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -8139,14 +9970,12 @@ private native void subscribeClusterRevisionAttribute( } public static class PowerSourceConfigurationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 46L; + 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); @@ -8189,14 +10018,12 @@ private native void readClusterRevisionAttribute( } public static class PressureMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1027L; + public PressureMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1027"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -8277,14 +10104,12 @@ private native void subscribeClusterRevisionAttribute( } public static class PumpConfigurationAndControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 512L; + public PumpConfigurationAndControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("512"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -8480,7 +10305,12 @@ public void readLifetimeRunningHoursAttribute(LifetimeRunningHoursAttributeCallb public void writeLifetimeRunningHoursAttribute( DefaultClusterCallback callback, @Nullable Long value) { - writeLifetimeRunningHoursAttribute(chipClusterPtr, callback, value); + writeLifetimeRunningHoursAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLifetimeRunningHoursAttribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeLifetimeRunningHoursAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeLifetimeRunningHoursAttribute( @@ -8504,7 +10334,12 @@ public void readLifetimeEnergyConsumedAttribute( public void writeLifetimeEnergyConsumedAttribute( DefaultClusterCallback callback, @Nullable Long value) { - writeLifetimeEnergyConsumedAttribute(chipClusterPtr, callback, value); + writeLifetimeEnergyConsumedAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLifetimeEnergyConsumedAttribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeLifetimeEnergyConsumedAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeLifetimeEnergyConsumedAttribute( @@ -8517,7 +10352,12 @@ public void readOperationModeAttribute(IntegerAttributeCallback callback) { } public void writeOperationModeAttribute(DefaultClusterCallback callback, Integer value) { - writeOperationModeAttribute(chipClusterPtr, callback, value); + writeOperationModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOperationModeAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOperationModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeOperationModeAttribute( @@ -8530,7 +10370,12 @@ public void readControlModeAttribute(IntegerAttributeCallback callback) { } public void writeControlModeAttribute(DefaultClusterCallback callback, Integer value) { - writeControlModeAttribute(chipClusterPtr, callback, value); + writeControlModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeControlModeAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeControlModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeControlModeAttribute( @@ -8680,7 +10525,10 @@ private native void readLifetimeRunningHoursAttribute( long chipClusterPtr, LifetimeRunningHoursAttributeCallback callback); private native void writeLifetimeRunningHoursAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeLifetimeRunningHoursAttribute( long chipClusterPtr, @@ -8697,7 +10545,10 @@ private native void readLifetimeEnergyConsumedAttribute( long chipClusterPtr, LifetimeEnergyConsumedAttributeCallback callback); private native void writeLifetimeEnergyConsumedAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeLifetimeEnergyConsumedAttribute( long chipClusterPtr, @@ -8709,7 +10560,10 @@ private native void readOperationModeAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeOperationModeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeOperationModeAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -8718,7 +10572,10 @@ private native void readControlModeAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeControlModeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeControlModeAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -8746,14 +10603,12 @@ private native void subscribeClusterRevisionAttribute( } public static class RelativeHumidityMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1029L; + public RelativeHumidityMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1029"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -8849,14 +10704,12 @@ private native void subscribeClusterRevisionAttribute( } public static class ScenesCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 5L; + public ScenesCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("5"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -8878,33 +10731,100 @@ public void addScene( sceneName, clusterId, length, - value); + value, + null); + } + + public void addScene( + AddSceneResponseCallback callback, + Integer groupId, + Integer sceneId, + Integer transitionTime, + String sceneName, + Long clusterId, + Integer length, + Integer value, + int timedInvokeTimeoutMs) { + addScene( + chipClusterPtr, + callback, + groupId, + sceneId, + transitionTime, + sceneName, + clusterId, + length, + value, + timedInvokeTimeoutMs); } public void getSceneMembership(GetSceneMembershipResponseCallback callback, Integer groupId) { - getSceneMembership(chipClusterPtr, callback, groupId); + getSceneMembership(chipClusterPtr, callback, groupId, null); + } + + public void getSceneMembership( + GetSceneMembershipResponseCallback callback, Integer groupId, int timedInvokeTimeoutMs) { + getSceneMembership(chipClusterPtr, callback, groupId, timedInvokeTimeoutMs); } public void recallScene( DefaultClusterCallback callback, Integer groupId, Integer sceneId, Integer transitionTime) { - recallScene(chipClusterPtr, callback, groupId, sceneId, transitionTime); + recallScene(chipClusterPtr, callback, groupId, sceneId, transitionTime, null); + } + + public void recallScene( + DefaultClusterCallback callback, + Integer groupId, + Integer sceneId, + Integer transitionTime, + int timedInvokeTimeoutMs) { + recallScene(chipClusterPtr, callback, groupId, sceneId, transitionTime, timedInvokeTimeoutMs); } public void removeAllScenes(RemoveAllScenesResponseCallback callback, Integer groupId) { - removeAllScenes(chipClusterPtr, callback, groupId); + removeAllScenes(chipClusterPtr, callback, groupId, null); + } + + public void removeAllScenes( + RemoveAllScenesResponseCallback callback, Integer groupId, int timedInvokeTimeoutMs) { + removeAllScenes(chipClusterPtr, callback, groupId, timedInvokeTimeoutMs); } public void removeScene( RemoveSceneResponseCallback callback, Integer groupId, Integer sceneId) { - removeScene(chipClusterPtr, callback, groupId, sceneId); + removeScene(chipClusterPtr, callback, groupId, sceneId, null); + } + + public void removeScene( + RemoveSceneResponseCallback callback, + Integer groupId, + Integer sceneId, + int timedInvokeTimeoutMs) { + removeScene(chipClusterPtr, callback, groupId, sceneId, timedInvokeTimeoutMs); } public void storeScene(StoreSceneResponseCallback callback, Integer groupId, Integer sceneId) { - storeScene(chipClusterPtr, callback, groupId, sceneId); + storeScene(chipClusterPtr, callback, groupId, sceneId, null); + } + + public void storeScene( + StoreSceneResponseCallback callback, + Integer groupId, + Integer sceneId, + int timedInvokeTimeoutMs) { + storeScene(chipClusterPtr, callback, groupId, sceneId, timedInvokeTimeoutMs); } public void viewScene(ViewSceneResponseCallback callback, Integer groupId, Integer sceneId) { - viewScene(chipClusterPtr, callback, groupId, sceneId); + viewScene(chipClusterPtr, callback, groupId, sceneId, null); + } + + public void viewScene( + ViewSceneResponseCallback callback, + Integer groupId, + Integer sceneId, + int timedInvokeTimeoutMs) { + viewScene(chipClusterPtr, callback, groupId, sceneId, timedInvokeTimeoutMs); } private native void addScene( @@ -8916,32 +10836,49 @@ private native void addScene( String sceneName, Long clusterId, Integer length, - Integer value); + Integer value, + @Nullable Integer timedInvokeTimeoutMs); private native void getSceneMembership( - long chipClusterPtr, GetSceneMembershipResponseCallback Callback, Integer groupId); + long chipClusterPtr, + GetSceneMembershipResponseCallback Callback, + Integer groupId, + @Nullable Integer timedInvokeTimeoutMs); private native void recallScene( long chipClusterPtr, DefaultClusterCallback Callback, Integer groupId, Integer sceneId, - Integer transitionTime); + Integer transitionTime, + @Nullable Integer timedInvokeTimeoutMs); private native void removeAllScenes( - long chipClusterPtr, RemoveAllScenesResponseCallback Callback, Integer groupId); + long chipClusterPtr, + RemoveAllScenesResponseCallback Callback, + Integer groupId, + @Nullable Integer timedInvokeTimeoutMs); private native void removeScene( long chipClusterPtr, RemoveSceneResponseCallback Callback, Integer groupId, - Integer sceneId); + Integer sceneId, + @Nullable Integer timedInvokeTimeoutMs); private native void storeScene( - long chipClusterPtr, StoreSceneResponseCallback Callback, Integer groupId, Integer sceneId); + long chipClusterPtr, + StoreSceneResponseCallback Callback, + Integer groupId, + Integer sceneId, + @Nullable Integer timedInvokeTimeoutMs); private native void viewScene( - long chipClusterPtr, ViewSceneResponseCallback Callback, Integer groupId, Integer sceneId); + long chipClusterPtr, + ViewSceneResponseCallback Callback, + Integer groupId, + Integer sceneId, + @Nullable Integer timedInvokeTimeoutMs); public interface AddSceneResponseCallback { void onSuccess(Integer status, Integer groupId, Integer sceneId); @@ -9093,22 +11030,27 @@ private native void subscribeClusterRevisionAttribute( } public static class SoftwareDiagnosticsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 52L; + public SoftwareDiagnosticsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("52"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); public void resetWatermarks(DefaultClusterCallback callback) { - resetWatermarks(chipClusterPtr, callback); + resetWatermarks(chipClusterPtr, callback, null); + } + + public void resetWatermarks(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + resetWatermarks(chipClusterPtr, callback, timedInvokeTimeoutMs); } - private native void resetWatermarks(long chipClusterPtr, DefaultClusterCallback Callback); + private native void resetWatermarks( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); public static class ThreadMetricsAttribute { public Long id; @@ -9253,14 +11195,12 @@ private native void subscribeClusterRevisionAttribute( } public static class SwitchCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 59L; + public SwitchCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("59"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -9356,24 +11296,34 @@ private native void subscribeClusterRevisionAttribute( } public static class TargetNavigatorCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1285L; + public TargetNavigatorCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1285"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); public void navigateTargetRequest( NavigateTargetResponseCallback callback, Integer target, String data) { - navigateTargetRequest(chipClusterPtr, callback, target, data); + navigateTargetRequest(chipClusterPtr, callback, target, data, null); + } + + public void navigateTargetRequest( + NavigateTargetResponseCallback callback, + Integer target, + String data, + int timedInvokeTimeoutMs) { + navigateTargetRequest(chipClusterPtr, callback, target, data, timedInvokeTimeoutMs); } private native void navigateTargetRequest( - long chipClusterPtr, NavigateTargetResponseCallback Callback, Integer target, String data); + long chipClusterPtr, + NavigateTargetResponseCallback Callback, + Integer target, + String data, + @Nullable Integer timedInvokeTimeoutMs); public interface NavigateTargetResponseCallback { void onSuccess(Integer status, String data); @@ -9467,14 +11417,12 @@ private native void subscribeClusterRevisionAttribute( } public static class TemperatureMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1026L; + public TemperatureMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1026"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -9570,14 +11518,12 @@ private native void subscribeClusterRevisionAttribute( } public static class TestClusterCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1295L; + public TestClusterCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1295"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -9591,34 +11537,102 @@ public void simpleStructEchoRequest( Integer f, Float g, Double h) { - simpleStructEchoRequest(chipClusterPtr, callback, a, b, c, d, e, f, g, h); + simpleStructEchoRequest(chipClusterPtr, callback, a, b, c, d, e, f, g, h, null); + } + + public void simpleStructEchoRequest( + SimpleStructResponseCallback callback, + Integer a, + Boolean b, + Integer c, + byte[] d, + String e, + Integer f, + Float g, + Double h, + int timedInvokeTimeoutMs) { + simpleStructEchoRequest( + chipClusterPtr, callback, a, b, c, d, e, f, g, h, timedInvokeTimeoutMs); } public void test(DefaultClusterCallback callback) { - test(chipClusterPtr, callback); + test(chipClusterPtr, callback, null); + } + + public void test(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + test(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void testAddArguments( TestAddArgumentsResponseCallback callback, Integer arg1, Integer arg2) { - testAddArguments(chipClusterPtr, callback, arg1, arg2); + testAddArguments(chipClusterPtr, callback, arg1, arg2, null); + } + + public void testAddArguments( + TestAddArgumentsResponseCallback callback, + Integer arg1, + Integer arg2, + int timedInvokeTimeoutMs) { + testAddArguments(chipClusterPtr, callback, arg1, arg2, timedInvokeTimeoutMs); + } + + public void testEmitTestEventRequest( + TestEmitTestEventResponseCallback callback, Integer arg1, Integer arg2, Boolean arg3) { + testEmitTestEventRequest(chipClusterPtr, callback, arg1, arg2, arg3, null); + } + + public void testEmitTestEventRequest( + TestEmitTestEventResponseCallback callback, + Integer arg1, + Integer arg2, + Boolean arg3, + int timedInvokeTimeoutMs) { + testEmitTestEventRequest(chipClusterPtr, callback, arg1, arg2, arg3, timedInvokeTimeoutMs); } public void testEnumsRequest(TestEnumsResponseCallback callback, Integer arg1, Integer arg2) { - testEnumsRequest(chipClusterPtr, callback, arg1, arg2); + testEnumsRequest(chipClusterPtr, callback, arg1, arg2, null); + } + + public void testEnumsRequest( + TestEnumsResponseCallback callback, Integer arg1, Integer arg2, int timedInvokeTimeoutMs) { + testEnumsRequest(chipClusterPtr, callback, arg1, arg2, timedInvokeTimeoutMs); } public void testListInt8UArgumentRequest(BooleanResponseCallback callback, Integer arg1) { - testListInt8UArgumentRequest(chipClusterPtr, callback, arg1); + testListInt8UArgumentRequest(chipClusterPtr, callback, arg1, null); + } + + public void testListInt8UArgumentRequest( + BooleanResponseCallback callback, Integer arg1, int timedInvokeTimeoutMs) { + testListInt8UArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); } public void testListInt8UReverseRequest( TestListInt8UReverseResponseCallback callback, Integer arg1) { - testListInt8UReverseRequest(chipClusterPtr, callback, arg1); + testListInt8UReverseRequest(chipClusterPtr, callback, arg1, null); + } + + public void testListInt8UReverseRequest( + TestListInt8UReverseResponseCallback callback, Integer arg1, int timedInvokeTimeoutMs) { + testListInt8UReverseRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); } public void testListNestedStructListArgumentRequest( BooleanResponseCallback callback, Integer a, Boolean b, Long e, byte[] f, Integer g) { - testListNestedStructListArgumentRequest(chipClusterPtr, callback, a, b, e, f, g); + testListNestedStructListArgumentRequest(chipClusterPtr, callback, a, b, e, f, g, null); + } + + public void testListNestedStructListArgumentRequest( + BooleanResponseCallback callback, + Integer a, + Boolean b, + Long e, + byte[] f, + Integer g, + int timedInvokeTimeoutMs) { + testListNestedStructListArgumentRequest( + chipClusterPtr, callback, a, b, e, f, g, timedInvokeTimeoutMs); } public void testListStructArgumentRequest( @@ -9631,35 +11645,87 @@ public void testListStructArgumentRequest( Integer f, Float g, Double h) { - testListStructArgumentRequest(chipClusterPtr, callback, a, b, c, d, e, f, g, h); + testListStructArgumentRequest(chipClusterPtr, callback, a, b, c, d, e, f, g, h, null); + } + + public void testListStructArgumentRequest( + BooleanResponseCallback callback, + Integer a, + Boolean b, + Integer c, + byte[] d, + String e, + Integer f, + Float g, + Double h, + int timedInvokeTimeoutMs) { + testListStructArgumentRequest( + chipClusterPtr, callback, a, b, c, d, e, f, g, h, timedInvokeTimeoutMs); } public void testNestedStructArgumentRequest( BooleanResponseCallback callback, Integer a, Boolean b) { - testNestedStructArgumentRequest(chipClusterPtr, callback, a, b); + testNestedStructArgumentRequest(chipClusterPtr, callback, a, b, null); + } + + public void testNestedStructArgumentRequest( + BooleanResponseCallback callback, Integer a, Boolean b, int timedInvokeTimeoutMs) { + testNestedStructArgumentRequest(chipClusterPtr, callback, a, b, timedInvokeTimeoutMs); } public void testNestedStructListArgumentRequest( BooleanResponseCallback callback, Integer a, Boolean b, Long e, byte[] f, Integer g) { - testNestedStructListArgumentRequest(chipClusterPtr, callback, a, b, e, f, g); + testNestedStructListArgumentRequest(chipClusterPtr, callback, a, b, e, f, g, null); + } + + public void testNestedStructListArgumentRequest( + BooleanResponseCallback callback, + Integer a, + Boolean b, + Long e, + byte[] f, + Integer g, + int timedInvokeTimeoutMs) { + testNestedStructListArgumentRequest( + chipClusterPtr, callback, a, b, e, f, g, timedInvokeTimeoutMs); } public void testNotHandled(DefaultClusterCallback callback) { - testNotHandled(chipClusterPtr, callback); + testNotHandled(chipClusterPtr, callback, null); + } + + public void testNotHandled(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + testNotHandled(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void testNullableOptionalRequest( TestNullableOptionalResponseCallback callback, Optional arg1) { - testNullableOptionalRequest(chipClusterPtr, callback, arg1); + testNullableOptionalRequest(chipClusterPtr, callback, arg1, null); + } + + public void testNullableOptionalRequest( + TestNullableOptionalResponseCallback callback, + Optional arg1, + int timedInvokeTimeoutMs) { + testNullableOptionalRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); } public void testSimpleOptionalArgumentRequest( DefaultClusterCallback callback, Optional arg1) { - testSimpleOptionalArgumentRequest(chipClusterPtr, callback, arg1); + testSimpleOptionalArgumentRequest(chipClusterPtr, callback, arg1, null); + } + + public void testSimpleOptionalArgumentRequest( + DefaultClusterCallback callback, Optional arg1, int timedInvokeTimeoutMs) { + testSimpleOptionalArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); } public void testSpecific(TestSpecificResponseCallback callback) { - testSpecific(chipClusterPtr, callback); + testSpecific(chipClusterPtr, callback, null); + } + + public void testSpecific(TestSpecificResponseCallback callback, int timedInvokeTimeoutMs) { + testSpecific(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void testStructArgumentRequest( @@ -9672,15 +11738,34 @@ public void testStructArgumentRequest( Integer f, Float g, Double h) { - testStructArgumentRequest(chipClusterPtr, callback, a, b, c, d, e, f, g, h); + testStructArgumentRequest(chipClusterPtr, callback, a, b, c, d, e, f, g, h, null); + } + + public void testStructArgumentRequest( + BooleanResponseCallback callback, + Integer a, + Boolean b, + Integer c, + byte[] d, + String e, + Integer f, + Float g, + Double h, + int timedInvokeTimeoutMs) { + testStructArgumentRequest( + chipClusterPtr, callback, a, b, c, d, e, f, g, h, timedInvokeTimeoutMs); } public void testUnknownCommand(DefaultClusterCallback callback) { - testUnknownCommand(chipClusterPtr, callback); + testUnknownCommand(chipClusterPtr, callback, null); + } + + public void testUnknownCommand(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + testUnknownCommand(chipClusterPtr, callback, timedInvokeTimeoutMs); } - public void timedInvokeRequest(DefaultClusterCallback callback) { - timedInvokeRequest(chipClusterPtr, callback); + public void timedInvokeRequest(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + timedInvokeRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } private native void simpleStructEchoRequest( @@ -9693,21 +11778,47 @@ private native void simpleStructEchoRequest( String e, Integer f, Float g, - Double h); + Double h, + @Nullable Integer timedInvokeTimeoutMs); - private native void test(long chipClusterPtr, DefaultClusterCallback Callback); + private native void test( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); private native void testAddArguments( - long chipClusterPtr, TestAddArgumentsResponseCallback Callback, Integer arg1, Integer arg2); + long chipClusterPtr, + TestAddArgumentsResponseCallback Callback, + Integer arg1, + Integer arg2, + @Nullable Integer timedInvokeTimeoutMs); + + private native void testEmitTestEventRequest( + long chipClusterPtr, + TestEmitTestEventResponseCallback Callback, + Integer arg1, + Integer arg2, + Boolean arg3, + @Nullable Integer timedInvokeTimeoutMs); private native void testEnumsRequest( - long chipClusterPtr, TestEnumsResponseCallback Callback, Integer arg1, Integer arg2); + long chipClusterPtr, + TestEnumsResponseCallback Callback, + Integer arg1, + Integer arg2, + @Nullable Integer timedInvokeTimeoutMs); private native void testListInt8UArgumentRequest( - long chipClusterPtr, BooleanResponseCallback Callback, Integer arg1); + long chipClusterPtr, + BooleanResponseCallback Callback, + Integer arg1, + @Nullable Integer timedInvokeTimeoutMs); private native void testListInt8UReverseRequest( - long chipClusterPtr, TestListInt8UReverseResponseCallback Callback, Integer arg1); + long chipClusterPtr, + TestListInt8UReverseResponseCallback Callback, + Integer arg1, + @Nullable Integer timedInvokeTimeoutMs); private native void testListNestedStructListArgumentRequest( long chipClusterPtr, @@ -9716,7 +11827,8 @@ private native void testListNestedStructListArgumentRequest( Boolean b, Long e, byte[] f, - Integer g); + Integer g, + @Nullable Integer timedInvokeTimeoutMs); private native void testListStructArgumentRequest( long chipClusterPtr, @@ -9728,10 +11840,15 @@ private native void testListStructArgumentRequest( String e, Integer f, Float g, - Double h); + Double h, + @Nullable Integer timedInvokeTimeoutMs); private native void testNestedStructArgumentRequest( - long chipClusterPtr, BooleanResponseCallback Callback, Integer a, Boolean b); + long chipClusterPtr, + BooleanResponseCallback Callback, + Integer a, + Boolean b, + @Nullable Integer timedInvokeTimeoutMs); private native void testNestedStructListArgumentRequest( long chipClusterPtr, @@ -9740,17 +11857,30 @@ private native void testNestedStructListArgumentRequest( Boolean b, Long e, byte[] f, - Integer g); + Integer g, + @Nullable Integer timedInvokeTimeoutMs); - private native void testNotHandled(long chipClusterPtr, DefaultClusterCallback Callback); + private native void testNotHandled( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); private native void testNullableOptionalRequest( - long chipClusterPtr, TestNullableOptionalResponseCallback Callback, Optional arg1); + long chipClusterPtr, + TestNullableOptionalResponseCallback Callback, + Optional arg1, + @Nullable Integer timedInvokeTimeoutMs); private native void testSimpleOptionalArgumentRequest( - long chipClusterPtr, DefaultClusterCallback Callback, Optional arg1); + long chipClusterPtr, + DefaultClusterCallback Callback, + Optional arg1, + @Nullable Integer timedInvokeTimeoutMs); - private native void testSpecific(long chipClusterPtr, TestSpecificResponseCallback Callback); + private native void testSpecific( + long chipClusterPtr, + TestSpecificResponseCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); private native void testStructArgumentRequest( long chipClusterPtr, @@ -9762,11 +11892,18 @@ private native void testStructArgumentRequest( String e, Integer f, Float g, - Double h); + Double h, + @Nullable Integer timedInvokeTimeoutMs); - private native void testUnknownCommand(long chipClusterPtr, DefaultClusterCallback Callback); + private native void testUnknownCommand( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); - private native void timedInvokeRequest(long chipClusterPtr, DefaultClusterCallback Callback); + private native void timedInvokeRequest( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); public interface BooleanResponseCallback { void onSuccess(Boolean value); @@ -9788,6 +11925,12 @@ public interface TestAddArgumentsResponseCallback { void onError(Exception error); } + public interface TestEmitTestEventResponseCallback { + void onSuccess(Long value); + + void onError(Exception error); + } + public interface TestEnumsResponseCallback { void onSuccess(Integer arg1, Integer arg2); @@ -10190,7 +12333,12 @@ public void readBooleanAttribute(BooleanAttributeCallback callback) { } public void writeBooleanAttribute(DefaultClusterCallback callback, Boolean value) { - writeBooleanAttribute(chipClusterPtr, callback, value); + writeBooleanAttribute(chipClusterPtr, callback, value, null); + } + + public void writeBooleanAttribute( + DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeBooleanAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeBooleanAttribute( @@ -10203,7 +12351,12 @@ public void readBitmap8Attribute(IntegerAttributeCallback callback) { } public void writeBitmap8Attribute(DefaultClusterCallback callback, Integer value) { - writeBitmap8Attribute(chipClusterPtr, callback, value); + writeBitmap8Attribute(chipClusterPtr, callback, value, null); + } + + public void writeBitmap8Attribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeBitmap8Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeBitmap8Attribute( @@ -10216,7 +12369,12 @@ public void readBitmap16Attribute(IntegerAttributeCallback callback) { } public void writeBitmap16Attribute(DefaultClusterCallback callback, Integer value) { - writeBitmap16Attribute(chipClusterPtr, callback, value); + writeBitmap16Attribute(chipClusterPtr, callback, value, null); + } + + public void writeBitmap16Attribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeBitmap16Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeBitmap16Attribute( @@ -10229,7 +12387,12 @@ public void readBitmap32Attribute(LongAttributeCallback callback) { } public void writeBitmap32Attribute(DefaultClusterCallback callback, Long value) { - writeBitmap32Attribute(chipClusterPtr, callback, value); + writeBitmap32Attribute(chipClusterPtr, callback, value, null); + } + + public void writeBitmap32Attribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeBitmap32Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeBitmap32Attribute( @@ -10242,7 +12405,12 @@ public void readBitmap64Attribute(LongAttributeCallback callback) { } public void writeBitmap64Attribute(DefaultClusterCallback callback, Long value) { - writeBitmap64Attribute(chipClusterPtr, callback, value); + writeBitmap64Attribute(chipClusterPtr, callback, value, null); + } + + public void writeBitmap64Attribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeBitmap64Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeBitmap64Attribute( @@ -10255,7 +12423,12 @@ public void readInt8uAttribute(IntegerAttributeCallback callback) { } public void writeInt8uAttribute(DefaultClusterCallback callback, Integer value) { - writeInt8uAttribute(chipClusterPtr, callback, value); + writeInt8uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt8uAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeInt8uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt8uAttribute( @@ -10268,7 +12441,12 @@ public void readInt16uAttribute(IntegerAttributeCallback callback) { } public void writeInt16uAttribute(DefaultClusterCallback callback, Integer value) { - writeInt16uAttribute(chipClusterPtr, callback, value); + writeInt16uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt16uAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeInt16uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt16uAttribute( @@ -10281,7 +12459,12 @@ public void readInt24uAttribute(LongAttributeCallback callback) { } public void writeInt24uAttribute(DefaultClusterCallback callback, Long value) { - writeInt24uAttribute(chipClusterPtr, callback, value); + writeInt24uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt24uAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt24uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt24uAttribute( @@ -10294,7 +12477,12 @@ public void readInt32uAttribute(LongAttributeCallback callback) { } public void writeInt32uAttribute(DefaultClusterCallback callback, Long value) { - writeInt32uAttribute(chipClusterPtr, callback, value); + writeInt32uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt32uAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt32uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt32uAttribute( @@ -10307,7 +12495,12 @@ public void readInt40uAttribute(LongAttributeCallback callback) { } public void writeInt40uAttribute(DefaultClusterCallback callback, Long value) { - writeInt40uAttribute(chipClusterPtr, callback, value); + writeInt40uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt40uAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt40uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt40uAttribute( @@ -10320,7 +12513,12 @@ public void readInt48uAttribute(LongAttributeCallback callback) { } public void writeInt48uAttribute(DefaultClusterCallback callback, Long value) { - writeInt48uAttribute(chipClusterPtr, callback, value); + writeInt48uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt48uAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt48uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt48uAttribute( @@ -10333,7 +12531,12 @@ public void readInt56uAttribute(LongAttributeCallback callback) { } public void writeInt56uAttribute(DefaultClusterCallback callback, Long value) { - writeInt56uAttribute(chipClusterPtr, callback, value); + writeInt56uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt56uAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt56uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt56uAttribute( @@ -10346,7 +12549,12 @@ public void readInt64uAttribute(LongAttributeCallback callback) { } public void writeInt64uAttribute(DefaultClusterCallback callback, Long value) { - writeInt64uAttribute(chipClusterPtr, callback, value); + writeInt64uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt64uAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt64uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt64uAttribute( @@ -10359,7 +12567,12 @@ public void readInt8sAttribute(IntegerAttributeCallback callback) { } public void writeInt8sAttribute(DefaultClusterCallback callback, Integer value) { - writeInt8sAttribute(chipClusterPtr, callback, value); + writeInt8sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt8sAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeInt8sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt8sAttribute( @@ -10372,7 +12585,12 @@ public void readInt16sAttribute(IntegerAttributeCallback callback) { } public void writeInt16sAttribute(DefaultClusterCallback callback, Integer value) { - writeInt16sAttribute(chipClusterPtr, callback, value); + writeInt16sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt16sAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeInt16sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt16sAttribute( @@ -10385,7 +12603,12 @@ public void readInt24sAttribute(LongAttributeCallback callback) { } public void writeInt24sAttribute(DefaultClusterCallback callback, Long value) { - writeInt24sAttribute(chipClusterPtr, callback, value); + writeInt24sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt24sAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt24sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt24sAttribute( @@ -10398,7 +12621,12 @@ public void readInt32sAttribute(LongAttributeCallback callback) { } public void writeInt32sAttribute(DefaultClusterCallback callback, Long value) { - writeInt32sAttribute(chipClusterPtr, callback, value); + writeInt32sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt32sAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt32sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt32sAttribute( @@ -10411,7 +12639,12 @@ public void readInt40sAttribute(LongAttributeCallback callback) { } public void writeInt40sAttribute(DefaultClusterCallback callback, Long value) { - writeInt40sAttribute(chipClusterPtr, callback, value); + writeInt40sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt40sAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt40sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt40sAttribute( @@ -10424,7 +12657,12 @@ public void readInt48sAttribute(LongAttributeCallback callback) { } public void writeInt48sAttribute(DefaultClusterCallback callback, Long value) { - writeInt48sAttribute(chipClusterPtr, callback, value); + writeInt48sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt48sAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt48sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt48sAttribute( @@ -10437,7 +12675,12 @@ public void readInt56sAttribute(LongAttributeCallback callback) { } public void writeInt56sAttribute(DefaultClusterCallback callback, Long value) { - writeInt56sAttribute(chipClusterPtr, callback, value); + writeInt56sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt56sAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt56sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt56sAttribute( @@ -10450,7 +12693,12 @@ public void readInt64sAttribute(LongAttributeCallback callback) { } public void writeInt64sAttribute(DefaultClusterCallback callback, Long value) { - writeInt64sAttribute(chipClusterPtr, callback, value); + writeInt64sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt64sAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt64sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt64sAttribute( @@ -10463,7 +12711,12 @@ public void readEnum8Attribute(IntegerAttributeCallback callback) { } public void writeEnum8Attribute(DefaultClusterCallback callback, Integer value) { - writeEnum8Attribute(chipClusterPtr, callback, value); + writeEnum8Attribute(chipClusterPtr, callback, value, null); + } + + public void writeEnum8Attribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeEnum8Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeEnum8Attribute( @@ -10476,7 +12729,12 @@ public void readEnum16Attribute(IntegerAttributeCallback callback) { } public void writeEnum16Attribute(DefaultClusterCallback callback, Integer value) { - writeEnum16Attribute(chipClusterPtr, callback, value); + writeEnum16Attribute(chipClusterPtr, callback, value, null); + } + + public void writeEnum16Attribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeEnum16Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeEnum16Attribute( @@ -10489,7 +12747,12 @@ public void readFloatSingleAttribute(FloatAttributeCallback callback) { } public void writeFloatSingleAttribute(DefaultClusterCallback callback, Float value) { - writeFloatSingleAttribute(chipClusterPtr, callback, value); + writeFloatSingleAttribute(chipClusterPtr, callback, value, null); + } + + public void writeFloatSingleAttribute( + DefaultClusterCallback callback, Float value, int timedWriteTimeoutMs) { + writeFloatSingleAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeFloatSingleAttribute( @@ -10502,7 +12765,12 @@ public void readFloatDoubleAttribute(DoubleAttributeCallback callback) { } public void writeFloatDoubleAttribute(DefaultClusterCallback callback, Double value) { - writeFloatDoubleAttribute(chipClusterPtr, callback, value); + writeFloatDoubleAttribute(chipClusterPtr, callback, value, null); + } + + public void writeFloatDoubleAttribute( + DefaultClusterCallback callback, Double value, int timedWriteTimeoutMs) { + writeFloatDoubleAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeFloatDoubleAttribute( @@ -10515,7 +12783,12 @@ public void readOctetStringAttribute(OctetStringAttributeCallback callback) { } public void writeOctetStringAttribute(DefaultClusterCallback callback, byte[] value) { - writeOctetStringAttribute(chipClusterPtr, callback, value); + writeOctetStringAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOctetStringAttribute( + DefaultClusterCallback callback, byte[] value, int timedWriteTimeoutMs) { + writeOctetStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeOctetStringAttribute( @@ -10541,7 +12814,12 @@ public void readLongOctetStringAttribute(OctetStringAttributeCallback callback) } public void writeLongOctetStringAttribute(DefaultClusterCallback callback, byte[] value) { - writeLongOctetStringAttribute(chipClusterPtr, callback, value); + writeLongOctetStringAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLongOctetStringAttribute( + DefaultClusterCallback callback, byte[] value, int timedWriteTimeoutMs) { + writeLongOctetStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeLongOctetStringAttribute( @@ -10554,7 +12832,12 @@ public void readCharStringAttribute(CharStringAttributeCallback callback) { } public void writeCharStringAttribute(DefaultClusterCallback callback, String value) { - writeCharStringAttribute(chipClusterPtr, callback, value); + writeCharStringAttribute(chipClusterPtr, callback, value, null); + } + + public void writeCharStringAttribute( + DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + writeCharStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeCharStringAttribute( @@ -10567,7 +12850,12 @@ public void readLongCharStringAttribute(CharStringAttributeCallback callback) { } public void writeLongCharStringAttribute(DefaultClusterCallback callback, String value) { - writeLongCharStringAttribute(chipClusterPtr, callback, value); + writeLongCharStringAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLongCharStringAttribute( + DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + writeLongCharStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeLongCharStringAttribute( @@ -10580,7 +12868,12 @@ public void readEpochUsAttribute(LongAttributeCallback callback) { } public void writeEpochUsAttribute(DefaultClusterCallback callback, Long value) { - writeEpochUsAttribute(chipClusterPtr, callback, value); + writeEpochUsAttribute(chipClusterPtr, callback, value, null); + } + + public void writeEpochUsAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeEpochUsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeEpochUsAttribute( @@ -10593,7 +12886,12 @@ public void readEpochSAttribute(LongAttributeCallback callback) { } public void writeEpochSAttribute(DefaultClusterCallback callback, Long value) { - writeEpochSAttribute(chipClusterPtr, callback, value); + writeEpochSAttribute(chipClusterPtr, callback, value, null); + } + + public void writeEpochSAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeEpochSAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeEpochSAttribute( @@ -10606,7 +12904,12 @@ public void readVendorIdAttribute(VendorIdAttributeCallback callback) { } public void writeVendorIdAttribute(DefaultClusterCallback callback, Integer value) { - writeVendorIdAttribute(chipClusterPtr, callback, value); + writeVendorIdAttribute(chipClusterPtr, callback, value, null); + } + + public void writeVendorIdAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeVendorIdAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeVendorIdAttribute( @@ -10624,7 +12927,12 @@ public void readEnumAttrAttribute(IntegerAttributeCallback callback) { } public void writeEnumAttrAttribute(DefaultClusterCallback callback, Integer value) { - writeEnumAttrAttribute(chipClusterPtr, callback, value); + writeEnumAttrAttribute(chipClusterPtr, callback, value, null); + } + + public void writeEnumAttrAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeEnumAttrAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeEnumAttrAttribute( @@ -10637,7 +12945,12 @@ public void readRangeRestrictedInt8uAttribute(IntegerAttributeCallback callback) } public void writeRangeRestrictedInt8uAttribute(DefaultClusterCallback callback, Integer value) { - writeRangeRestrictedInt8uAttribute(chipClusterPtr, callback, value); + writeRangeRestrictedInt8uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeRangeRestrictedInt8uAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeRangeRestrictedInt8uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeRangeRestrictedInt8uAttribute( @@ -10650,7 +12963,12 @@ public void readRangeRestrictedInt8sAttribute(IntegerAttributeCallback callback) } public void writeRangeRestrictedInt8sAttribute(DefaultClusterCallback callback, Integer value) { - writeRangeRestrictedInt8sAttribute(chipClusterPtr, callback, value); + writeRangeRestrictedInt8sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeRangeRestrictedInt8sAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeRangeRestrictedInt8sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeRangeRestrictedInt8sAttribute( @@ -10664,7 +12982,12 @@ public void readRangeRestrictedInt16uAttribute(IntegerAttributeCallback callback public void writeRangeRestrictedInt16uAttribute( DefaultClusterCallback callback, Integer value) { - writeRangeRestrictedInt16uAttribute(chipClusterPtr, callback, value); + writeRangeRestrictedInt16uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeRangeRestrictedInt16uAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeRangeRestrictedInt16uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeRangeRestrictedInt16uAttribute( @@ -10678,7 +13001,12 @@ public void readRangeRestrictedInt16sAttribute(IntegerAttributeCallback callback public void writeRangeRestrictedInt16sAttribute( DefaultClusterCallback callback, Integer value) { - writeRangeRestrictedInt16sAttribute(chipClusterPtr, callback, value); + writeRangeRestrictedInt16sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeRangeRestrictedInt16sAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeRangeRestrictedInt16sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeRangeRestrictedInt16sAttribute( @@ -10694,8 +13022,9 @@ public void readTimedWriteBooleanAttribute(BooleanAttributeCallback callback) { readTimedWriteBooleanAttribute(chipClusterPtr, callback); } - public void writeTimedWriteBooleanAttribute(DefaultClusterCallback callback, Boolean value) { - writeTimedWriteBooleanAttribute(chipClusterPtr, callback, value); + public void writeTimedWriteBooleanAttribute( + DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeTimedWriteBooleanAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void readUnsupportedAttribute(BooleanAttributeCallback callback) { @@ -10703,7 +13032,12 @@ public void readUnsupportedAttribute(BooleanAttributeCallback callback) { } public void writeUnsupportedAttribute(DefaultClusterCallback callback, Boolean value) { - writeUnsupportedAttribute(chipClusterPtr, callback, value); + writeUnsupportedAttribute(chipClusterPtr, callback, value, null); + } + + public void writeUnsupportedAttribute( + DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeUnsupportedAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeUnsupportedAttribute( @@ -10717,7 +13051,12 @@ public void readNullableBooleanAttribute(NullableBooleanAttributeCallback callba public void writeNullableBooleanAttribute( DefaultClusterCallback callback, @Nullable Boolean value) { - writeNullableBooleanAttribute(chipClusterPtr, callback, value); + writeNullableBooleanAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableBooleanAttribute( + DefaultClusterCallback callback, @Nullable Boolean value, int timedWriteTimeoutMs) { + writeNullableBooleanAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableBooleanAttribute( @@ -10731,7 +13070,12 @@ public void readNullableBitmap8Attribute(NullableBitmap8AttributeCallback callba public void writeNullableBitmap8Attribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeNullableBitmap8Attribute(chipClusterPtr, callback, value); + writeNullableBitmap8Attribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableBitmap8Attribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeNullableBitmap8Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableBitmap8Attribute( @@ -10745,7 +13089,12 @@ public void readNullableBitmap16Attribute(NullableBitmap16AttributeCallback call public void writeNullableBitmap16Attribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeNullableBitmap16Attribute(chipClusterPtr, callback, value); + writeNullableBitmap16Attribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableBitmap16Attribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeNullableBitmap16Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableBitmap16Attribute( @@ -10759,7 +13108,12 @@ public void readNullableBitmap32Attribute(NullableBitmap32AttributeCallback call public void writeNullableBitmap32Attribute( DefaultClusterCallback callback, @Nullable Long value) { - writeNullableBitmap32Attribute(chipClusterPtr, callback, value); + writeNullableBitmap32Attribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableBitmap32Attribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeNullableBitmap32Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableBitmap32Attribute( @@ -10773,7 +13127,12 @@ public void readNullableBitmap64Attribute(NullableBitmap64AttributeCallback call public void writeNullableBitmap64Attribute( DefaultClusterCallback callback, @Nullable Long value) { - writeNullableBitmap64Attribute(chipClusterPtr, callback, value); + writeNullableBitmap64Attribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableBitmap64Attribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeNullableBitmap64Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableBitmap64Attribute( @@ -10787,7 +13146,12 @@ public void readNullableInt8uAttribute(NullableInt8uAttributeCallback callback) public void writeNullableInt8uAttribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeNullableInt8uAttribute(chipClusterPtr, callback, value); + writeNullableInt8uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt8uAttribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeNullableInt8uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt8uAttribute( @@ -10801,7 +13165,12 @@ public void readNullableInt16uAttribute(NullableInt16uAttributeCallback callback public void writeNullableInt16uAttribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeNullableInt16uAttribute(chipClusterPtr, callback, value); + writeNullableInt16uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt16uAttribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeNullableInt16uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt16uAttribute( @@ -10815,7 +13184,12 @@ public void readNullableInt24uAttribute(NullableInt24uAttributeCallback callback public void writeNullableInt24uAttribute( DefaultClusterCallback callback, @Nullable Long value) { - writeNullableInt24uAttribute(chipClusterPtr, callback, value); + writeNullableInt24uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt24uAttribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeNullableInt24uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt24uAttribute( @@ -10829,7 +13203,12 @@ public void readNullableInt32uAttribute(NullableInt32uAttributeCallback callback public void writeNullableInt32uAttribute( DefaultClusterCallback callback, @Nullable Long value) { - writeNullableInt32uAttribute(chipClusterPtr, callback, value); + writeNullableInt32uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt32uAttribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeNullableInt32uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt32uAttribute( @@ -10843,7 +13222,12 @@ public void readNullableInt40uAttribute(NullableInt40uAttributeCallback callback public void writeNullableInt40uAttribute( DefaultClusterCallback callback, @Nullable Long value) { - writeNullableInt40uAttribute(chipClusterPtr, callback, value); + writeNullableInt40uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt40uAttribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeNullableInt40uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt40uAttribute( @@ -10857,7 +13241,12 @@ public void readNullableInt48uAttribute(NullableInt48uAttributeCallback callback public void writeNullableInt48uAttribute( DefaultClusterCallback callback, @Nullable Long value) { - writeNullableInt48uAttribute(chipClusterPtr, callback, value); + writeNullableInt48uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt48uAttribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeNullableInt48uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt48uAttribute( @@ -10871,7 +13260,12 @@ public void readNullableInt56uAttribute(NullableInt56uAttributeCallback callback public void writeNullableInt56uAttribute( DefaultClusterCallback callback, @Nullable Long value) { - writeNullableInt56uAttribute(chipClusterPtr, callback, value); + writeNullableInt56uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt56uAttribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeNullableInt56uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt56uAttribute( @@ -10885,7 +13279,12 @@ public void readNullableInt64uAttribute(NullableInt64uAttributeCallback callback public void writeNullableInt64uAttribute( DefaultClusterCallback callback, @Nullable Long value) { - writeNullableInt64uAttribute(chipClusterPtr, callback, value); + writeNullableInt64uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt64uAttribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeNullableInt64uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt64uAttribute( @@ -10899,7 +13298,12 @@ public void readNullableInt8sAttribute(NullableInt8sAttributeCallback callback) public void writeNullableInt8sAttribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeNullableInt8sAttribute(chipClusterPtr, callback, value); + writeNullableInt8sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt8sAttribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeNullableInt8sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt8sAttribute( @@ -10913,7 +13317,12 @@ public void readNullableInt16sAttribute(NullableInt16sAttributeCallback callback public void writeNullableInt16sAttribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeNullableInt16sAttribute(chipClusterPtr, callback, value); + writeNullableInt16sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt16sAttribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeNullableInt16sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt16sAttribute( @@ -10927,7 +13336,12 @@ public void readNullableInt24sAttribute(NullableInt24sAttributeCallback callback public void writeNullableInt24sAttribute( DefaultClusterCallback callback, @Nullable Long value) { - writeNullableInt24sAttribute(chipClusterPtr, callback, value); + writeNullableInt24sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt24sAttribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeNullableInt24sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt24sAttribute( @@ -10941,7 +13355,12 @@ public void readNullableInt32sAttribute(NullableInt32sAttributeCallback callback public void writeNullableInt32sAttribute( DefaultClusterCallback callback, @Nullable Long value) { - writeNullableInt32sAttribute(chipClusterPtr, callback, value); + writeNullableInt32sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt32sAttribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeNullableInt32sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt32sAttribute( @@ -10955,7 +13374,12 @@ public void readNullableInt40sAttribute(NullableInt40sAttributeCallback callback public void writeNullableInt40sAttribute( DefaultClusterCallback callback, @Nullable Long value) { - writeNullableInt40sAttribute(chipClusterPtr, callback, value); + writeNullableInt40sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt40sAttribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeNullableInt40sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt40sAttribute( @@ -10969,7 +13393,12 @@ public void readNullableInt48sAttribute(NullableInt48sAttributeCallback callback public void writeNullableInt48sAttribute( DefaultClusterCallback callback, @Nullable Long value) { - writeNullableInt48sAttribute(chipClusterPtr, callback, value); + writeNullableInt48sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt48sAttribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeNullableInt48sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt48sAttribute( @@ -10983,7 +13412,12 @@ public void readNullableInt56sAttribute(NullableInt56sAttributeCallback callback public void writeNullableInt56sAttribute( DefaultClusterCallback callback, @Nullable Long value) { - writeNullableInt56sAttribute(chipClusterPtr, callback, value); + writeNullableInt56sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt56sAttribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeNullableInt56sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt56sAttribute( @@ -10997,7 +13431,12 @@ public void readNullableInt64sAttribute(NullableInt64sAttributeCallback callback public void writeNullableInt64sAttribute( DefaultClusterCallback callback, @Nullable Long value) { - writeNullableInt64sAttribute(chipClusterPtr, callback, value); + writeNullableInt64sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt64sAttribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeNullableInt64sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt64sAttribute( @@ -11011,7 +13450,12 @@ public void readNullableEnum8Attribute(NullableEnum8AttributeCallback callback) public void writeNullableEnum8Attribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeNullableEnum8Attribute(chipClusterPtr, callback, value); + writeNullableEnum8Attribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableEnum8Attribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeNullableEnum8Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableEnum8Attribute( @@ -11025,7 +13469,12 @@ public void readNullableEnum16Attribute(NullableEnum16AttributeCallback callback public void writeNullableEnum16Attribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeNullableEnum16Attribute(chipClusterPtr, callback, value); + writeNullableEnum16Attribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableEnum16Attribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeNullableEnum16Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableEnum16Attribute( @@ -11039,7 +13488,12 @@ public void readNullableFloatSingleAttribute(NullableFloatSingleAttributeCallbac public void writeNullableFloatSingleAttribute( DefaultClusterCallback callback, @Nullable Float value) { - writeNullableFloatSingleAttribute(chipClusterPtr, callback, value); + writeNullableFloatSingleAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableFloatSingleAttribute( + DefaultClusterCallback callback, @Nullable Float value, int timedWriteTimeoutMs) { + writeNullableFloatSingleAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableFloatSingleAttribute( @@ -11053,7 +13507,12 @@ public void readNullableFloatDoubleAttribute(NullableFloatDoubleAttributeCallbac public void writeNullableFloatDoubleAttribute( DefaultClusterCallback callback, @Nullable Double value) { - writeNullableFloatDoubleAttribute(chipClusterPtr, callback, value); + writeNullableFloatDoubleAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableFloatDoubleAttribute( + DefaultClusterCallback callback, @Nullable Double value, int timedWriteTimeoutMs) { + writeNullableFloatDoubleAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableFloatDoubleAttribute( @@ -11067,7 +13526,12 @@ public void readNullableOctetStringAttribute(NullableOctetStringAttributeCallbac public void writeNullableOctetStringAttribute( DefaultClusterCallback callback, @Nullable byte[] value) { - writeNullableOctetStringAttribute(chipClusterPtr, callback, value); + writeNullableOctetStringAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableOctetStringAttribute( + DefaultClusterCallback callback, @Nullable byte[] value, int timedWriteTimeoutMs) { + writeNullableOctetStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableOctetStringAttribute( @@ -11081,7 +13545,12 @@ public void readNullableCharStringAttribute(NullableCharStringAttributeCallback public void writeNullableCharStringAttribute( DefaultClusterCallback callback, @Nullable String value) { - writeNullableCharStringAttribute(chipClusterPtr, callback, value); + writeNullableCharStringAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableCharStringAttribute( + DefaultClusterCallback callback, @Nullable String value, int timedWriteTimeoutMs) { + writeNullableCharStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableCharStringAttribute( @@ -11095,7 +13564,12 @@ public void readNullableEnumAttrAttribute(NullableEnumAttrAttributeCallback call public void writeNullableEnumAttrAttribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeNullableEnumAttrAttribute(chipClusterPtr, callback, value); + writeNullableEnumAttrAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableEnumAttrAttribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeNullableEnumAttrAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableEnumAttrAttribute( @@ -11110,7 +13584,13 @@ public void readNullableRangeRestrictedInt8uAttribute( public void writeNullableRangeRestrictedInt8uAttribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeNullableRangeRestrictedInt8uAttribute(chipClusterPtr, callback, value); + writeNullableRangeRestrictedInt8uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableRangeRestrictedInt8uAttribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeNullableRangeRestrictedInt8uAttribute( + chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableRangeRestrictedInt8uAttribute( @@ -11126,7 +13606,13 @@ public void readNullableRangeRestrictedInt8sAttribute( public void writeNullableRangeRestrictedInt8sAttribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeNullableRangeRestrictedInt8sAttribute(chipClusterPtr, callback, value); + writeNullableRangeRestrictedInt8sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableRangeRestrictedInt8sAttribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeNullableRangeRestrictedInt8sAttribute( + chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableRangeRestrictedInt8sAttribute( @@ -11142,7 +13628,13 @@ public void readNullableRangeRestrictedInt16uAttribute( public void writeNullableRangeRestrictedInt16uAttribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeNullableRangeRestrictedInt16uAttribute(chipClusterPtr, callback, value); + writeNullableRangeRestrictedInt16uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableRangeRestrictedInt16uAttribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeNullableRangeRestrictedInt16uAttribute( + chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableRangeRestrictedInt16uAttribute( @@ -11158,7 +13650,13 @@ public void readNullableRangeRestrictedInt16sAttribute( public void writeNullableRangeRestrictedInt16sAttribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeNullableRangeRestrictedInt16sAttribute(chipClusterPtr, callback, value); + writeNullableRangeRestrictedInt16sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableRangeRestrictedInt16sAttribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeNullableRangeRestrictedInt16sAttribute( + chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableRangeRestrictedInt16sAttribute( @@ -11184,7 +13682,10 @@ private native void readBooleanAttribute( long chipClusterPtr, BooleanAttributeCallback callback); private native void writeBooleanAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Boolean value); + long chipClusterPtr, + DefaultClusterCallback callback, + Boolean value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeBooleanAttribute( long chipClusterPtr, BooleanAttributeCallback callback, int minInterval, int maxInterval); @@ -11193,7 +13694,10 @@ private native void readBitmap8Attribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeBitmap8Attribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeBitmap8Attribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -11202,7 +13706,10 @@ private native void readBitmap16Attribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeBitmap16Attribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeBitmap16Attribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -11210,7 +13717,10 @@ private native void subscribeBitmap16Attribute( private native void readBitmap32Attribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeBitmap32Attribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeBitmap32Attribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11218,7 +13728,10 @@ private native void subscribeBitmap32Attribute( private native void readBitmap64Attribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeBitmap64Attribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeBitmap64Attribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11226,7 +13739,10 @@ private native void subscribeBitmap64Attribute( private native void readInt8uAttribute(long chipClusterPtr, IntegerAttributeCallback callback); private native void writeInt8uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt8uAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -11234,7 +13750,10 @@ private native void subscribeInt8uAttribute( private native void readInt16uAttribute(long chipClusterPtr, IntegerAttributeCallback callback); private native void writeInt16uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt16uAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -11242,7 +13761,10 @@ private native void subscribeInt16uAttribute( private native void readInt24uAttribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeInt24uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt24uAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11250,7 +13772,10 @@ private native void subscribeInt24uAttribute( private native void readInt32uAttribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeInt32uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt32uAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11258,7 +13783,10 @@ private native void subscribeInt32uAttribute( private native void readInt40uAttribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeInt40uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt40uAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11266,7 +13794,10 @@ private native void subscribeInt40uAttribute( private native void readInt48uAttribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeInt48uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt48uAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11274,7 +13805,10 @@ private native void subscribeInt48uAttribute( private native void readInt56uAttribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeInt56uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt56uAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11282,7 +13816,10 @@ private native void subscribeInt56uAttribute( private native void readInt64uAttribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeInt64uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt64uAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11290,7 +13827,10 @@ private native void subscribeInt64uAttribute( private native void readInt8sAttribute(long chipClusterPtr, IntegerAttributeCallback callback); private native void writeInt8sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt8sAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -11298,7 +13838,10 @@ private native void subscribeInt8sAttribute( private native void readInt16sAttribute(long chipClusterPtr, IntegerAttributeCallback callback); private native void writeInt16sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt16sAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -11306,7 +13849,10 @@ private native void subscribeInt16sAttribute( private native void readInt24sAttribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeInt24sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt24sAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11314,7 +13860,10 @@ private native void subscribeInt24sAttribute( private native void readInt32sAttribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeInt32sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt32sAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11322,7 +13871,10 @@ private native void subscribeInt32sAttribute( private native void readInt40sAttribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeInt40sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt40sAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11330,7 +13882,10 @@ private native void subscribeInt40sAttribute( private native void readInt48sAttribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeInt48sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt48sAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11338,7 +13893,10 @@ private native void subscribeInt48sAttribute( private native void readInt56sAttribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeInt56sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt56sAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11346,7 +13904,10 @@ private native void subscribeInt56sAttribute( private native void readInt64sAttribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeInt64sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt64sAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11354,7 +13915,10 @@ private native void subscribeInt64sAttribute( private native void readEnum8Attribute(long chipClusterPtr, IntegerAttributeCallback callback); private native void writeEnum8Attribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeEnum8Attribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -11362,7 +13926,10 @@ private native void subscribeEnum8Attribute( private native void readEnum16Attribute(long chipClusterPtr, IntegerAttributeCallback callback); private native void writeEnum16Attribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeEnum16Attribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -11371,7 +13938,10 @@ private native void readFloatSingleAttribute( long chipClusterPtr, FloatAttributeCallback callback); private native void writeFloatSingleAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Float value); + long chipClusterPtr, + DefaultClusterCallback callback, + Float value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeFloatSingleAttribute( long chipClusterPtr, FloatAttributeCallback callback, int minInterval, int maxInterval); @@ -11380,7 +13950,10 @@ private native void readFloatDoubleAttribute( long chipClusterPtr, DoubleAttributeCallback callback); private native void writeFloatDoubleAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Double value); + long chipClusterPtr, + DefaultClusterCallback callback, + Double value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeFloatDoubleAttribute( long chipClusterPtr, DoubleAttributeCallback callback, int minInterval, int maxInterval); @@ -11389,7 +13962,10 @@ private native void readOctetStringAttribute( long chipClusterPtr, OctetStringAttributeCallback callback); private native void writeOctetStringAttribute( - long chipClusterPtr, DefaultClusterCallback callback, byte[] value); + long chipClusterPtr, + DefaultClusterCallback callback, + byte[] value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeOctetStringAttribute( long chipClusterPtr, @@ -11410,7 +13986,10 @@ private native void readLongOctetStringAttribute( long chipClusterPtr, OctetStringAttributeCallback callback); private native void writeLongOctetStringAttribute( - long chipClusterPtr, DefaultClusterCallback callback, byte[] value); + long chipClusterPtr, + DefaultClusterCallback callback, + byte[] value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeLongOctetStringAttribute( long chipClusterPtr, @@ -11422,7 +14001,10 @@ private native void readCharStringAttribute( long chipClusterPtr, CharStringAttributeCallback callback); private native void writeCharStringAttribute( - long chipClusterPtr, DefaultClusterCallback callback, String value); + long chipClusterPtr, + DefaultClusterCallback callback, + String value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeCharStringAttribute( long chipClusterPtr, @@ -11434,7 +14016,10 @@ private native void readLongCharStringAttribute( long chipClusterPtr, CharStringAttributeCallback callback); private native void writeLongCharStringAttribute( - long chipClusterPtr, DefaultClusterCallback callback, String value); + long chipClusterPtr, + DefaultClusterCallback callback, + String value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeLongCharStringAttribute( long chipClusterPtr, @@ -11445,7 +14030,10 @@ private native void subscribeLongCharStringAttribute( private native void readEpochUsAttribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeEpochUsAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeEpochUsAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11453,7 +14041,10 @@ private native void subscribeEpochUsAttribute( private native void readEpochSAttribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeEpochSAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeEpochSAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11462,7 +14053,10 @@ private native void readVendorIdAttribute( long chipClusterPtr, VendorIdAttributeCallback callback); private native void writeVendorIdAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeVendorIdAttribute( long chipClusterPtr, VendorIdAttributeCallback callback, int minInterval, int maxInterval); @@ -11474,7 +14068,10 @@ private native void readEnumAttrAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeEnumAttrAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeEnumAttrAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -11483,7 +14080,10 @@ private native void readRangeRestrictedInt8uAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeRangeRestrictedInt8uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeRangeRestrictedInt8uAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -11492,7 +14092,10 @@ private native void readRangeRestrictedInt8sAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeRangeRestrictedInt8sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeRangeRestrictedInt8sAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -11501,7 +14104,10 @@ private native void readRangeRestrictedInt16uAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeRangeRestrictedInt16uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeRangeRestrictedInt16uAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -11510,7 +14116,10 @@ private native void readRangeRestrictedInt16sAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeRangeRestrictedInt16sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeRangeRestrictedInt16sAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -11522,13 +14131,19 @@ private native void readTimedWriteBooleanAttribute( long chipClusterPtr, BooleanAttributeCallback callback); private native void writeTimedWriteBooleanAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Boolean value); + long chipClusterPtr, + DefaultClusterCallback callback, + Boolean value, + @Nullable Integer timedWriteTimeoutMs); private native void readUnsupportedAttribute( long chipClusterPtr, BooleanAttributeCallback callback); private native void writeUnsupportedAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Boolean value); + long chipClusterPtr, + DefaultClusterCallback callback, + Boolean value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeUnsupportedAttribute( long chipClusterPtr, BooleanAttributeCallback callback, int minInterval, int maxInterval); @@ -11537,7 +14152,10 @@ private native void readNullableBooleanAttribute( long chipClusterPtr, NullableBooleanAttributeCallback callback); private native void writeNullableBooleanAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Boolean value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Boolean value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableBooleanAttribute( long chipClusterPtr, @@ -11549,7 +14167,10 @@ private native void readNullableBitmap8Attribute( long chipClusterPtr, NullableBitmap8AttributeCallback callback); private native void writeNullableBitmap8Attribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableBitmap8Attribute( long chipClusterPtr, @@ -11561,7 +14182,10 @@ private native void readNullableBitmap16Attribute( long chipClusterPtr, NullableBitmap16AttributeCallback callback); private native void writeNullableBitmap16Attribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableBitmap16Attribute( long chipClusterPtr, @@ -11573,7 +14197,10 @@ private native void readNullableBitmap32Attribute( long chipClusterPtr, NullableBitmap32AttributeCallback callback); private native void writeNullableBitmap32Attribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableBitmap32Attribute( long chipClusterPtr, @@ -11585,7 +14212,10 @@ private native void readNullableBitmap64Attribute( long chipClusterPtr, NullableBitmap64AttributeCallback callback); private native void writeNullableBitmap64Attribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableBitmap64Attribute( long chipClusterPtr, @@ -11597,7 +14227,10 @@ private native void readNullableInt8uAttribute( long chipClusterPtr, NullableInt8uAttributeCallback callback); private native void writeNullableInt8uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt8uAttribute( long chipClusterPtr, @@ -11609,7 +14242,10 @@ private native void readNullableInt16uAttribute( long chipClusterPtr, NullableInt16uAttributeCallback callback); private native void writeNullableInt16uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt16uAttribute( long chipClusterPtr, @@ -11621,7 +14257,10 @@ private native void readNullableInt24uAttribute( long chipClusterPtr, NullableInt24uAttributeCallback callback); private native void writeNullableInt24uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt24uAttribute( long chipClusterPtr, @@ -11633,7 +14272,10 @@ private native void readNullableInt32uAttribute( long chipClusterPtr, NullableInt32uAttributeCallback callback); private native void writeNullableInt32uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt32uAttribute( long chipClusterPtr, @@ -11645,7 +14287,10 @@ private native void readNullableInt40uAttribute( long chipClusterPtr, NullableInt40uAttributeCallback callback); private native void writeNullableInt40uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt40uAttribute( long chipClusterPtr, @@ -11657,7 +14302,10 @@ private native void readNullableInt48uAttribute( long chipClusterPtr, NullableInt48uAttributeCallback callback); private native void writeNullableInt48uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt48uAttribute( long chipClusterPtr, @@ -11669,7 +14317,10 @@ private native void readNullableInt56uAttribute( long chipClusterPtr, NullableInt56uAttributeCallback callback); private native void writeNullableInt56uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt56uAttribute( long chipClusterPtr, @@ -11681,7 +14332,10 @@ private native void readNullableInt64uAttribute( long chipClusterPtr, NullableInt64uAttributeCallback callback); private native void writeNullableInt64uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt64uAttribute( long chipClusterPtr, @@ -11693,7 +14347,10 @@ private native void readNullableInt8sAttribute( long chipClusterPtr, NullableInt8sAttributeCallback callback); private native void writeNullableInt8sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt8sAttribute( long chipClusterPtr, @@ -11705,7 +14362,10 @@ private native void readNullableInt16sAttribute( long chipClusterPtr, NullableInt16sAttributeCallback callback); private native void writeNullableInt16sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt16sAttribute( long chipClusterPtr, @@ -11717,7 +14377,10 @@ private native void readNullableInt24sAttribute( long chipClusterPtr, NullableInt24sAttributeCallback callback); private native void writeNullableInt24sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt24sAttribute( long chipClusterPtr, @@ -11729,7 +14392,10 @@ private native void readNullableInt32sAttribute( long chipClusterPtr, NullableInt32sAttributeCallback callback); private native void writeNullableInt32sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt32sAttribute( long chipClusterPtr, @@ -11741,7 +14407,10 @@ private native void readNullableInt40sAttribute( long chipClusterPtr, NullableInt40sAttributeCallback callback); private native void writeNullableInt40sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt40sAttribute( long chipClusterPtr, @@ -11753,7 +14422,10 @@ private native void readNullableInt48sAttribute( long chipClusterPtr, NullableInt48sAttributeCallback callback); private native void writeNullableInt48sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt48sAttribute( long chipClusterPtr, @@ -11765,7 +14437,10 @@ private native void readNullableInt56sAttribute( long chipClusterPtr, NullableInt56sAttributeCallback callback); private native void writeNullableInt56sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt56sAttribute( long chipClusterPtr, @@ -11777,7 +14452,10 @@ private native void readNullableInt64sAttribute( long chipClusterPtr, NullableInt64sAttributeCallback callback); private native void writeNullableInt64sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt64sAttribute( long chipClusterPtr, @@ -11789,7 +14467,10 @@ private native void readNullableEnum8Attribute( long chipClusterPtr, NullableEnum8AttributeCallback callback); private native void writeNullableEnum8Attribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableEnum8Attribute( long chipClusterPtr, @@ -11801,7 +14482,10 @@ private native void readNullableEnum16Attribute( long chipClusterPtr, NullableEnum16AttributeCallback callback); private native void writeNullableEnum16Attribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableEnum16Attribute( long chipClusterPtr, @@ -11813,7 +14497,10 @@ private native void readNullableFloatSingleAttribute( long chipClusterPtr, NullableFloatSingleAttributeCallback callback); private native void writeNullableFloatSingleAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Float value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Float value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableFloatSingleAttribute( long chipClusterPtr, @@ -11825,7 +14512,10 @@ private native void readNullableFloatDoubleAttribute( long chipClusterPtr, NullableFloatDoubleAttributeCallback callback); private native void writeNullableFloatDoubleAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Double value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Double value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableFloatDoubleAttribute( long chipClusterPtr, @@ -11837,7 +14527,10 @@ private native void readNullableOctetStringAttribute( long chipClusterPtr, NullableOctetStringAttributeCallback callback); private native void writeNullableOctetStringAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable byte[] value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable byte[] value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableOctetStringAttribute( long chipClusterPtr, @@ -11849,7 +14542,10 @@ private native void readNullableCharStringAttribute( long chipClusterPtr, NullableCharStringAttributeCallback callback); private native void writeNullableCharStringAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable String value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable String value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableCharStringAttribute( long chipClusterPtr, @@ -11861,7 +14557,10 @@ private native void readNullableEnumAttrAttribute( long chipClusterPtr, NullableEnumAttrAttributeCallback callback); private native void writeNullableEnumAttrAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableEnumAttrAttribute( long chipClusterPtr, @@ -11873,7 +14572,10 @@ private native void readNullableRangeRestrictedInt8uAttribute( long chipClusterPtr, NullableRangeRestrictedInt8uAttributeCallback callback); private native void writeNullableRangeRestrictedInt8uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableRangeRestrictedInt8uAttribute( long chipClusterPtr, @@ -11885,7 +14587,10 @@ private native void readNullableRangeRestrictedInt8sAttribute( long chipClusterPtr, NullableRangeRestrictedInt8sAttributeCallback callback); private native void writeNullableRangeRestrictedInt8sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableRangeRestrictedInt8sAttribute( long chipClusterPtr, @@ -11897,7 +14602,10 @@ private native void readNullableRangeRestrictedInt16uAttribute( long chipClusterPtr, NullableRangeRestrictedInt16uAttributeCallback callback); private native void writeNullableRangeRestrictedInt16uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableRangeRestrictedInt16uAttribute( long chipClusterPtr, @@ -11909,7 +14617,10 @@ private native void readNullableRangeRestrictedInt16sAttribute( long chipClusterPtr, NullableRangeRestrictedInt16sAttributeCallback callback); private native void writeNullableRangeRestrictedInt16sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableRangeRestrictedInt16sAttribute( long chipClusterPtr, @@ -11928,28 +14639,43 @@ private native void subscribeClusterRevisionAttribute( } public static class ThermostatCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 513L; + public ThermostatCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("513"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); public void clearWeeklySchedule(DefaultClusterCallback callback) { - clearWeeklySchedule(chipClusterPtr, callback); + clearWeeklySchedule(chipClusterPtr, callback, null); + } + + public void clearWeeklySchedule(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + clearWeeklySchedule(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void getRelayStatusLog(GetRelayStatusLogResponseCallback callback) { - getRelayStatusLog(chipClusterPtr, callback); + getRelayStatusLog(chipClusterPtr, callback, null); + } + + public void getRelayStatusLog( + GetRelayStatusLogResponseCallback callback, int timedInvokeTimeoutMs) { + getRelayStatusLog(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void getWeeklySchedule( GetWeeklyScheduleResponseCallback callback, Integer daysToReturn, Integer modeToReturn) { - getWeeklySchedule(chipClusterPtr, callback, daysToReturn, modeToReturn); + getWeeklySchedule(chipClusterPtr, callback, daysToReturn, modeToReturn, null); + } + + public void getWeeklySchedule( + GetWeeklyScheduleResponseCallback callback, + Integer daysToReturn, + Integer modeToReturn, + int timedInvokeTimeoutMs) { + getWeeklySchedule(chipClusterPtr, callback, daysToReturn, modeToReturn, timedInvokeTimeoutMs); } public void setWeeklySchedule( @@ -11964,23 +14690,52 @@ public void setWeeklySchedule( numberOfTransitionsForSequence, dayOfWeekForSequence, modeForSequence, - payload); + payload, + null); + } + + public void setWeeklySchedule( + DefaultClusterCallback callback, + Integer numberOfTransitionsForSequence, + Integer dayOfWeekForSequence, + Integer modeForSequence, + Integer payload, + int timedInvokeTimeoutMs) { + setWeeklySchedule( + chipClusterPtr, + callback, + numberOfTransitionsForSequence, + dayOfWeekForSequence, + modeForSequence, + payload, + timedInvokeTimeoutMs); } public void setpointRaiseLower(DefaultClusterCallback callback, Integer mode, Integer amount) { - setpointRaiseLower(chipClusterPtr, callback, mode, amount); + setpointRaiseLower(chipClusterPtr, callback, mode, amount, null); } - private native void clearWeeklySchedule(long chipClusterPtr, DefaultClusterCallback Callback); + public void setpointRaiseLower( + DefaultClusterCallback callback, Integer mode, Integer amount, int timedInvokeTimeoutMs) { + setpointRaiseLower(chipClusterPtr, callback, mode, amount, timedInvokeTimeoutMs); + } + + private native void clearWeeklySchedule( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); private native void getRelayStatusLog( - long chipClusterPtr, GetRelayStatusLogResponseCallback Callback); + long chipClusterPtr, + GetRelayStatusLogResponseCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); private native void getWeeklySchedule( long chipClusterPtr, GetWeeklyScheduleResponseCallback Callback, Integer daysToReturn, - Integer modeToReturn); + Integer modeToReturn, + @Nullable Integer timedInvokeTimeoutMs); private native void setWeeklySchedule( long chipClusterPtr, @@ -11988,10 +14743,15 @@ private native void setWeeklySchedule( Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, - Integer payload); + Integer payload, + @Nullable Integer timedInvokeTimeoutMs); private native void setpointRaiseLower( - long chipClusterPtr, DefaultClusterCallback Callback, Integer mode, Integer amount); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer mode, + Integer amount, + @Nullable Integer timedInvokeTimeoutMs); public interface GetRelayStatusLogResponseCallback { void onSuccess( @@ -12076,7 +14836,12 @@ public void readOccupiedCoolingSetpointAttribute(IntegerAttributeCallback callba public void writeOccupiedCoolingSetpointAttribute( DefaultClusterCallback callback, Integer value) { - writeOccupiedCoolingSetpointAttribute(chipClusterPtr, callback, value); + writeOccupiedCoolingSetpointAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOccupiedCoolingSetpointAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOccupiedCoolingSetpointAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeOccupiedCoolingSetpointAttribute( @@ -12090,7 +14855,12 @@ public void readOccupiedHeatingSetpointAttribute(IntegerAttributeCallback callba public void writeOccupiedHeatingSetpointAttribute( DefaultClusterCallback callback, Integer value) { - writeOccupiedHeatingSetpointAttribute(chipClusterPtr, callback, value); + writeOccupiedHeatingSetpointAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOccupiedHeatingSetpointAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOccupiedHeatingSetpointAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeOccupiedHeatingSetpointAttribute( @@ -12103,7 +14873,12 @@ public void readMinHeatSetpointLimitAttribute(IntegerAttributeCallback callback) } public void writeMinHeatSetpointLimitAttribute(DefaultClusterCallback callback, Integer value) { - writeMinHeatSetpointLimitAttribute(chipClusterPtr, callback, value); + writeMinHeatSetpointLimitAttribute(chipClusterPtr, callback, value, null); + } + + public void writeMinHeatSetpointLimitAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeMinHeatSetpointLimitAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeMinHeatSetpointLimitAttribute( @@ -12116,7 +14891,12 @@ public void readMaxHeatSetpointLimitAttribute(IntegerAttributeCallback callback) } public void writeMaxHeatSetpointLimitAttribute(DefaultClusterCallback callback, Integer value) { - writeMaxHeatSetpointLimitAttribute(chipClusterPtr, callback, value); + writeMaxHeatSetpointLimitAttribute(chipClusterPtr, callback, value, null); + } + + public void writeMaxHeatSetpointLimitAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeMaxHeatSetpointLimitAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeMaxHeatSetpointLimitAttribute( @@ -12129,7 +14909,12 @@ public void readMinCoolSetpointLimitAttribute(IntegerAttributeCallback callback) } public void writeMinCoolSetpointLimitAttribute(DefaultClusterCallback callback, Integer value) { - writeMinCoolSetpointLimitAttribute(chipClusterPtr, callback, value); + writeMinCoolSetpointLimitAttribute(chipClusterPtr, callback, value, null); + } + + public void writeMinCoolSetpointLimitAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeMinCoolSetpointLimitAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeMinCoolSetpointLimitAttribute( @@ -12142,7 +14927,12 @@ public void readMaxCoolSetpointLimitAttribute(IntegerAttributeCallback callback) } public void writeMaxCoolSetpointLimitAttribute(DefaultClusterCallback callback, Integer value) { - writeMaxCoolSetpointLimitAttribute(chipClusterPtr, callback, value); + writeMaxCoolSetpointLimitAttribute(chipClusterPtr, callback, value, null); + } + + public void writeMaxCoolSetpointLimitAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeMaxCoolSetpointLimitAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeMaxCoolSetpointLimitAttribute( @@ -12155,7 +14945,12 @@ public void readMinSetpointDeadBandAttribute(IntegerAttributeCallback callback) } public void writeMinSetpointDeadBandAttribute(DefaultClusterCallback callback, Integer value) { - writeMinSetpointDeadBandAttribute(chipClusterPtr, callback, value); + writeMinSetpointDeadBandAttribute(chipClusterPtr, callback, value, null); + } + + public void writeMinSetpointDeadBandAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeMinSetpointDeadBandAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeMinSetpointDeadBandAttribute( @@ -12169,7 +14964,13 @@ public void readControlSequenceOfOperationAttribute(IntegerAttributeCallback cal public void writeControlSequenceOfOperationAttribute( DefaultClusterCallback callback, Integer value) { - writeControlSequenceOfOperationAttribute(chipClusterPtr, callback, value); + writeControlSequenceOfOperationAttribute(chipClusterPtr, callback, value, null); + } + + public void writeControlSequenceOfOperationAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeControlSequenceOfOperationAttribute( + chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeControlSequenceOfOperationAttribute( @@ -12183,7 +14984,12 @@ public void readSystemModeAttribute(IntegerAttributeCallback callback) { } public void writeSystemModeAttribute(DefaultClusterCallback callback, Integer value) { - writeSystemModeAttribute(chipClusterPtr, callback, value); + writeSystemModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeSystemModeAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeSystemModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeSystemModeAttribute( @@ -12276,7 +15082,10 @@ private native void readOccupiedCoolingSetpointAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeOccupiedCoolingSetpointAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeOccupiedCoolingSetpointAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -12285,7 +15094,10 @@ private native void readOccupiedHeatingSetpointAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeOccupiedHeatingSetpointAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeOccupiedHeatingSetpointAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -12294,7 +15106,10 @@ private native void readMinHeatSetpointLimitAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeMinHeatSetpointLimitAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeMinHeatSetpointLimitAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -12303,7 +15118,10 @@ private native void readMaxHeatSetpointLimitAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeMaxHeatSetpointLimitAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeMaxHeatSetpointLimitAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -12312,7 +15130,10 @@ private native void readMinCoolSetpointLimitAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeMinCoolSetpointLimitAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeMinCoolSetpointLimitAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -12321,7 +15142,10 @@ private native void readMaxCoolSetpointLimitAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeMaxCoolSetpointLimitAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeMaxCoolSetpointLimitAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -12330,7 +15154,10 @@ private native void readMinSetpointDeadBandAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeMinSetpointDeadBandAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeMinSetpointDeadBandAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -12339,7 +15166,10 @@ private native void readControlSequenceOfOperationAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeControlSequenceOfOperationAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeControlSequenceOfOperationAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -12348,7 +15178,10 @@ private native void readSystemModeAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeSystemModeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeSystemModeAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -12388,14 +15221,12 @@ private native void subscribeClusterRevisionAttribute( } public static class ThermostatUserInterfaceConfigurationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 516L; + public ThermostatUserInterfaceConfigurationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("516"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -12413,7 +15244,12 @@ public void readTemperatureDisplayModeAttribute(IntegerAttributeCallback callbac public void writeTemperatureDisplayModeAttribute( DefaultClusterCallback callback, Integer value) { - writeTemperatureDisplayModeAttribute(chipClusterPtr, callback, value); + writeTemperatureDisplayModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeTemperatureDisplayModeAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeTemperatureDisplayModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeTemperatureDisplayModeAttribute( @@ -12426,7 +15262,12 @@ public void readKeypadLockoutAttribute(IntegerAttributeCallback callback) { } public void writeKeypadLockoutAttribute(DefaultClusterCallback callback, Integer value) { - writeKeypadLockoutAttribute(chipClusterPtr, callback, value); + writeKeypadLockoutAttribute(chipClusterPtr, callback, value, null); + } + + public void writeKeypadLockoutAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeKeypadLockoutAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeKeypadLockoutAttribute( @@ -12440,7 +15281,13 @@ public void readScheduleProgrammingVisibilityAttribute(IntegerAttributeCallback public void writeScheduleProgrammingVisibilityAttribute( DefaultClusterCallback callback, Integer value) { - writeScheduleProgrammingVisibilityAttribute(chipClusterPtr, callback, value); + writeScheduleProgrammingVisibilityAttribute(chipClusterPtr, callback, value, null); + } + + public void writeScheduleProgrammingVisibilityAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeScheduleProgrammingVisibilityAttribute( + chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeScheduleProgrammingVisibilityAttribute( @@ -12466,7 +15313,10 @@ private native void readTemperatureDisplayModeAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeTemperatureDisplayModeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeTemperatureDisplayModeAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -12475,7 +15325,10 @@ private native void readKeypadLockoutAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeKeypadLockoutAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeKeypadLockoutAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -12484,7 +15337,10 @@ private native void readScheduleProgrammingVisibilityAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeScheduleProgrammingVisibilityAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeScheduleProgrammingVisibilityAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -12500,22 +15356,27 @@ private native void subscribeClusterRevisionAttribute( } public static class ThreadNetworkDiagnosticsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 53L; + public ThreadNetworkDiagnosticsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("53"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); public void resetCounts(DefaultClusterCallback callback) { - resetCounts(chipClusterPtr, callback); + resetCounts(chipClusterPtr, callback, null); + } + + public void resetCounts(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + resetCounts(chipClusterPtr, callback, timedInvokeTimeoutMs); } - private native void resetCounts(long chipClusterPtr, DefaultClusterCallback Callback); + private native void resetCounts( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); public static class NeighborTableListAttribute { public Long extAddress; @@ -13827,14 +16688,12 @@ private native void subscribeClusterRevisionAttribute( } public static class UserLabelCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 65L; + public UserLabelCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("65"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -13886,14 +16745,12 @@ private native void readClusterRevisionAttribute( } public static class WakeOnLanCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1283L; + public WakeOnLanCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1283"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -13947,22 +16804,27 @@ private native void subscribeClusterRevisionAttribute( } public static class WiFiNetworkDiagnosticsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 54L; + public WiFiNetworkDiagnosticsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("54"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); public void resetCounts(DefaultClusterCallback callback) { - resetCounts(chipClusterPtr, callback); + resetCounts(chipClusterPtr, callback, null); + } + + public void resetCounts(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + resetCounts(chipClusterPtr, callback, timedInvokeTimeoutMs); } - private native void resetCounts(long chipClusterPtr, DefaultClusterCallback Callback); + private native void resetCounts( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); public interface AttributeListAttributeCallback { void onSuccess(List valueList); @@ -14200,74 +17062,139 @@ private native void subscribeClusterRevisionAttribute( } public static class WindowCoveringCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 258L; + public WindowCoveringCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("258"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); public void downOrClose(DefaultClusterCallback callback) { - downOrClose(chipClusterPtr, callback); + downOrClose(chipClusterPtr, callback, null); + } + + public void downOrClose(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + downOrClose(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void goToLiftPercentage( DefaultClusterCallback callback, Integer liftPercentageValue, Integer liftPercent100thsValue) { - goToLiftPercentage(chipClusterPtr, callback, liftPercentageValue, liftPercent100thsValue); + goToLiftPercentage( + chipClusterPtr, callback, liftPercentageValue, liftPercent100thsValue, null); + } + + public void goToLiftPercentage( + DefaultClusterCallback callback, + Integer liftPercentageValue, + Integer liftPercent100thsValue, + int timedInvokeTimeoutMs) { + goToLiftPercentage( + chipClusterPtr, + callback, + liftPercentageValue, + liftPercent100thsValue, + timedInvokeTimeoutMs); } public void goToLiftValue(DefaultClusterCallback callback, Integer liftValue) { - goToLiftValue(chipClusterPtr, callback, liftValue); + goToLiftValue(chipClusterPtr, callback, liftValue, null); + } + + public void goToLiftValue( + DefaultClusterCallback callback, Integer liftValue, int timedInvokeTimeoutMs) { + goToLiftValue(chipClusterPtr, callback, liftValue, timedInvokeTimeoutMs); } public void goToTiltPercentage( DefaultClusterCallback callback, Integer tiltPercentageValue, Integer tiltPercent100thsValue) { - goToTiltPercentage(chipClusterPtr, callback, tiltPercentageValue, tiltPercent100thsValue); + goToTiltPercentage( + chipClusterPtr, callback, tiltPercentageValue, tiltPercent100thsValue, null); + } + + public void goToTiltPercentage( + DefaultClusterCallback callback, + Integer tiltPercentageValue, + Integer tiltPercent100thsValue, + int timedInvokeTimeoutMs) { + goToTiltPercentage( + chipClusterPtr, + callback, + tiltPercentageValue, + tiltPercent100thsValue, + timedInvokeTimeoutMs); } public void goToTiltValue(DefaultClusterCallback callback, Integer tiltValue) { - goToTiltValue(chipClusterPtr, callback, tiltValue); + goToTiltValue(chipClusterPtr, callback, tiltValue, null); + } + + public void goToTiltValue( + DefaultClusterCallback callback, Integer tiltValue, int timedInvokeTimeoutMs) { + goToTiltValue(chipClusterPtr, callback, tiltValue, timedInvokeTimeoutMs); } public void stopMotion(DefaultClusterCallback callback) { - stopMotion(chipClusterPtr, callback); + stopMotion(chipClusterPtr, callback, null); + } + + public void stopMotion(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + stopMotion(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void upOrOpen(DefaultClusterCallback callback) { - upOrOpen(chipClusterPtr, callback); + upOrOpen(chipClusterPtr, callback, null); } - private native void downOrClose(long chipClusterPtr, DefaultClusterCallback Callback); + public void upOrOpen(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + upOrOpen(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + private native void downOrClose( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); private native void goToLiftPercentage( long chipClusterPtr, DefaultClusterCallback Callback, Integer liftPercentageValue, - Integer liftPercent100thsValue); + Integer liftPercent100thsValue, + @Nullable Integer timedInvokeTimeoutMs); private native void goToLiftValue( - long chipClusterPtr, DefaultClusterCallback Callback, Integer liftValue); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer liftValue, + @Nullable Integer timedInvokeTimeoutMs); private native void goToTiltPercentage( long chipClusterPtr, DefaultClusterCallback Callback, Integer tiltPercentageValue, - Integer tiltPercent100thsValue); + Integer tiltPercent100thsValue, + @Nullable Integer timedInvokeTimeoutMs); private native void goToTiltValue( - long chipClusterPtr, DefaultClusterCallback Callback, Integer tiltValue); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer tiltValue, + @Nullable Integer timedInvokeTimeoutMs); - private native void stopMotion(long chipClusterPtr, DefaultClusterCallback Callback); + private native void stopMotion( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); - private native void upOrOpen(long chipClusterPtr, DefaultClusterCallback Callback); + private native void upOrOpen( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); public interface CurrentPositionLiftAttributeCallback { void onSuccess(@Nullable Integer value); @@ -14512,7 +17439,12 @@ public void readModeAttribute(IntegerAttributeCallback callback) { } public void writeModeAttribute(DefaultClusterCallback callback, Integer value) { - writeModeAttribute(chipClusterPtr, callback, value); + writeModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeModeAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeModeAttribute( @@ -14673,7 +17605,10 @@ private native void subscribeInstalledClosedLimitTiltAttribute( private native void readModeAttribute(long chipClusterPtr, IntegerAttributeCallback callback); private native void writeModeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeModeAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index aabc135a13f3e1..460d8fa0dbef1c 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -2100,6 +2100,32 @@ public void onError(Exception ex) { } } + public static class DelegatedLocalizationConfigurationClusterSupportedLocalesAttributeCallback + implements ChipClusters.LocalizationConfigurationCluster.SupportedLocalesAttributeCallback, + 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 DelegatedLowPowerClusterAttributeListAttributeCallback implements ChipClusters.LowPowerCluster.AttributeListAttributeCallback, DelegatedClusterCallback { @@ -3459,6 +3485,30 @@ public void onError(Exception error) { } } + public static class DelegatedTestEmitTestEventResponseCallback + implements ChipClusters.TestClusterCluster.TestEmitTestEventResponseCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Long value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo valueResponseValue = new CommandResponseInfo("value", "long"); + responseValues.put(valueResponseValue, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + public static class DelegatedTestEnumsResponseCallback implements ChipClusters.TestClusterCluster.TestEnumsResponseCallback, DelegatedClusterCallback { @@ -4308,6 +4358,11 @@ public Map initializeClusterMap() { (ptr, endpointId) -> new ChipClusters.LevelControlCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("levelControl", levelControlClusterInfo); + ClusterInfo localizationConfigurationClusterInfo = + new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.LocalizationConfigurationCluster(ptr, endpointId), + new HashMap<>()); + clusterMap.put("localizationConfiguration", localizationConfigurationClusterInfo); ClusterInfo lowPowerClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.LowPowerCluster(ptr, endpointId), @@ -4495,6 +4550,9 @@ public void combineCommand( destination.get("illuminanceMeasurement").combineCommands(source.get("illuminanceMeasurement")); destination.get("keypadInput").combineCommands(source.get("keypadInput")); destination.get("levelControl").combineCommands(source.get("levelControl")); + destination + .get("localizationConfiguration") + .combineCommands(source.get("localizationConfiguration")); destination.get("lowPower").combineCommands(source.get("lowPower")); destination.get("mediaInput").combineCommands(source.get("mediaInput")); destination.get("mediaPlayback").combineCommands(source.get("mediaPlayback")); @@ -4563,7 +4621,8 @@ public Map> getCommandMap() { ((ChipClusters.AccountLoginCluster) cluster) .getSetupPINRequest( (ChipClusters.AccountLoginCluster.GetSetupPINResponseCallback) callback, - (String) commandArguments.get("tempAccountIdentifier")); + (String) commandArguments.get("tempAccountIdentifier"), + 10000); }, () -> new DelegatedGetSetupPINResponseCallback(), accountLogingetSetupPINRequestCommandParams); @@ -4602,7 +4661,7 @@ public Map> getCommandMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.AccountLoginCluster) cluster) - .logoutRequest((DefaultClusterCallback) callback); + .logoutRequest((DefaultClusterCallback) callback, 10000); }, () -> new DelegatedDefaultClusterCallback(), accountLoginlogoutRequestCommandParams); @@ -7209,6 +7268,9 @@ public Map> getCommandMap() { levelControlClusterInteractionInfoMap.put( "stopWithOnOff", levelControlstopWithOnOffInteractionInfo); commandMap.put("levelControl", levelControlClusterInteractionInfoMap); + Map localizationConfigurationClusterInteractionInfoMap = + new LinkedHashMap<>(); + commandMap.put("localizationConfiguration", localizationConfigurationClusterInteractionInfoMap); Map lowPowerClusterInteractionInfoMap = new LinkedHashMap<>(); Map lowPowersleepCommandParams = new LinkedHashMap(); @@ -8541,6 +8603,38 @@ public Map> getCommandMap() { testClustertestAddArgumentsCommandParams); testClusterClusterInteractionInfoMap.put( "testAddArguments", testClustertestAddArgumentsInteractionInfo); + Map testClustertestEmitTestEventRequestCommandParams = + new LinkedHashMap(); + CommandParameterInfo testClustertestEmitTestEventRequestarg1CommandParameterInfo = + new CommandParameterInfo("arg1", int.class); + testClustertestEmitTestEventRequestCommandParams.put( + "arg1", testClustertestEmitTestEventRequestarg1CommandParameterInfo); + + CommandParameterInfo testClustertestEmitTestEventRequestarg2CommandParameterInfo = + new CommandParameterInfo("arg2", int.class); + testClustertestEmitTestEventRequestCommandParams.put( + "arg2", testClustertestEmitTestEventRequestarg2CommandParameterInfo); + + CommandParameterInfo testClustertestEmitTestEventRequestarg3CommandParameterInfo = + new CommandParameterInfo("arg3", boolean.class); + testClustertestEmitTestEventRequestCommandParams.put( + "arg3", testClustertestEmitTestEventRequestarg3CommandParameterInfo); + + // Populate commands + InteractionInfo testClustertestEmitTestEventRequestInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TestClusterCluster) cluster) + .testEmitTestEventRequest( + (ChipClusters.TestClusterCluster.TestEmitTestEventResponseCallback) callback, + (Integer) commandArguments.get("arg1"), + (Integer) commandArguments.get("arg2"), + (Boolean) commandArguments.get("arg3")); + }, + () -> new DelegatedTestEmitTestEventResponseCallback(), + testClustertestEmitTestEventRequestCommandParams); + testClusterClusterInteractionInfoMap.put( + "testEmitTestEventRequest", testClustertestEmitTestEventRequestInteractionInfo); Map testClustertestEnumsRequestCommandParams = new LinkedHashMap(); CommandParameterInfo testClustertestEnumsRequestarg1CommandParameterInfo = @@ -8939,7 +9033,7 @@ public Map> getCommandMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.TestClusterCluster) cluster) - .timedInvokeRequest((DefaultClusterCallback) callback); + .timedInvokeRequest((DefaultClusterCallback) callback, 10000); }, () -> new DelegatedDefaultClusterCallback(), testClustertimedInvokeRequestCommandParams); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java index 2b72e2ba2654b4..683e425cab0083 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java @@ -3335,6 +3335,40 @@ public Map> getReadAttributeMap() { readLevelControlInteractionInfo.put( "readClusterRevisionAttribute", readLevelControlClusterRevisionAttributeInteractionInfo); readAttributeMap.put("levelControl", readLevelControlInteractionInfo); + Map readLocalizationConfigurationInteractionInfo = + new LinkedHashMap<>(); + Map readLocalizationConfigurationActiveLocaleCommandParams = + new LinkedHashMap(); + InteractionInfo readLocalizationConfigurationActiveLocaleAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.LocalizationConfigurationCluster) cluster) + .readActiveLocaleAttribute((ChipClusters.CharStringAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedCharStringAttributeCallback(), + readLocalizationConfigurationActiveLocaleCommandParams); + readLocalizationConfigurationInteractionInfo.put( + "readActiveLocaleAttribute", + readLocalizationConfigurationActiveLocaleAttributeInteractionInfo); + Map readLocalizationConfigurationSupportedLocalesCommandParams = + new LinkedHashMap(); + InteractionInfo readLocalizationConfigurationSupportedLocalesAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.LocalizationConfigurationCluster) cluster) + .readSupportedLocalesAttribute( + (ChipClusters.LocalizationConfigurationCluster + .SupportedLocalesAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedLocalizationConfigurationClusterSupportedLocalesAttributeCallback(), + readLocalizationConfigurationSupportedLocalesCommandParams); + readLocalizationConfigurationInteractionInfo.put( + "readSupportedLocalesAttribute", + readLocalizationConfigurationSupportedLocalesAttributeInteractionInfo); + readAttributeMap.put("localizationConfiguration", readLocalizationConfigurationInteractionInfo); Map readLowPowerInteractionInfo = new LinkedHashMap<>(); Map readLowPowerAttributeListCommandParams = 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 a9142c66b7e062..9f8f7539417b79 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java @@ -695,6 +695,28 @@ public Map> getWriteAttributeMap() { "writeStartUpCurrentLevelAttribute", writeLevelControlStartUpCurrentLevelAttributeInteractionInfo); writeAttributeMap.put("levelControl", writeLevelControlInteractionInfo); + Map writeLocalizationConfigurationInteractionInfo = + new LinkedHashMap<>(); + Map writeLocalizationConfigurationActiveLocaleCommandParams = + new LinkedHashMap(); + CommandParameterInfo localizationConfigurationactiveLocaleCommandParameterInfo = + new CommandParameterInfo("value", String.class); + writeLocalizationConfigurationActiveLocaleCommandParams.put( + "value", localizationConfigurationactiveLocaleCommandParameterInfo); + InteractionInfo writeLocalizationConfigurationActiveLocaleAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.LocalizationConfigurationCluster) cluster) + .writeActiveLocaleAttribute( + (DefaultClusterCallback) callback, (String) commandArguments.get("value")); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeLocalizationConfigurationActiveLocaleCommandParams); + writeLocalizationConfigurationInteractionInfo.put( + "writeActiveLocaleAttribute", + writeLocalizationConfigurationActiveLocaleAttributeInteractionInfo); + writeAttributeMap.put( + "localizationConfiguration", writeLocalizationConfigurationInteractionInfo); Map writeLowPowerInteractionInfo = new LinkedHashMap<>(); writeAttributeMap.put("lowPower", writeLowPowerInteractionInfo); Map writeMediaInputInteractionInfo = new LinkedHashMap<>(); @@ -1537,7 +1559,9 @@ public Map> getWriteAttributeMap() { (cluster, callback, commandArguments) -> { ((ChipClusters.TestClusterCluster) cluster) .writeTimedWriteBooleanAttribute( - (DefaultClusterCallback) callback, (Boolean) commandArguments.get("value")); + (DefaultClusterCallback) callback, + (Boolean) commandArguments.get("value"), + 10000); }, () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), writeTestClusterTimedWriteBooleanCommandParams); diff --git a/src/controller/python/chip/ChipDeviceCtrl.py b/src/controller/python/chip/ChipDeviceCtrl.py index 811e19003090cd..fc8e9ce780308e 100644 --- a/src/controller/python/chip/ChipDeviceCtrl.py +++ b/src/controller/python/chip/ChipDeviceCtrl.py @@ -400,11 +400,13 @@ def DeviceAvailableCallback(device, err): raise self._ChipStack.ErrorToException(CHIP_ERROR_INTERNAL) return returnDevice - async def SendCommand(self, nodeid: int, endpoint: int, payload: ClusterObjects.ClusterCommand, responseType=None): + async def SendCommand(self, nodeid: int, endpoint: int, payload: ClusterObjects.ClusterCommand, responseType=None, timedRequestTimeoutMs: int = None): ''' Send a cluster-object encapsulated command to a node and get returned a future that can be awaited upon to receive the response. If a valid responseType is passed in, that will be used to deserialize the object. If not, the type will be automatically deduced from the metadata received over the wire. + + timedWriteTimeoutMs: Timeout for a timed invoke request. Omit or set to 'None' to indicate a non-timed request. ''' eventLoop = asyncio.get_running_loop() @@ -417,17 +419,18 @@ async def SendCommand(self, nodeid: int, endpoint: int, payload: ClusterObjects. EndpointId=endpoint, ClusterId=payload.cluster_id, CommandId=payload.command_id, - ), payload) + ), payload, timedRequestTimeoutMs=timedRequestTimeoutMs) ) if res != 0: future.set_exception(self._ChipStack.ErrorToException(res)) return await future - async def WriteAttribute(self, nodeid: int, attributes: typing.List[typing.Tuple[int, ClusterObjects.ClusterAttributeDescriptor]]): + async def WriteAttribute(self, nodeid: int, attributes: typing.List[typing.Tuple[int, ClusterObjects.ClusterAttributeDescriptor]], timedRequestTimeoutMs: int = None): ''' Write a list of attributes on a target node. nodeId: Target's Node ID + timedWriteTimeoutMs: Timeout for a timed write request. Omit or set to 'None' to indicate a non-timed request. attributes: A list of tuples of type (endpoint, cluster-object): E.g @@ -445,7 +448,7 @@ async def WriteAttribute(self, nodeid: int, attributes: typing.List[typing.Tuple res = self._ChipStack.Call( lambda: ClusterAttribute.WriteAttributes( - future, eventLoop, device, attrs) + future, eventLoop, device, attrs, timedRequestTimeoutMs=timedRequestTimeoutMs) ) if res != 0: raise self._ChipStack.ErrorToException(res) diff --git a/src/controller/python/chip/clusters/Attribute.py b/src/controller/python/chip/clusters/Attribute.py index f49fb670eadf7e..b926c6fc4f735f 100644 --- a/src/controller/python/chip/clusters/Attribute.py +++ b/src/controller/python/chip/clusters/Attribute.py @@ -763,12 +763,14 @@ def _OnWriteDoneCallback(closure): ctypes.pythonapi.Py_DecRef(ctypes.py_object(closure)) -def WriteAttributes(future: Future, eventLoop, device, attributes: List[AttributeWriteRequest]) -> int: +def WriteAttributes(future: Future, eventLoop, device, attributes: List[AttributeWriteRequest], timedRequestTimeoutMs: int = None) -> int: handle = chip.native.GetLibraryHandle() - transaction = AsyncWriteTransaction(future, eventLoop) writeargs = [] for attr in attributes: + if attr.Attribute.must_use_timed_write and timedRequestTimeoutMs is None or timedRequestTimeoutMs == 0: + raise ValueError( + f"Attribute {attr.__class__} must use timed write, please specify a valid timedRequestTimeoutMs value.") path = chip.interaction_model.AttributePathIBstruct.parse( b'\x00' * chip.interaction_model.AttributePathIBstruct.sizeof()) path.EndpointId = attr.EndpointId @@ -780,9 +782,10 @@ def WriteAttributes(future: Future, eventLoop, device, attributes: List[Attribut writeargs.append(ctypes.c_char_p(bytes(tlv))) writeargs.append(ctypes.c_int(len(tlv))) + transaction = AsyncWriteTransaction(future, eventLoop) ctypes.pythonapi.Py_IncRef(ctypes.py_object(transaction)) res = handle.pychip_WriteClient_WriteAttributes( - ctypes.py_object(transaction), device, ctypes.c_size_t(len(attributes)), *writeargs) + ctypes.py_object(transaction), device, ctypes.c_uint16(0 if timedRequestTimeoutMs is None else timedRequestTimeoutMs), ctypes.c_size_t(len(attributes)), *writeargs) if res != 0: ctypes.pythonapi.Py_DecRef(ctypes.py_object(transaction)) return res diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 1ceeb9ec38273e..7249c702873c45 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -2504,6 +2504,25 @@ class ChipClusters: }, }, } + _LOCALIZATION_CONFIGURATION_CLUSTER_INFO = { + "clusterName": "LocalizationConfiguration", + "clusterId": 0x0000002B, + "commands": { + }, + "attributes": { + 0x00000001: { + "attributeName": "ActiveLocale", + "attributeId": 0x00000001, + "type": "str", + "writable": True, + }, + 0x00000002: { + "attributeName": "SupportedLocales", + "attributeId": 0x00000002, + "type": "str", + }, + }, + } _LOW_POWER_CLUSTER_INFO = { "clusterName": "LowPower", "clusterId": 0x00000508, @@ -3942,6 +3961,15 @@ class ChipClusters: "arg2": "int", }, }, + 0x00000014: { + "commandId": 0x00000014, + "commandName": "TestEmitTestEventRequest", + "args": { + "arg1": "int", + "arg2": "int", + "arg3": "bool", + }, + }, 0x0000000E: { "commandId": 0x0000000E, "commandName": "TestEnumsRequest", @@ -5612,6 +5640,7 @@ class ChipClusters: 0x00000400: _ILLUMINANCE_MEASUREMENT_CLUSTER_INFO, 0x00000509: _KEYPAD_INPUT_CLUSTER_INFO, 0x00000008: _LEVEL_CONTROL_CLUSTER_INFO, + 0x0000002B: _LOCALIZATION_CONFIGURATION_CLUSTER_INFO, 0x00000508: _LOW_POWER_CLUSTER_INFO, 0x00000507: _MEDIA_INPUT_CLUSTER_INFO, 0x00000506: _MEDIA_PLAYBACK_CLUSTER_INFO, @@ -5675,6 +5704,7 @@ class ChipClusters: "IlluminanceMeasurement": _ILLUMINANCE_MEASUREMENT_CLUSTER_INFO, "KeypadInput": _KEYPAD_INPUT_CLUSTER_INFO, "LevelControl": _LEVEL_CONTROL_CLUSTER_INFO, + "LocalizationConfiguration": _LOCALIZATION_CONFIGURATION_CLUSTER_INFO, "LowPower": _LOW_POWER_CLUSTER_INFO, "MediaInput": _MEDIA_INPUT_CLUSTER_INFO, "MediaPlayback": _MEDIA_PLAYBACK_CLUSTER_INFO, diff --git a/src/controller/python/chip/clusters/ClusterObjects.py b/src/controller/python/chip/clusters/ClusterObjects.py index 7b00bcad58cca1..bcac3fd14b838d 100644 --- a/src/controller/python/chip/clusters/ClusterObjects.py +++ b/src/controller/python/chip/clusters/ClusterObjects.py @@ -213,6 +213,10 @@ def cluster_id(self) -> int: def command_id(self) -> int: raise NotImplementedError() + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return False + class Cluster(ClusterObject): ''' This class does nothing, but a convenient class that generated clusters can inherit from. @@ -259,6 +263,10 @@ def attribute_id(self) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: raise NotImplementedError() + @ChipUtility.classproperty + def must_use_timed_write(cls) -> bool: + return False + @ChipUtility.classproperty def _cluster_object(cls) -> ClusterObject: return make_dataclass('InternalClass', diff --git a/src/controller/python/chip/clusters/Command.py b/src/controller/python/chip/clusters/Command.py index e097184297b518..4c7185be38ef1f 100644 --- a/src/controller/python/chip/clusters/Command.py +++ b/src/controller/python/chip/clusters/Command.py @@ -21,6 +21,8 @@ from typing import Type from ctypes import CFUNCTYPE, c_char_p, c_size_t, c_void_p, c_uint32, c_uint16, c_uint8, py_object +from construct.core import ValidationError + from .ClusterObjects import ClusterCommand import chip.exceptions import chip.interaction_model @@ -137,7 +139,7 @@ def _OnCommandSenderDoneCallback(closure): ctypes.pythonapi.Py_DecRef(ctypes.py_object(closure)) -def SendCommand(future: Future, eventLoop, responseType: Type, device, commandPath: CommandPath, payload: ClusterCommand) -> int: +def SendCommand(future: Future, eventLoop, responseType: Type, device, commandPath: CommandPath, payload: ClusterCommand, timedRequestTimeoutMs: int = None) -> int: ''' Send a cluster-object encapsulated command to a device and does the following: - On receipt of a successful data response, returns the cluster-object equivalent through the provided future. - None (on a successful response containing no data) @@ -147,6 +149,9 @@ def SendCommand(future: Future, eventLoop, responseType: Type, device, commandPa ''' if (responseType is not None) and (not issubclass(responseType, ClusterCommand)): raise ValueError("responseType must be a ClusterCommand or None") + if payload.must_use_timed_invoke and timedRequestTimeoutMs is None or timedRequestTimeoutMs == 0: + raise ValueError( + f"Command {payload.__class__} must use timed invoke, please specify a valid timedRequestTimeoutMs value") handle = chip.native.GetLibraryHandle() transaction = AsyncCommandTransaction(future, eventLoop, responseType) @@ -154,7 +159,7 @@ def SendCommand(future: Future, eventLoop, responseType: Type, device, commandPa payloadTLV = payload.ToTLV() ctypes.pythonapi.Py_IncRef(ctypes.py_object(transaction)) return handle.pychip_CommandSender_SendCommand(ctypes.py_object( - transaction), device, commandPath.EndpointId, commandPath.ClusterId, commandPath.CommandId, payloadTLV, len(payloadTLV)) + transaction), device, c_uint16(0 if timedRequestTimeoutMs is None else timedRequestTimeoutMs), commandPath.EndpointId, commandPath.ClusterId, commandPath.CommandId, payloadTLV, len(payloadTLV)) _deviceController = None @@ -180,7 +185,7 @@ def Init(devCtrl): setter = chip.native.NativeLibraryHandleMethodArguments(handle) setter.Set('pychip_CommandSender_SendCommand', - c_uint32, [py_object, c_void_p, c_uint16, c_uint32, c_uint32, c_char_p, c_size_t]) + c_uint32, [py_object, c_void_p, c_uint16, c_uint32, c_uint32, c_char_p, c_size_t, c_uint16]) setter.Set('pychip_CommandSender_InitCallbacks', None, [ _OnCommandSenderResponseCallbackFunct, _OnCommandSenderErrorCallbackFunct, _OnCommandSenderDoneCallbackFunct]) diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 7404421eb2201c..17211fb6a1b470 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -29672,6 +29672,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="tempAccountIdentifier", Tag=0, Type=str), ]) + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + tempAccountIdentifier: 'str' = "" @dataclass @@ -29687,6 +29691,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="setupPIN", Tag=0, Type=str), ]) + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + setupPIN: 'str' = "" @dataclass @@ -29718,6 +29726,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields = [ ]) + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + class Attributes: @@ -30623,6 +30635,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields = [ ]) + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + @dataclass class TestSimpleOptionalArgumentRequest(ClusterCommand): @@ -31358,6 +31374,10 @@ def cluster_id(cls) -> int: def attribute_id(cls) -> int: return 0x00000030 + @ChipUtility.classproperty + def must_use_timed_write(cls) -> bool: + return True + @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=bool) diff --git a/src/controller/python/chip/clusters/attribute.cpp b/src/controller/python/chip/clusters/attribute.cpp index 065aff5f701cf5..2953ae06651270 100644 --- a/src/controller/python/chip/clusters/attribute.cpp +++ b/src/controller/python/chip/clusters/attribute.cpp @@ -176,7 +176,8 @@ class ReadClientCallback : public ReadClient::Callback extern "C" { // Encodes n attribute write requests, follows 3 * n arguments, in the (AttributeWritePath*=void *, uint8_t*, size_t) order. -chip::ChipError::StorageType pychip_WriteClient_WriteAttributes(void * appContext, DeviceProxy * device, size_t n, ...); +chip::ChipError::StorageType pychip_WriteClient_WriteAttributes(void * appContext, DeviceProxy * device, + uint16_t timedWriteTimeoutMs, size_t n, ...); chip::ChipError::StorageType pychip_ReadClient_ReadAttributes(void * appContext, ReadClient ** pReadClient, ReadClientCallback ** pCallback, DeviceProxy * device, bool isSubscription, uint32_t minInterval, uint32_t maxInterval, @@ -249,7 +250,8 @@ void pychip_ReadClient_InitCallbacks(OnReadAttributeDataCallback onReadAttribute gOnReportEndCallback = onReportEndCallback; } -chip::ChipError::StorageType pychip_WriteClient_WriteAttributes(void * appContext, DeviceProxy * device, size_t n, ...) +chip::ChipError::StorageType pychip_WriteClient_WriteAttributes(void * appContext, DeviceProxy * device, + uint16_t timedWriteTimeoutMs, size_t n, ...) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -259,7 +261,9 @@ chip::ChipError::StorageType pychip_WriteClient_WriteAttributes(void * appContex va_list args; va_start(args, n); - SuccessOrExit(err = app::InteractionModelEngine::GetInstance()->NewWriteClient(client, callback.get())); + SuccessOrExit(err = app::InteractionModelEngine::GetInstance()->NewWriteClient( + client, callback.get(), + timedWriteTimeoutMs != 0 ? Optional(timedWriteTimeoutMs) : Optional::Missing())); { for (size_t i = 0; i < n; i++) diff --git a/src/controller/python/chip/clusters/command.cpp b/src/controller/python/chip/clusters/command.cpp index 666dc7599d7a23..b3247b7042f3b6 100644 --- a/src/controller/python/chip/clusters/command.cpp +++ b/src/controller/python/chip/clusters/command.cpp @@ -32,7 +32,8 @@ using namespace chip::app; using PyObject = void *; extern "C" { -chip::ChipError::StorageType pychip_CommandSender_SendCommand(void * appContext, DeviceProxy * device, chip::EndpointId endpointId, +chip::ChipError::StorageType pychip_CommandSender_SendCommand(void * appContext, DeviceProxy * device, + uint16_t timedRequestTimeoutMs, chip::EndpointId endpointId, chip::ClusterId clusterId, chip::CommandId commandId, const uint8_t * payload, size_t length); } @@ -121,37 +122,33 @@ void pychip_CommandSender_InitCallbacks(OnCommandSenderResponseCallback onComman gOnCommandSenderDoneCallback = onCommandSenderDoneCallback; } -chip::ChipError::StorageType pychip_CommandSender_SendCommand(void * appContext, DeviceProxy * device, chip::EndpointId endpointId, +chip::ChipError::StorageType pychip_CommandSender_SendCommand(void * appContext, DeviceProxy * device, + uint16_t timedRequestTimeoutMs, chip::EndpointId endpointId, chip::ClusterId clusterId, chip::CommandId commandId, const uint8_t * payload, size_t length) { CHIP_ERROR err = CHIP_NO_ERROR; std::unique_ptr callback = std::make_unique(appContext); - std::unique_ptr sender = std::make_unique(callback.get(), device->GetExchangeManager()); + std::unique_ptr sender = std::make_unique(callback.get(), device->GetExchangeManager(), + /* is timed request */ timedRequestTimeoutMs != 0); app::CommandPathParams cmdParams = { endpointId, /* group id */ 0, clusterId, commandId, (app::CommandPathFlags::kEndpointIdValid) }; - SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + SuccessOrExit(err = sender->PrepareCommand(cmdParams, false)); { auto writer = sender->GetCommandDataIBTLVWriter(); TLV::TLVReader reader; - TLV::TLVType type; VerifyOrExit(writer != nullptr, err = CHIP_ERROR_INCORRECT_STATE); reader.Init(payload, length); reader.Next(); - reader.EnterContainer(type); - while (reader.Next() == CHIP_NO_ERROR) - { - TLV::TLVReader tReader; - tReader.Init(reader); - writer->CopyElement(tReader); - } + SuccessOrExit(writer->CopyContainer(TLV::ContextTag(to_underlying(CommandDataIB::Tag::kData)), reader)); } - SuccessOrExit(err = sender->FinishCommand()); + SuccessOrExit(err = sender->FinishCommand(timedRequestTimeoutMs != 0 ? Optional(timedRequestTimeoutMs) + : Optional::Missing())); SuccessOrExit(err = device->SendCommands(sender.get())); sender.release(); diff --git a/src/controller/python/chip/interaction_model/Delegate.h b/src/controller/python/chip/interaction_model/Delegate.h index 4f878e764680e6..9807e320562a38 100644 --- a/src/controller/python/chip/interaction_model/Delegate.h +++ b/src/controller/python/chip/interaction_model/Delegate.h @@ -30,6 +30,7 @@ namespace Controller { // The command status will be used for python script. // use packed attribute so we can unpack it from python and no need to worry about padding. +// This struct needs to match the IMCommandStatus definition in delegate.py struct __attribute__((packed)) CommandStatus { Protocols::InteractionModel::Status status; @@ -43,7 +44,7 @@ struct __attribute__((packed)) CommandStatus static_assert(std::is_same::value && std::is_same::value && std::is_same::value, "Members in CommandStatus does not match interaction_model/delegate.py"); -static_assert(sizeof(CommandStatus) == 2 + 1 + 2 + 4 + 4 + 1, "Size of CommandStatus might contain padding"); +static_assert(sizeof(CommandStatus) == 1 + 1 + 2 + 4 + 4 + 1, "Size of CommandStatus might contain padding"); struct __attribute__((packed)) AttributePath { @@ -57,6 +58,7 @@ static_assert(std::is_same::value && std::is_same::value && std::is_same::value && std::is_same::value, "Members in AttributeWriteStatus does not match interaction_model/delegate.py"); -static_assert(sizeof(AttributeWriteStatus) == 8 + 8 + 2 + 2 + 4 + 4, "Size of AttributeWriteStatus might contain padding"); +static_assert(sizeof(AttributeWriteStatus) == 8 + 8 + 1 + 2 + 4 + 4, "Size of AttributeWriteStatus might contain padding"); extern "C" { typedef void (*PythonInteractionModelDelegate_OnCommandResponseStatusCodeReceivedFunct)(uint64_t commandSenderPtr, diff --git a/src/controller/python/chip/interaction_model/delegate.py b/src/controller/python/chip/interaction_model/delegate.py index 106c1a4a310888..6ad6bd5a5785d4 100644 --- a/src/controller/python/chip/interaction_model/delegate.py +++ b/src/controller/python/chip/interaction_model/delegate.py @@ -28,7 +28,7 @@ # The type should match CommandStatus in interaction_model/Delegate.h # CommandStatus should not contain padding IMCommandStatus = Struct( - "Status" / Int16ul, + "Status" / Int8ul, "ClusterStatus" / Int8ul, "EndpointId" / Int16ul, "ClusterId" / Int32ul, @@ -36,10 +36,11 @@ "CommandIndex" / Int8ul, ) +# The type should match WriteStatus in interaction_model/Delegate.h IMWriteStatus = Struct( "NodeId" / Int64ul, "AppIdentifier" / Int64ul, - "Status" / Int16ul, + "Status" / Int8ul, "EndpointId" / Int16ul, "ClusterId" / Int32ul, "AttributeId" / Int32ul, diff --git a/src/controller/python/templates/python-cluster-Objects-py.zapt b/src/controller/python/templates/python-cluster-Objects-py.zapt index 1ac8fff93b0706..d641797265d0ec 100644 --- a/src/controller/python/templates/python-cluster-Objects-py.zapt +++ b/src/controller/python/templates/python-cluster-Objects-py.zapt @@ -99,6 +99,12 @@ class {{asUpperCamelCase name}}(Cluster): {{/zcl_command_arguments}} ]) + {{#if mustUseTimedInvoke}} + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + + {{/if}} {{#zcl_command_arguments}} {{ asLowerCamelCase label }}: '{{zapTypeToPythonClusterObjectType type ns=(asUpperCamelCase parent.parent.name)}}' = {{getPythonFieldDefault type ns=(asUpperCamelCase parent.parent.name)}} {{/zcl_command_arguments}} @@ -119,6 +125,12 @@ class {{asUpperCamelCase name}}(Cluster): def attribute_id(cls) -> int: return {{ asMEI manufacturerCode code }} + {{#if mustUseTimedWrite}} + @ChipUtility.classproperty + def must_use_timed_write(cls) -> bool: + return True + + {{/if}} @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: {{#if entryType}} diff --git a/src/controller/python/test/test_scripts/cluster_objects.py b/src/controller/python/test/test_scripts/cluster_objects.py index bad51d2a0cab44..b328fac2f2fcf5 100644 --- a/src/controller/python/test/test_scripts/cluster_objects.py +++ b/src/controller/python/test/test_scripts/cluster_objects.py @@ -17,6 +17,7 @@ import chip.clusters as Clusters +import chip.exceptions import logging from chip.clusters.Attribute import AttributePath, AttributeReadResult, AttributeStatus, ValueDecodeFailure, TypedAttributePath, SubscriptionTransaction import chip.interaction_model @@ -260,6 +261,62 @@ async def TestReadEventRequests(cls, devCtrl, expectEventsNum): # TODO: Add more wildcard test for IM events. + @classmethod + async def TestTimedRequest(cls, devCtrl): + logger.info("1: Send Timed Command Request") + req = Clusters.TestCluster.Commands.TimedInvokeRequest() + await devCtrl.SendCommand(nodeid=NODE_ID, endpoint=1, payload=req, timedRequestTimeoutMs=1000) + + logger.info("2: Send Timed Write Request") + await devCtrl.WriteAttribute(nodeid=NODE_ID, + attributes=[ + (1, Clusters.TestCluster.Attributes.TimedWriteBoolean( + True)), + ], + timedRequestTimeoutMs=1000) + + logger.info("3: Send Timed Command Request -- Timeout") + try: + req = Clusters.TestCluster.Commands.TimedInvokeRequest() + # 10ms is a pretty short timeout, RTT is 400ms in simulated network on CI, so this test should fail. + await devCtrl.SendCommand(nodeid=NODE_ID, endpoint=1, payload=req, timedRequestTimeoutMs=10) + raise AssertionError("Timeout expected!") + except chip.exceptions.ChipStackException: + pass + + logger.info("4: Send Timed Write Request -- Timeout") + try: + await devCtrl.WriteAttribute(nodeid=NODE_ID, + attributes=[ + (1, Clusters.TestCluster.Attributes.TimedWriteBoolean( + True)), + ], + timedRequestTimeoutMs=10) + raise AssertionError("Timeout expected!") + except chip.exceptions.ChipStackException: + pass + + logger.info( + "5: Sending TestCluster-TimedInvokeRequest without timedRequestTimeoutMs should be rejected") + try: + req = Clusters.TestCluster.Commands.TimedInvokeRequest() + await devCtrl.SendCommand(nodeid=NODE_ID, endpoint=1, payload=req) + raise AssertionError("The command invoke should be rejected.") + except ValueError: + pass + + logger.info( + "6: Writing TestCluster-TimedWriteBoolean without timedRequestTimeoutMs should be rejected") + try: + await devCtrl.WriteAttribute(nodeid=NODE_ID, + attributes=[ + (1, Clusters.TestCluster.Attributes.TimedWriteBoolean( + True)), + ]) + raise AssertionError("The write request should be rejected.") + except ValueError: + pass + @classmethod async def RunTest(cls, devCtrl): try: @@ -271,6 +328,7 @@ async def RunTest(cls, devCtrl): await cls.SendWriteRequest(devCtrl) await cls.TestReadAttributeRequests(devCtrl) await cls.TestSubscribeAttribute(devCtrl) + await cls.TestTimedRequest(devCtrl) except Exception as ex: logger.error( f"Unexpected error occurred when running tests: {ex}") diff --git a/src/darwin/CHIPTool/CHIPTool/Framework Helpers/DefaultsUtils.m b/src/darwin/CHIPTool/CHIPTool/Framework Helpers/DefaultsUtils.m index 9b4f09ce5fe64a..5e30ddb8e62154 100644 --- a/src/darwin/CHIPTool/CHIPTool/Framework Helpers/DefaultsUtils.m +++ b/src/darwin/CHIPTool/CHIPTool/Framework Helpers/DefaultsUtils.m @@ -119,7 +119,7 @@ BOOL CHIPIsDevicePaired(uint64_t deviceId) NSError * error; bool paired = [controller isDevicePaired:deviceId error:&error]; - if (error.code != CHIPSuccess) { + if (error != nil) { NSLog(@"Error retrieving device info for deviceId %llu", deviceId); paired = NO; } diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m index 275c57a5cad81e..df63c6978e8aec 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m @@ -474,9 +474,9 @@ - (void)setVendorIDOnAccessory } // MARK: CHIPDevicePairingDelegate -- (void)onPairingComplete:(NSError *)error +- (void)onPairingComplete:(NSError * _Nullable)error { - if (error.code != CHIPSuccess) { + if (error != nil) { NSLog(@"Got pairing error back %@", error); } else { dispatch_async(dispatch_get_main_queue(), ^{ @@ -721,9 +721,9 @@ - (void)onConnectNetworkResponse:(NSError *)error [controller updateDevice:deviceId fabricId:0]; } -- (void)onAddressUpdated:(NSError *)error +- (void)onAddressUpdated:(NSError * _Nullable)error { - if (error.code != CHIPSuccess) { + if (error != nil) { NSLog(@"Error retrieving device informations over Mdns: %@", error); return; } diff --git a/src/darwin/Framework/CHIP/CHIPDevice.h b/src/darwin/Framework/CHIP/CHIPDevice.h index e90c3af2fa398e..6731593db70f4e 100644 --- a/src/darwin/Framework/CHIP/CHIPDevice.h +++ b/src/darwin/Framework/CHIP/CHIPDevice.h @@ -22,8 +22,6 @@ NS_ASSUME_NONNULL_BEGIN -typedef void (^SubscriptionEstablishedHandler)(void); - @interface CHIPDevice : NSObject - (instancetype)init NS_UNAVAILABLE; @@ -40,7 +38,7 @@ typedef void (^SubscriptionEstablishedHandler)(void); * * The array passed to reportHandler will contain CHIPAttributeReport instances. * - * subscriptionEstablishedHandler, if not nil, will be called once the + * subscriptionEstablished block, if not nil, will be called once the * subscription is established. This will be _after_ the first (priming) call * to reportHandler. * @@ -50,7 +48,7 @@ typedef void (^SubscriptionEstablishedHandler)(void); minInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler; + subscriptionEstablished:(nullable void (^)(void))subscriptionEstablishedHandler; @end @interface CHIPAttributePath : NSObject diff --git a/src/darwin/Framework/CHIP/CHIPDevice.mm b/src/darwin/Framework/CHIP/CHIPDevice.mm index a79c645202ecc1..f9ae4bbaa549a3 100644 --- a/src/darwin/Framework/CHIP/CHIPDevice.mm +++ b/src/darwin/Framework/CHIP/CHIPDevice.mm @@ -27,6 +27,8 @@ #include #include +typedef void (^SubscriptionEstablishedHandler)(void); + using namespace chip; using namespace chip::app; using namespace chip::Protocols::InteractionModel; @@ -138,7 +140,7 @@ - (void)subscribeWithQueue:(dispatch_queue_t)queue minInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(nullable void (^)(void))subscriptionEstablishedHandler { DeviceProxy * device = [self internalDevice]; if (!device) { diff --git a/src/darwin/Framework/CHIP/CHIPError.h b/src/darwin/Framework/CHIP/CHIPError.h index ea0c6c32652f21..1c4c2ba5304ff1 100644 --- a/src/darwin/Framework/CHIP/CHIPError.h +++ b/src/darwin/Framework/CHIP/CHIPError.h @@ -20,8 +20,8 @@ NS_ASSUME_NONNULL_BEGIN FOUNDATION_EXPORT NSErrorDomain const CHIPErrorDomain; +// clang-format off typedef NS_ERROR_ENUM(CHIPErrorDomain, CHIPErrorCode){ - CHIPSuccess = 0, CHIPErrorCodeUndefinedError = 1, CHIPErrorCodeInvalidStringLength = 2, CHIPErrorCodeInvalidIntegerValue = 3, @@ -39,5 +39,6 @@ typedef NS_ERROR_ENUM(CHIPErrorDomain, CHIPErrorCode){ CHIPErrorCodeUnsupportedWrite = 0x88, CHIPErrorCodeUnsupportedCluster = 0xC3, }; +// clang-format on NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/CHIPError.mm b/src/darwin/Framework/CHIP/CHIPError.mm index 0cf8db0c967ceb..eab2a978150e2f 100644 --- a/src/darwin/Framework/CHIP/CHIPError.mm +++ b/src/darwin/Framework/CHIP/CHIPError.mm @@ -63,10 +63,14 @@ + (NSError *)errorForCHIPErrorCode:(CHIP_ERROR)errorCode userInfo:@{ NSLocalizedDescriptionKey : NSLocalizedString(@"Integrity check failed.", nil) }]; } - if (errorCode == CHIP_NO_ERROR) { + if (errorCode == CHIP_ERROR_IM_CONSTRAINT_ERROR) { return [NSError errorWithDomain:CHIPErrorDomain - code:CHIPSuccess - userInfo:@{ NSLocalizedDescriptionKey : NSLocalizedString(@"Success.", nil) }]; + code:CHIPErrorCodeConstraintError + userInfo:@{ NSLocalizedDescriptionKey : NSLocalizedString(@"Value out of range.", nil) }]; + } + + if (errorCode == CHIP_NO_ERROR) { + return nil; } return [NSError errorWithDomain:CHIPErrorDomain @@ -132,8 +136,12 @@ + (NSError *)errorForZCLErrorCode:(uint8_t)errorCode } } -+ (CHIP_ERROR)errorToCHIPErrorCode:(NSError *)error ++ (CHIP_ERROR)errorToCHIPErrorCode:(NSError * _Nullable)error { + if (error == nil) { + return CHIP_NO_ERROR; + } + if (error.domain != CHIPErrorDomain) { return CHIP_ERROR_INTERNAL; } @@ -151,8 +159,8 @@ + (CHIP_ERROR)errorToCHIPErrorCode:(NSError *)error return CHIP_ERROR_INCORRECT_STATE; case CHIPErrorCodeIntegrityCheckFailed: return CHIP_ERROR_INTEGRITY_CHECK_FAILED; - case CHIPSuccess: - return CHIP_NO_ERROR; + case CHIPErrorCodeConstraintError: + return CHIP_ERROR_IM_CONSTRAINT_ERROR; default: return CHIP_ERROR_INTERNAL; } @@ -165,6 +173,7 @@ + (uint8_t)errorToZCLErrorCode:(NSError * _Nullable)error if (error == nil) { return EMBER_ZCL_STATUS_SUCCESS; } + if (error.domain != CHIPErrorDomain) { return EMBER_ZCL_STATUS_FAILURE; } @@ -186,8 +195,6 @@ + (uint8_t)errorToZCLErrorCode:(NSError * _Nullable)error return EMBER_ZCL_STATUS_UNSUPPORTED_WRITE; case CHIPErrorCodeUnsupportedCluster: return EMBER_ZCL_STATUS_UNSUPPORTED_CLUSTER; - case CHIPSuccess: - return EMBER_ZCL_STATUS_SUCCESS; default: return EMBER_ZCL_STATUS_FAILURE; } diff --git a/src/darwin/Framework/CHIP/CHIPError_Internal.h b/src/darwin/Framework/CHIP/CHIPError_Internal.h index 8656dd0e7a8399..4b121a3e6b365f 100644 --- a/src/darwin/Framework/CHIP/CHIPError_Internal.h +++ b/src/darwin/Framework/CHIP/CHIPError_Internal.h @@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIPError : NSObject + (nullable NSError *)errorForCHIPErrorCode:(CHIP_ERROR)errorCode; + (nullable NSError *)errorForZCLErrorCode:(uint8_t)errorCode; -+ (CHIP_ERROR)errorToCHIPErrorCode:(NSError *)error; ++ (CHIP_ERROR)errorToCHIPErrorCode:(NSError * _Nullable)error; + (uint8_t)errorToZCLErrorCode:(NSError * _Nullable)error; @end diff --git a/src/darwin/Framework/CHIP/templates/clusters-tests.zapt b/src/darwin/Framework/CHIP/templates/clusters-tests.zapt index f111d35b765750..b510811b21b636 100644 --- a/src/darwin/Framework/CHIP/templates/clusters-tests.zapt +++ b/src/darwin/Framework/CHIP/templates/clusters-tests.zapt @@ -210,6 +210,7 @@ CHIPDevice * GetConnectedDevice(void) {{#unless (isStrEqual "Access Control" name)}} {{#unless (isStrEqual "Basic" name)}} {{#unless (isStrEqual "Thermostat" name)}} +{{#unless (isStrEqual "OTA Software Update Provider" name)}} {{#chip_server_cluster_attributes}} {{#unless (isStrEqual chipCallback.name "Unsupported")}} - (void)testSendCluster{{asUpperCamelCase parent.name}}ReadAttribute{{asUpperCamelCase name}}WithCompletionHandler @@ -266,6 +267,7 @@ CHIPDevice * GetConnectedDevice(void) {{/unless}} {{/unless}} {{/unless}} +{{/unless}} {{/chip_client_clusters}} @end diff --git a/src/darwin/Framework/CHIP/templates/partials/check_test_value.zapt b/src/darwin/Framework/CHIP/templates/partials/check_test_value.zapt index e3a927a9248c60..4da8e480ea8f40 100644 --- a/src/darwin/Framework/CHIP/templates/partials/check_test_value.zapt +++ b/src/darwin/Framework/CHIP/templates/partials/check_test_value.zapt @@ -20,7 +20,7 @@ type/optionality/nullability information for them for our recursive call. }} {{#zcl_struct_items_by_struct_name type}} - {{#if (expectedValueHasProp ../expected label)}} + {{#if (hasProperty ../expected label)}} {{>check_test_value actual=(concat "((CHIP" (asUpperCamelCase ../cluster) "Cluster" (asUpperCamelCase ../type) " *)" ../actual ")." (asStructPropertyName label)) expected=(lookup ../expected label) cluster=../cluster}} {{/if}} {{/zcl_struct_items_by_struct_name}} diff --git a/src/darwin/Framework/CHIP/templates/partials/test_cluster.zapt b/src/darwin/Framework/CHIP/templates/partials/test_cluster.zapt index 316a1ca1f2a8d9..2dc923a4739c32 100644 --- a/src/darwin/Framework/CHIP/templates/partials/test_cluster.zapt +++ b/src/darwin/Framework/CHIP/templates/partials/test_cluster.zapt @@ -108,31 +108,53 @@ ResponseHandler {{> subscribeDataCallback}} = nil; } {{/if}} {{#if hasExpectedConstraints}} - {{#if expectedConstraints.minLength}} + {{#if (hasProperty expectedConstraints "minLength")}} { {{> actualValue}} XCTAssertGreaterThanOrEqual([actualValue length], {{expectedConstraints.minLength}}); } {{/if}} - {{#if expectedConstraints.startsWith}} + {{#if (hasProperty expectedConstraints "startsWith")}} { {{> actualValue}} XCTAssertTrue([actualValue hasPrefix:@"{{expectedConstraints.startsWith}}"]); } {{/if}} - {{#if expectedConstraints.endsWith}} + {{#if (hasProperty expectedConstraints "endsWith")}} { {{> actualValue}} XCTAssertTrue([actualValue hasSuffix:@"{{expectedConstraints.endsWith}}"]); } {{/if}} - {{#if expectedConstraints.maxLength}} + {{#if (hasProperty expectedConstraints "isLowerCase")}} + { + {{> actualValue}} + BOOL isLowerCase = [actualValue isEqualToString:[actualValue lowercaseString]]; + XCTAssert{{#if expectedConstraints.isLowerCase}}True{{else}}False{{/if}}(isLowerCase); + } + {{/if}} + {{#if (hasProperty expectedConstraints "isUpperCase")}} + { + {{> actualValue}} + BOOL isUpperCase = [actualValue isEqualToString:[actualValue uppercaseString]]; + XCTAssert{{#if expectedConstraints.isUpperCase}}True{{else}}False{{/if}}(isUpperCase); + } + {{/if}} + {{#if (hasProperty expectedConstraints "isHexString")}} + { + {{> actualValue}} + NSCharacterSet *chars = [[NSCharacterSet characterSetWithCharactersInString:@"0123456789ABCDEF"] invertedSet]; + BOOL isHexString = (NSNotFound == [actualValue rangeOfCharacterFromSet:chars].location); + XCTAssert{{#if expectedConstraints.isHexString}}True{{else}}False{{/if}}(isHexString); + } + {{/if}} + {{#if (hasProperty expectedConstraints "maxLength")}} { {{> actualValue}} XCTAssertLessThanOrEqual([actualValue length], {{expectedConstraints.maxLength}}); } {{/if}} - {{#if expectedConstraints.minValue}} + {{#if (hasProperty expectedConstraints "minValue")}} { {{> actualValue}} if (actualValue != nil) { @@ -140,7 +162,7 @@ ResponseHandler {{> subscribeDataCallback}} = nil; } } {{/if}} - {{#if expectedConstraints.maxValue}} + {{#if (hasProperty expectedConstraints "maxValue")}} { {{> actualValue}} if (actualValue != nil) { @@ -148,17 +170,16 @@ ResponseHandler {{> subscribeDataCallback}} = nil; } } {{/if}} - {{#if expectedConstraints.notValue}} + {{#if (hasProperty expectedConstraints "notValue")}} { {{> actualValue}} + {{#if (isLiteralNull expectedConstraints.notValue)}} + XCTAssertFalse(actualValue == nil); + {{else}} if (actualValue != nil) { XCTAssertNotEqual([actualValue {{asObjectiveCNumberType "" type true}}Value], {{asTypedLiteral expectedConstraints.notValue type}}); } - } - {{else if (isLiteralNull expectedConstraints.notValue)}} - { - {{> actualValue}} - XCTAssertFalse(actualValue == nil); + {{/if}} } {{/if}} {{/if}} diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm index 94046a3660c397..4bdb997075acae 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm @@ -2886,18 +2886,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader auto & entry_0 = iter_0.GetValue(); CHIPFixedLabelClusterLabelStruct * newElement_0; newElement_0 = [CHIPFixedLabelClusterLabelStruct new]; - newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() length:entry_0.label.size() encoding:NSUTF8StringEncoding]; newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() length:entry_0.value.size() encoding:NSUTF8StringEncoding]; - newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() - length:entry_0.value.size() - encoding:NSUTF8StringEncoding]; [array_0 addObject:newElement_0]; } { // Scope for the error so we will know what it's named @@ -4000,6 +3994,52 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } break; } + case Clusters::LocalizationConfiguration::Id: { + using namespace Clusters::LocalizationConfiguration; + switch (aPath.mAttributeId) { + case Attributes::ActiveLocale::Id: { + using TypeInfo = Attributes::ActiveLocale::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSString * _Nonnull value; + value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; + return value; + } + case Attributes::SupportedLocales::Id: { + using TypeInfo = Attributes::SupportedLocales::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSString * newElement_0; + newElement_0 = [[NSString alloc] initWithBytes:entry_0.data() length:entry_0.size() encoding:NSUTF8StringEncoding]; + [array_0 addObject:newElement_0]; + } + { // Scope for the error so we will know what it's named + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + } + value = array_0; + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; + break; + } + break; + } case Clusters::LowPower::Id: { using namespace Clusters::LowPower; switch (aPath.mAttributeId) { @@ -8807,12 +8847,6 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() length:entry_0.label.size() encoding:NSUTF8StringEncoding]; - newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; - newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() - length:entry_0.value.size() - encoding:NSUTF8StringEncoding]; newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() length:entry_0.value.size() encoding:NSUTF8StringEncoding]; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm index 3db41dee7cd30f..636032e37de03f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm @@ -2179,18 +2179,12 @@ auto & entry_0 = iter_0.GetValue(); CHIPFixedLabelClusterLabelStruct * newElement_0; newElement_0 = [CHIPFixedLabelClusterLabelStruct new]; - newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() length:entry_0.label.size() encoding:NSUTF8StringEncoding]; newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() length:entry_0.value.size() encoding:NSUTF8StringEncoding]; - newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() - length:entry_0.value.size() - encoding:NSUTF8StringEncoding]; [array_0 addObject:newElement_0]; } { // Scope for the error so we will know what it's named @@ -2919,6 +2913,45 @@ } } +void CHIPLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge::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(); + NSString * newElement_0; + newElement_0 = [[NSString alloc] initWithBytes:entry_0.data() length:entry_0.size() encoding:NSUTF8StringEncoding]; + [array_0 addObject:newElement_0]; + } + { // Scope for the error so we will know what it's named + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + void CHIPLowPowerAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { @@ -4911,12 +4944,6 @@ newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() length:entry_0.label.size() encoding:NSUTF8StringEncoding]; - newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; - newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() - length:entry_0.value.size() - encoding:NSUTF8StringEncoding]; newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() length:entry_0.value.size() encoding:NSUTF8StringEncoding]; @@ -5914,6 +5941,16 @@ DispatchSuccess(context, response); }; +void CHIPTestClusterClusterTestEmitTestEventResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType & data) +{ + auto * response = [CHIPTestClusterClusterTestEmitTestEventResponseParams new]; + { + response.value = [NSNumber numberWithUnsignedLongLong:data.value]; + } + DispatchSuccess(context, response); +}; + void CHIPTestClusterClusterTestEnumsResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::TestCluster::Commands::TestEnumsResponse::DecodableType & data) { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h index 64172a12ad4ffd..18ec84215ddad8 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h @@ -109,6 +109,8 @@ typedef void (*CHIPTestClusterClusterSimpleStructResponseCallbackType)( void *, const chip::app::Clusters::TestCluster::Commands::SimpleStructResponse::DecodableType &); typedef void (*CHIPTestClusterClusterTestAddArgumentsResponseCallbackType)( void *, const chip::app::Clusters::TestCluster::Commands::TestAddArgumentsResponse::DecodableType &); +typedef void (*CHIPTestClusterClusterTestEmitTestEventResponseCallbackType)( + void *, const chip::app::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType &); typedef void (*CHIPTestClusterClusterTestEnumsResponseCallbackType)( void *, const chip::app::Clusters::TestCluster::Commands::TestEnumsResponse::DecodableType &); typedef void (*CHIPTestClusterClusterTestListInt8UReverseResponseCallbackType)( @@ -2708,6 +2710,35 @@ class CHIPLevelControlAttributeListListAttributeCallbackSubscriptionBridge SubscriptionEstablishedHandler mEstablishedHandler; }; +class CHIPLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge(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 CHIPLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge + : public CHIPLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge +{ +public: + CHIPLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + class CHIPLowPowerAttributeListListAttributeCallbackBridge : public CHIPCallbackBridge { public: @@ -4584,6 +4615,19 @@ class CHIPTestClusterClusterTestAddArgumentsResponseCallbackBridge const chip::app::Clusters::TestCluster::Commands::TestAddArgumentsResponse::DecodableType & data); }; +class CHIPTestClusterClusterTestEmitTestEventResponseCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPTestClusterClusterTestEmitTestEventResponseCallbackBridge(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::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType & data); +}; + class CHIPTestClusterClusterTestEnumsResponseCallbackBridge : public CHIPCallbackBridge { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h index adba66092048c8..c44ef20fbb31b9 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -2201,6 +2201,21 @@ NS_ASSUME_NONNULL_BEGIN @end +/** + * Cluster Localization Configuration + * + */ +@interface CHIPLocalizationConfiguration : CHIPCluster + +- (void)readAttributeActiveLocaleWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; + +- (void)readAttributeSupportedLocalesWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; + +@end + /** * Cluster Low Power * @@ -3506,6 +3521,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)testAddArgumentsWithParams:(CHIPTestClusterClusterTestAddArgumentsParams *)params completionHandler:(void (^)(CHIPTestClusterClusterTestAddArgumentsResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)testEmitTestEventRequestWithParams:(CHIPTestClusterClusterTestEmitTestEventRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterTestEmitTestEventResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)testEnumsRequestWithParams:(CHIPTestClusterClusterTestEnumsRequestParams *)params completionHandler:(void (^)(CHIPTestClusterClusterTestEnumsResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index 86c4b8bcf84d8a..6c432127b44ac5 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -9345,6 +9345,56 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( @end +@implementation CHIPLocalizationConfiguration + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)readAttributeActiveLocaleWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::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)readAttributeSupportedLocalesWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +@end + @implementation CHIPLowPower - (chip::Controller::ClusterBase *)getCluster @@ -14451,6 +14501,24 @@ new CHIPTestClusterClusterTestAddArgumentsResponseCallbackBridge( }); } +- (void)testEmitTestEventRequestWithParams:(CHIPTestClusterClusterTestEmitTestEventRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterTestEmitTestEventResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + ListFreer listFreer; + TestCluster::Commands::TestEmitTestEventRequest::Type request; + request.arg1 = params.arg1.unsignedCharValue; + request.arg2 = static_cast>(params.arg2.unsignedCharValue); + request.arg3 = params.arg3.boolValue; + + new CHIPTestClusterClusterTestEmitTestEventResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)testEnumsRequestWithParams:(CHIPTestClusterClusterTestEnumsRequestParams *)params completionHandler:(void (^)(CHIPTestClusterClusterTestEnumsResponseParams * _Nullable data, NSError * _Nullable error))completionHandler @@ -22033,8 +22101,6 @@ new CHIPDefaultSuccessCallbackBridge( } auto element_0 = (CHIPUserLabelClusterLabelStruct *) value[i_0]; listHolder_0->mList[i_0].label = [self asCharSpan:element_0.label]; - listHolder_0->mList[i_0].label = [self asCharSpan:element_0.label]; - listHolder_0->mList[i_0].value = [self asCharSpan:element_0.value]; listHolder_0->mList[i_0].value = [self asCharSpan:element_0.value]; } cppValue = ListType_0(listHolder_0->mList, value.count); diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc_internal.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc_internal.h index 043118d96a06a5..d75b3cd0ae5539 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc_internal.h @@ -145,6 +145,10 @@ @property (readonly) chip::Controller::LevelControlCluster cppCluster; @end +@interface CHIPLocalizationConfiguration () +@property (readonly) chip::Controller::LocalizationConfigurationCluster cppCluster; +@end + @interface CHIPLowPower () @property (readonly) chip::Controller::LowPowerCluster cppCluster; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h index 24530fb8e4de2e..c5cf0391eaab4b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h @@ -525,6 +525,16 @@ NS_ASSUME_NONNULL_BEGIN @end +/** + * Cluster Localization Configuration + * + */ +@interface CHIPTestLocalizationConfiguration : CHIPLocalizationConfiguration + +- (void)writeAttributeSupportedLocalesWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; + +@end + /** * Cluster Low Power * diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm index f496d1a3e84469..bb89a0747e26ce 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm @@ -3853,8 +3853,6 @@ new CHIPDefaultSuccessCallbackBridge( } auto element_0 = (CHIPFixedLabelClusterLabelStruct *) value[i_0]; listHolder_0->mList[i_0].label = [self asCharSpan:element_0.label]; - listHolder_0->mList[i_0].label = [self asCharSpan:element_0.label]; - listHolder_0->mList[i_0].value = [self asCharSpan:element_0.value]; listHolder_0->mList[i_0].value = [self asCharSpan:element_0.value]; } cppValue = ListType_0(listHolder_0->mList, value.count); @@ -5356,6 +5354,58 @@ new CHIPDefaultSuccessCallbackBridge( @end +@interface CHIPTestLocalizationConfiguration () +@property (readonly) chip::Controller::LocalizationConfigurationClusterTest cppCluster; +@end + +@implementation CHIPTestLocalizationConfiguration + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeSupportedLocalesWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::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:[NSString class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSString *) value[i_0]; + listHolder_0->mList[i_0] = [self asCharSpan:element_0]; + } + 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); + }); +} + +@end + @interface CHIPTestLowPower () @property (readonly) chip::Controller::LowPowerClusterTest cppCluster; @end diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index bf489b2ad33a5f..6c5e472199d19d 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -528,6 +528,12 @@ - (void)testSendClusterTest_TC_BI_2_1_000009_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -1085,6 +1091,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000002_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -1181,6 +1193,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000006_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -1278,6 +1296,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000010_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -1373,6 +1397,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000014_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -1446,6 +1476,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000017_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -1472,6 +1508,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000018_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -2180,6 +2222,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000049_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -2278,6 +2326,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000053_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -2380,6 +2434,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000057_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -2551,6 +2611,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000063_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -2672,6 +2738,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000067_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -2760,6 +2832,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000070_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -2858,7 +2936,64 @@ - (void)testSendClusterTest_TC_CC_2_1_000073_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000074_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000074_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write the default values to optional attribute: CompensationText"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id compensationTextArgument; + compensationTextArgument = @""; + [cluster + writeAttributeCompensationTextWithValue:compensationTextArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write the default values to optional attribute: CompensationText Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_2_1_000075_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads back optional attribute: CompensationText"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeCompensationTextWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads back optional attribute: CompensationText Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertTrue([actualValue isEqualToString:@""]); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_2_1_000076_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: NumberOfPrimaries"]; @@ -2872,6 +3007,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000074_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -2884,7 +3025,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000074_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000075_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000077_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default mandatory attribute: NumberOfPrimaries"]; @@ -2906,7 +3047,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000075_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000076_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000078_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the mandatory attribute: NumberOfPrimaries"]; @@ -2930,7 +3071,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000076_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000077_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000079_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary1X"]; @@ -2944,6 +3085,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000077_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -2956,7 +3103,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000077_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000078_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000080_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default mandatory attribute: Primary1X"]; @@ -2977,7 +3124,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000078_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000079_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000081_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the mandatory attribute: Primary1X"]; @@ -3001,7 +3148,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000079_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000080_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000082_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary1Y"]; @@ -3015,6 +3162,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000080_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -3027,7 +3180,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000080_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000081_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000083_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default mandatory attribute: Primary1Y"]; @@ -3048,7 +3201,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000081_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000082_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000084_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the mandatory attribute: Primary1Y"]; @@ -3072,7 +3225,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000082_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000083_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000085_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary1Intensity"]; @@ -3091,7 +3244,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000083_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000084_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000086_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary2X"]; @@ -3105,6 +3258,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000084_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -3117,7 +3276,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000084_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000085_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000087_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default mandatory attribute: Primary2X"]; @@ -3138,7 +3297,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000085_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000086_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000088_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the mandatory attribute: Primary2X"]; @@ -3162,7 +3321,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000086_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000087_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000089_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary2Y"]; @@ -3176,6 +3335,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000087_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -3188,7 +3353,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000087_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000088_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000090_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default mandatory attribute: Primary2Y"]; @@ -3209,7 +3374,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000088_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000089_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000091_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the mandatory attribute: Primary2Y"]; @@ -3233,7 +3398,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000089_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000090_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000092_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Validate constraints of attribute: Primary2Intensity"]; @@ -3252,7 +3417,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000090_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000091_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000093_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary3X"]; @@ -3266,6 +3431,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000091_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -3278,7 +3449,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000091_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000092_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000094_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default mandatory attribute: Primary3X"]; @@ -3299,7 +3470,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000092_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000093_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000095_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the mandatory attribute: Primary3X"]; @@ -3323,7 +3494,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000093_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000094_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000096_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary3Y"]; @@ -3337,6 +3508,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000094_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -3349,7 +3526,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000094_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000095_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000097_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default mandatory attribute: Primary3Y"]; @@ -3370,7 +3547,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000095_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000096_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000098_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the mandatory attribute: Primary3Y"]; @@ -3394,7 +3571,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000096_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000097_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000099_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary3Intensity"]; @@ -3413,7 +3590,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000097_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000098_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000100_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary4X"]; @@ -3427,6 +3604,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000098_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -3439,7 +3622,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000098_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000099_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000101_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default mandatory attribute: Primary4X"]; @@ -3460,7 +3643,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000099_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000100_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000102_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the mandatory attribute: Primary4X"]; @@ -3484,7 +3667,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000100_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000101_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000103_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary4Y"]; @@ -3498,6 +3681,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000101_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -3510,7 +3699,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000101_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000102_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000104_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default mandatory attribute: Primary4Y"]; @@ -3531,7 +3720,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000102_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000103_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000105_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the mandatory attribute: Primary4Y"]; @@ -3555,7 +3744,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000103_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000104_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000106_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary4Intensity"]; @@ -3574,7 +3763,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000104_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000105_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000107_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary5X"]; @@ -3588,6 +3777,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000105_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -3600,7 +3795,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000105_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000106_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000108_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default mandatory attribute: Primary5X"]; @@ -3621,7 +3816,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000106_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000107_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000109_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the mandatory attribute: Primary5X"]; @@ -3645,7 +3840,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000107_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000108_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000110_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary5Y"]; @@ -3659,6 +3854,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000108_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -3671,7 +3872,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000108_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000109_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000111_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default mandatory attribute: Primary5Y"]; @@ -3692,7 +3893,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000109_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000110_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000112_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the mandatory attribute: Primary5Y"]; @@ -3716,7 +3917,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000110_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000111_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000113_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary5Intensity"]; @@ -3735,7 +3936,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000111_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000112_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000114_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary6X"]; @@ -3749,6 +3950,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000112_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -3761,7 +3968,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000112_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000113_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000115_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default mandatory attribute: Primary6X"]; @@ -3782,7 +3989,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000113_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000114_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000116_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the mandatory attribute: Primary6X"]; @@ -3806,7 +4013,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000114_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000115_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000117_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary6Y"]; @@ -3820,6 +4027,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000115_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -3832,7 +4045,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000115_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000116_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000118_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default mandatory attribute: Primary6Y"]; @@ -3853,7 +4066,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000116_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000117_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000119_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the mandatory attribute: Primary6Y"]; @@ -3877,7 +4090,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000117_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000118_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000120_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary6Intensity"]; @@ -3896,7 +4109,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000118_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000119_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000121_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the optional attribute: WhitePointX"]; @@ -3915,6 +4128,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000119_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -3927,7 +4146,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000119_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000120_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000122_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default optional attribute: WhitePointX"]; @@ -3954,7 +4173,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000120_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000121_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000123_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the optional attribute: WhitePointX"]; @@ -3983,7 +4202,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000121_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000122_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000124_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the optional attribute: WhitePointY"]; @@ -4002,6 +4221,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000122_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -4014,7 +4239,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000122_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000123_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000125_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default optional attribute: WhitePointY"]; @@ -4041,7 +4266,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000123_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000124_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000126_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the optional attribute: WhitePointY"]; @@ -4070,7 +4295,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000124_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000125_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000127_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the optional attribute: ColorPointRX"]; @@ -4089,6 +4314,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000125_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -4101,7 +4332,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000125_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000126_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000128_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default optional attribute: ColorPointRX"]; @@ -4128,7 +4359,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000126_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000127_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000129_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the optional attribute: ColorPointRX"]; @@ -4157,7 +4388,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000127_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000128_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000130_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the optional attribute: ColorPointRY"]; @@ -4176,6 +4407,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000128_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -4188,7 +4425,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000128_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000129_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000131_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default optional attribute: ColorPointRY"]; @@ -4215,7 +4452,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000129_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000130_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000132_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the optional attribute: ColorPointRY"]; @@ -4244,7 +4481,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000130_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000131_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000133_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the optional attribute: ColorPointRIntensity"]; @@ -4268,7 +4505,64 @@ - (void)testSendClusterTest_TC_CC_2_1_000131_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000132_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000134_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write the default optional attribute: ColorPointRIntensity"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id colorPointRIntensityArgument; + colorPointRIntensityArgument = [NSNumber numberWithUnsignedChar:0]; + [cluster writeAttributeColorPointRIntensityWithValue:colorPointRIntensityArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write the default optional attribute: ColorPointRIntensity Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_2_1_000135_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the optional attribute: ColorPointRIntensity"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeColorPointRIntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back the optional attribute: ColorPointRIntensity Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_2_1_000136_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the optional attribute: ColorPointGX"]; @@ -4287,6 +4581,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000132_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -4299,7 +4599,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000132_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000133_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000137_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default optional attribute: ColorPointGX"]; @@ -4326,7 +4626,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000133_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000134_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000138_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the optional attribute: ColorPointGX"]; @@ -4355,7 +4655,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000134_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000135_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000139_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the optional attribute: ColorPointGY"]; @@ -4374,6 +4674,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000135_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -4386,7 +4692,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000135_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000136_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000140_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default optional attribute: ColorPointGY"]; @@ -4413,7 +4719,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000136_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000137_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000141_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the optional attribute: ColorPointGY"]; @@ -4442,7 +4748,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000137_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000138_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000142_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the optional attribute: ColorPointGIntensity"]; @@ -4466,7 +4772,64 @@ - (void)testSendClusterTest_TC_CC_2_1_000138_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000139_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000143_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write the default optional attribute: ColorPointGIntensity"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id colorPointGIntensityArgument; + colorPointGIntensityArgument = [NSNumber numberWithUnsignedChar:0]; + [cluster writeAttributeColorPointGIntensityWithValue:colorPointGIntensityArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write the default optional attribute: ColorPointGIntensity Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_2_1_000144_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the optional attribute: ColorPointGIntensity"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeColorPointGIntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back the optional attribute: ColorPointGIntensity Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_2_1_000145_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the optional attribute: ColorPointBX"]; @@ -4485,6 +4848,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000139_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -4497,7 +4866,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000139_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000140_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000146_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default optional attribute: ColorPointBX"]; @@ -4524,7 +4893,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000140_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000141_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000147_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the optional attribute: ColorPointBX"]; @@ -4553,7 +4922,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000141_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000142_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000148_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the optional attribute: ColorPointBY"]; @@ -4572,6 +4941,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000142_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -4584,7 +4959,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000142_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000143_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000149_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default optional attribute: ColorPointBY"]; @@ -4611,7 +4986,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000143_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000144_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000150_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the optional attribute: ColorPointBY"]; @@ -4640,7 +5015,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000144_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000145_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000151_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the optional attribute: ColorPointBIntensity"]; @@ -4664,6 +5039,63 @@ - (void)testSendClusterTest_TC_CC_2_1_000145_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTest_TC_CC_2_1_000152_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write the default optional attribute: ColorPointBIntensity"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id colorPointBIntensityArgument; + colorPointBIntensityArgument = [NSNumber numberWithUnsignedChar:0]; + [cluster writeAttributeColorPointBIntensityWithValue:colorPointBIntensityArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write the default optional attribute: ColorPointBIntensity Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_2_1_000153_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the optional attribute: ColorPointBIntensity"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeColorPointBIntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back the optional attribute: ColorPointBIntensity Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} - (void)testSendClusterTest_TC_CC_3_1_000000_WaitForCommissionee { @@ -10275,6 +10707,12 @@ - (void)testSendClusterTest_TC_FLW_2_1_000011_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -11776,6 +12214,12 @@ - (void)testSendClusterTest_TC_OCC_2_1_000001_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -11849,6 +12293,12 @@ - (void)testSendClusterTest_TC_OCC_2_1_000004_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -15955,6 +16405,12 @@ - (void)testSendClusterTest_TC_RH_2_1_000002_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -15967,6 +16423,76 @@ - (void)testSendClusterTest_TC_RH_2_1_000002_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTest_TC_RH_2_1_000003_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the optional attribute: Tolerance"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestRelativeHumidityMeasurement * cluster = [[CHIPTestRelativeHumidityMeasurement alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the optional attribute: Tolerance Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_RH_2_1_000004_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads constraints of attribute: Tolerance"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestRelativeHumidityMeasurement * cluster = [[CHIPTestRelativeHumidityMeasurement alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads constraints of attribute: Tolerance Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue unsignedShortValue], 2048U); + } + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} - (void)testSendClusterTest_TC_RH_2_2_000000_WaitForCommissionee { @@ -16155,6 +16681,45 @@ - (void)testSendClusterTest_TC_TM_2_1_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTest_TC_TM_2_1_000002_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: Tolerance"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: Tolerance Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue unsignedShortValue], 2048U); + } + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} - (void)testSendClusterTest_TC_TM_2_2_000000_WaitForCommissionee { @@ -17426,6 +17991,12 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000043_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -17528,6 +18099,12 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000047_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -17637,6 +18214,12 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000051_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue charValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -17729,6 +18312,12 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000054_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -19997,6 +20586,12 @@ - (void)testSendClusterTest_TC_WNCV_1_1_000004_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedIntValue], 0UL); + } + } { id actualValue = value; if (actualValue != nil) { @@ -20080,6 +20675,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000001_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -20153,6 +20754,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000004_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -20228,6 +20835,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000007_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -20305,6 +20918,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000010_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -20381,6 +21000,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000013_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -20455,6 +21080,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000016_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -20536,6 +21167,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000019_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -20617,6 +21254,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000022_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -20698,6 +21341,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000025_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -20778,6 +21427,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000028_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -20830,6 +21485,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000030_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -20857,6 +21518,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000031_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -20909,6 +21576,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000033_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -20936,6 +21609,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000034_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -20988,6 +21667,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000036_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -21015,6 +21700,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000037_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -21067,6 +21758,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000039_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -21093,6 +21790,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000040_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -21168,6 +21871,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000043_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -21219,6 +21928,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000045_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -21246,6 +21961,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000046_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -21297,6 +22018,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000048_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -21325,6 +22052,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000049_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -21406,6 +22139,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000052_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -21527,6 +22266,12 @@ - (void)testSendClusterTest_TC_WNCV_2_4_000002_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -21586,6 +22331,12 @@ - (void)testSendClusterTest_TC_WNCV_2_5_000002_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -27483,6 +28234,12 @@ - (void)testSendClusterTestCluster_000214_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -27557,6 +28314,12 @@ - (void)testSendClusterTestCluster_000217_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -27796,6 +28559,12 @@ - (void)testSendClusterTestCluster_000227_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -27870,6 +28639,12 @@ - (void)testSendClusterTestCluster_000230_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -28109,6 +28884,12 @@ - (void)testSendClusterTestCluster_000240_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedIntValue], 0UL); + } + } { id actualValue = value; if (actualValue != nil) { @@ -28183,6 +28964,12 @@ - (void)testSendClusterTestCluster_000243_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedIntValue], 0UL); + } + } { id actualValue = value; if (actualValue != nil) { @@ -28422,6 +29209,12 @@ - (void)testSendClusterTestCluster_000253_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedLongLongValue], 0ULL); + } + } { id actualValue = value; if (actualValue != nil) { @@ -28496,6 +29289,12 @@ - (void)testSendClusterTestCluster_000256_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedLongLongValue], 0ULL); + } + } { id actualValue = value; if (actualValue != nil) { @@ -36311,6 +37110,261 @@ - (void)testSendClusterTestConstraints_000010_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - (void)testSendClusterTestConstraints_000011_WriteAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute CHAR_STRING Value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id charStringArgument; + charStringArgument = @"lowercase"; + [cluster writeAttributeCharStringWithValue:charStringArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute CHAR_STRING Value Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestConstraints_000012_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + BOOL isLowerCase = [actualValue isEqualToString:[actualValue lowercaseString]]; + XCTAssertTrue(isLowerCase); + } + { + id actualValue = value; + BOOL isUpperCase = [actualValue isEqualToString:[actualValue uppercaseString]]; + XCTAssertFalse(isUpperCase); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestConstraints_000013_WriteAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute CHAR_STRING Value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id charStringArgument; + charStringArgument = @"UPPERCASE"; + [cluster writeAttributeCharStringWithValue:charStringArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute CHAR_STRING Value Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestConstraints_000014_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + BOOL isLowerCase = [actualValue isEqualToString:[actualValue lowercaseString]]; + XCTAssertFalse(isLowerCase); + } + { + id actualValue = value; + BOOL isUpperCase = [actualValue isEqualToString:[actualValue uppercaseString]]; + XCTAssertTrue(isUpperCase); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestConstraints_000015_WriteAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute CHAR_STRING Value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id charStringArgument; + charStringArgument = @"lowUPPER"; + [cluster writeAttributeCharStringWithValue:charStringArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute CHAR_STRING Value Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestConstraints_000016_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + BOOL isLowerCase = [actualValue isEqualToString:[actualValue lowercaseString]]; + XCTAssertFalse(isLowerCase); + } + { + id actualValue = value; + BOOL isUpperCase = [actualValue isEqualToString:[actualValue uppercaseString]]; + XCTAssertFalse(isUpperCase); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestConstraints_000017_WriteAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute CHAR_STRING Value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id charStringArgument; + charStringArgument = @"ABCDEF012V"; + [cluster writeAttributeCharStringWithValue:charStringArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute CHAR_STRING Value Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestConstraints_000018_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute CHAR_STRING Value isHexString Constraints"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute CHAR_STRING Value isHexString Constraints Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + NSCharacterSet * chars = [[NSCharacterSet characterSetWithCharactersInString:@"0123456789ABCDEF"] invertedSet]; + BOOL isHexString = (NSNotFound == [actualValue rangeOfCharacterFromSet:chars].location); + XCTAssertFalse(isHexString); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestConstraints_000019_WriteAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute CHAR_STRING Value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id charStringArgument; + charStringArgument = @"ABCDEF0123"; + [cluster writeAttributeCharStringWithValue:charStringArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute CHAR_STRING Value Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestConstraints_000020_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute CHAR_STRING Value isHexString Constraints"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute CHAR_STRING Value isHexString Constraints Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + NSCharacterSet * chars = [[NSCharacterSet characterSetWithCharactersInString:@"0123456789ABCDEF"] invertedSet]; + BOOL isHexString = (NSNotFound == [actualValue rangeOfCharacterFromSet:chars].location); + XCTAssertTrue(isHexString); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestConstraints_000021_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute CHAR_STRING Value Back to Default Value"]; @@ -36407,8 +37461,8 @@ - (void)testSendClusterTestDescriptorCluster_000002_ReadAttribute XCTAssertEqual([actualValue[3] unsignedIntValue], 30UL); XCTAssertEqual([actualValue[4] unsignedIntValue], 31UL); XCTAssertEqual([actualValue[5] unsignedIntValue], 40UL); - XCTAssertEqual([actualValue[6] unsignedIntValue], 41UL); - XCTAssertEqual([actualValue[7] unsignedIntValue], 42UL); + XCTAssertEqual([actualValue[6] unsignedIntValue], 42UL); + XCTAssertEqual([actualValue[7] unsignedIntValue], 43UL); XCTAssertEqual([actualValue[8] unsignedIntValue], 46UL); XCTAssertEqual([actualValue[9] unsignedIntValue], 48UL); XCTAssertEqual([actualValue[10] unsignedIntValue], 49UL); @@ -36447,7 +37501,8 @@ - (void)testSendClusterTestDescriptorCluster_000003_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue count], 0); + XCTAssertEqual([actualValue count], 1); + XCTAssertEqual([actualValue[0] unsignedIntValue], 41UL); } [expectation fulfill]; @@ -37674,6 +38729,64 @@ - (void)testSendClusterTest_TC_SWDIAG_3_1_000000_WaitForCommissionee WaitForCommissionee(expectation, queue); [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTest_TC_SWDIAG_3_1_000001_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads CurrentHeapUsed attribute value from DUT"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestSoftwareDiagnostics * cluster = [[CHIPTestSoftwareDiagnostics alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeCurrentHeapUsedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads CurrentHeapUsed attribute value from DUT Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedLongLongValue], 0ULL); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWDIAG_3_1_000002_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads CurrentHeapHighWaterMark attribute value from DUT"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestSoftwareDiagnostics * cluster = [[CHIPTestSoftwareDiagnostics alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeCurrentHeapHighWatermarkWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads CurrentHeapHighWaterMark attribute value from DUT Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedLongLongValue], 0ULL); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} - (void)testSendClusterTestSubscribe_OnOff_000000_WaitForCommissionee { @@ -44134,6 +45247,82 @@ - (void)testSendClusterLevelControlReadAttributeClusterRevisionWithCompletionHan [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterLocalizationConfigurationReadAttributeActiveLocaleWithCompletionHandler +{ + 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(); + CHIPLocalizationConfiguration * cluster = [[CHIPLocalizationConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"LocalizationConfigurationReadAttributeActiveLocaleWithCompletionHandler"]; + + [cluster readAttributeActiveLocaleWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"LocalizationConfiguration ActiveLocale Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterLocalizationConfigurationWriteAttributeActiveLocaleWithValue +{ + 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(); + CHIPLocalizationConfiguration * cluster = [[CHIPLocalizationConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"LocalizationConfigurationWriteAttributeActiveLocaleWithValue"]; + + NSString * _Nonnull value = @"Test"; + [cluster writeAttributeActiveLocaleWithValue:value + completionHandler:^(NSError * _Nullable err) { + NSLog(@"LocalizationConfiguration ActiveLocale Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterLocalizationConfigurationReadAttributeSupportedLocalesWithCompletionHandler +{ + 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(); + CHIPLocalizationConfiguration * cluster = [[CHIPLocalizationConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"LocalizationConfigurationReadAttributeSupportedLocalesWithCompletionHandler"]; + + [cluster readAttributeSupportedLocalesWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"LocalizationConfiguration SupportedLocales Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterLowPowerReadAttributeAttributeListWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -44953,56 +46142,6 @@ - (void)testSendClusterNetworkCommissioningReadAttributeClusterRevisionWithCompl [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterOtaSoftwareUpdateProviderReadAttributeAttributeListWithCompletionHandler -{ - 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(); - CHIPOtaSoftwareUpdateProvider * cluster = [[CHIPOtaSoftwareUpdateProvider alloc] initWithDevice:device endpoint:0 queue:queue]; - XCTAssertNotNil(cluster); - - XCTestExpectation * expectation = - [self expectationWithDescription:@"OtaSoftwareUpdateProviderReadAttributeAttributeListWithCompletionHandler"]; - - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"OtaSoftwareUpdateProvider AttributeList Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - -- (void)testSendClusterOtaSoftwareUpdateProviderReadAttributeClusterRevisionWithCompletionHandler -{ - 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(); - CHIPOtaSoftwareUpdateProvider * cluster = [[CHIPOtaSoftwareUpdateProvider alloc] initWithDevice:device endpoint:0 queue:queue]; - XCTAssertNotNil(cluster); - - XCTestExpectation * expectation = - [self expectationWithDescription:@"OtaSoftwareUpdateProviderReadAttributeClusterRevisionWithCompletionHandler"]; - - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"OtaSoftwareUpdateProvider ClusterRevision Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - - (void)testSendClusterOtaSoftwareUpdateRequestorReadAttributeDefaultOtaProvidersWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); diff --git a/src/darwin/Framework/CHIPTests/CHIPErrorTestUtils.mm b/src/darwin/Framework/CHIPTests/CHIPErrorTestUtils.mm index 4a24cf04a351f6..585a743c81dc84 100644 --- a/src/darwin/Framework/CHIPTests/CHIPErrorTestUtils.mm +++ b/src/darwin/Framework/CHIPTests/CHIPErrorTestUtils.mm @@ -54,8 +54,6 @@ + (uint8_t)errorToZCLErrorCode:(NSError * _Nullable)error return EMBER_ZCL_STATUS_UNSUPPORTED_WRITE; case CHIPErrorCodeUnsupportedCluster: return EMBER_ZCL_STATUS_UNSUPPORTED_CLUSTER; - case CHIPSuccess: - return EMBER_ZCL_STATUS_SUCCESS; default: return EMBER_ZCL_STATUS_FAILURE; } diff --git a/src/include/platform/ConfigurationManager.h b/src/include/platform/ConfigurationManager.h index 5103f6b8e4cdb6..40fa50f2fa6c05 100644 --- a/src/include/platform/ConfigurationManager.h +++ b/src/include/platform/ConfigurationManager.h @@ -77,7 +77,8 @@ class ConfigurationManager #else kPrimaryMACAddressLength = 6, #endif - kMaxMACAddressLength = 8, + kMaxMACAddressLength = 8, + kMaxLanguageTagLength = 5 // ISO 639-1 standard language codes }; virtual CHIP_ERROR GetVendorName(char * buf, size_t bufSize) = 0; @@ -97,9 +98,13 @@ class ConfigurationManager virtual CHIP_ERROR GetSetupDiscriminator(uint16_t & setupDiscriminator) = 0; // Lifetime counter is monotonic counter that is incremented only in the case of a factory reset virtual CHIP_ERROR GetLifetimeCounter(uint16_t & lifetimeCounter) = 0; + virtual CHIP_ERROR IncrementLifetimeCounter() = 0; virtual CHIP_ERROR GetRegulatoryLocation(uint8_t & location) = 0; virtual CHIP_ERROR GetCountryCode(char * buf, size_t bufSize, size_t & codeLen) = 0; + virtual CHIP_ERROR GetActiveLocale(char * buf, size_t bufSize, size_t & codeLen) = 0; virtual CHIP_ERROR GetBreadcrumb(uint64_t & breadcrumb) = 0; + virtual CHIP_ERROR GetHourFormat(uint8_t & format) = 0; + virtual CHIP_ERROR GetCalendarType(uint8_t & type) = 0; virtual CHIP_ERROR StoreSerialNumber(const char * serialNum, size_t serialNumLen) = 0; virtual CHIP_ERROR StorePrimaryWiFiMACAddress(const uint8_t * buf) = 0; virtual CHIP_ERROR StorePrimary802154MACAddress(const uint8_t * buf) = 0; @@ -109,7 +114,10 @@ class ConfigurationManager virtual CHIP_ERROR StoreSetupDiscriminator(uint16_t setupDiscriminator) = 0; virtual CHIP_ERROR StoreRegulatoryLocation(uint8_t location) = 0; virtual CHIP_ERROR StoreCountryCode(const char * code, size_t codeLen) = 0; + virtual CHIP_ERROR StoreActiveLocale(const char * code, size_t codeLen) = 0; virtual CHIP_ERROR StoreBreadcrumb(uint64_t breadcrumb) = 0; + virtual CHIP_ERROR StoreHourFormat(uint8_t format) = 0; + virtual CHIP_ERROR StoreCalendarType(uint8_t type) = 0; virtual CHIP_ERROR GetRebootCount(uint32_t & rebootCount) = 0; virtual CHIP_ERROR StoreRebootCount(uint32_t rebootCount) = 0; virtual CHIP_ERROR GetTotalOperationalHours(uint32_t & totalOperationalHours) = 0; diff --git a/src/include/platform/PlatformManager.h b/src/include/platform/PlatformManager.h index 8e935e165e3945..4d1664cf6c040d 100644 --- a/src/include/platform/PlatformManager.h +++ b/src/include/platform/PlatformManager.h @@ -37,8 +37,9 @@ class DiscoveryImplPlatform; namespace DeviceLayer { -static constexpr size_t kMaxFixedLabels = 10; -static constexpr size_t kMaxUserLabels = 10; +static constexpr size_t kMaxFixedLabels = 10; +static constexpr size_t kMaxUserLabels = 10; +static constexpr size_t kMaxLanguageTags = 254; // Maximum number of entry type 'ARRAY' supports class PlatformManagerImpl; class ConnectivityManagerImpl; @@ -187,6 +188,7 @@ class PlatformManager AttributeList & labelList); CHIP_ERROR GetUserLabelList(EndpointId endpoint, AttributeList & labelList); + CHIP_ERROR GetSupportedLocales(AttributeList & supportedLocales); private: bool mInitialized = false; @@ -448,5 +450,10 @@ PlatformManager::GetUserLabelList(EndpointId endpoint, return static_cast(this)->_GetUserLabelList(endpoint, labelList); } +inline CHIP_ERROR PlatformManager::GetSupportedLocales(AttributeList & supportedLocales) +{ + return static_cast(this)->_GetSupportedLocales(supportedLocales); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/include/platform/internal/GenericConfigurationManagerImpl.cpp b/src/include/platform/internal/GenericConfigurationManagerImpl.cpp index dc1fe8fb799b27..11ac8979aad52d 100644 --- a/src/include/platform/internal/GenericConfigurationManagerImpl.cpp +++ b/src/include/platform/internal/GenericConfigurationManagerImpl.cpp @@ -250,7 +250,7 @@ template void GenericConfigurationManagerImpl::InitiateFactoryReset() { #if CHIP_ENABLE_ROTATING_DEVICE_ID - _IncrementLifetimeCounter(); + IncrementLifetimeCounter(); #endif // Inheriting classes should call this method so the lifetime counter is updated if necessary. } @@ -321,18 +321,76 @@ CHIP_ERROR GenericConfigurationManagerImpl::StoreRegulatoryLocation return WriteConfigValue(ConfigClass::kConfigKey_RegulatoryLocation, value); } +template +CHIP_ERROR GenericConfigurationManagerImpl::GetHourFormat(uint8_t & format) +{ + uint32_t value = 0; + + CHIP_ERROR err = ReadConfigValue(ConfigClass::kConfigKey_HourFormat, value); + + if (err == CHIP_NO_ERROR) + { + VerifyOrReturnError(value <= UINT8_MAX, CHIP_ERROR_INVALID_INTEGER_VALUE); + format = static_cast(value); + } + + return err; +} + +template +CHIP_ERROR GenericConfigurationManagerImpl::StoreHourFormat(uint8_t format) +{ + uint32_t value = format; + return WriteConfigValue(ConfigClass::kConfigKey_HourFormat, value); +} + +template +CHIP_ERROR GenericConfigurationManagerImpl::GetCalendarType(uint8_t & type) +{ + uint32_t value = 0; + + CHIP_ERROR err = ReadConfigValue(ConfigClass::kConfigKey_CalendarType, value); + + if (err == CHIP_NO_ERROR) + { + VerifyOrReturnError(value <= UINT8_MAX, CHIP_ERROR_INVALID_INTEGER_VALUE); + type = static_cast(value); + } + + return err; +} + +template +CHIP_ERROR GenericConfigurationManagerImpl::StoreCalendarType(uint8_t type) +{ + uint32_t value = type; + return WriteConfigValue(ConfigClass::kConfigKey_CalendarType, value); +} + template CHIP_ERROR GenericConfigurationManagerImpl::GetCountryCode(char * buf, size_t bufSize, size_t & codeLen) { return ReadConfigValueStr(ConfigClass::kConfigKey_CountryCode, buf, bufSize, codeLen); } +template +CHIP_ERROR GenericConfigurationManagerImpl::GetActiveLocale(char * buf, size_t bufSize, size_t & codeLen) +{ + return ReadConfigValueStr(ConfigClass::kConfigKey_ActiveLocale, buf, bufSize, codeLen); +} + template CHIP_ERROR GenericConfigurationManagerImpl::StoreCountryCode(const char * code, size_t codeLen) { return WriteConfigValueStr(ConfigClass::kConfigKey_CountryCode, code, codeLen); } +template +CHIP_ERROR GenericConfigurationManagerImpl::StoreActiveLocale(const char * code, size_t codeLen) +{ + return WriteConfigValueStr(ConfigClass::kConfigKey_ActiveLocale, code, codeLen); +} + template CHIP_ERROR GenericConfigurationManagerImpl::GetBreadcrumb(uint64_t & breadcrumb) { @@ -441,7 +499,7 @@ CHIP_ERROR GenericConfigurationManagerImpl::GetLifetimeCounter(uint } template -CHIP_ERROR GenericConfigurationManagerImpl::_IncrementLifetimeCounter() +CHIP_ERROR GenericConfigurationManagerImpl::IncrementLifetimeCounter() { #if CHIP_ENABLE_ROTATING_DEVICE_ID return mLifetimePersistedCounter.Advance(); @@ -484,6 +542,10 @@ GenericConfigurationManagerImpl::GetBLEDeviceIdentificationInfo(Ble SuccessOrExit(err); deviceIdInfo.SetDeviceDiscriminator(discriminator); +#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING + deviceIdInfo.SetAdditionalDataFlag(true); +#endif + exit: return err; } diff --git a/src/include/platform/internal/GenericConfigurationManagerImpl.h b/src/include/platform/internal/GenericConfigurationManagerImpl.h index 8e750651ab5253..d29a0ed2a38240 100644 --- a/src/include/platform/internal/GenericConfigurationManagerImpl.h +++ b/src/include/platform/internal/GenericConfigurationManagerImpl.h @@ -76,7 +76,7 @@ class GenericConfigurationManagerImpl : public ConfigurationManager CHIP_ERROR GetSetupDiscriminator(uint16_t & setupDiscriminator) override; CHIP_ERROR StoreSetupDiscriminator(uint16_t setupDiscriminator) override; CHIP_ERROR GetLifetimeCounter(uint16_t & lifetimeCounter) override; - CHIP_ERROR _IncrementLifetimeCounter(); + CHIP_ERROR IncrementLifetimeCounter() override; CHIP_ERROR GetFailSafeArmed(bool & val) override; CHIP_ERROR SetFailSafeArmed(bool val) override; CHIP_ERROR GetBLEDeviceIdentificationInfo(Ble::ChipBLEDeviceIdentificationInfo & deviceIdInfo) override; @@ -91,7 +91,9 @@ class GenericConfigurationManagerImpl : public ConfigurationManager CHIP_ERROR GetRegulatoryLocation(uint8_t & location) override; CHIP_ERROR StoreRegulatoryLocation(uint8_t location) override; CHIP_ERROR GetCountryCode(char * buf, size_t bufSize, size_t & codeLen) override; + CHIP_ERROR GetActiveLocale(char * buf, size_t bufSize, size_t & codeLen) override; CHIP_ERROR StoreCountryCode(const char * code, size_t codeLen) override; + CHIP_ERROR StoreActiveLocale(const char * code, size_t codeLen) override; CHIP_ERROR GetBreadcrumb(uint64_t & breadcrumb) override; CHIP_ERROR StoreBreadcrumb(uint64_t breadcrumb) override; CHIP_ERROR GetRebootCount(uint32_t & rebootCount) override; @@ -108,6 +110,10 @@ class GenericConfigurationManagerImpl : public ConfigurationManager CHIP_ERROR GetLocalConfigDisabled(bool & disabled) override; CHIP_ERROR GetReachable(bool & reachable) override; CHIP_ERROR GetUniqueId(char * buf, size_t bufSize) override; + CHIP_ERROR GetHourFormat(uint8_t & format) override; + CHIP_ERROR StoreHourFormat(uint8_t format) override; + CHIP_ERROR GetCalendarType(uint8_t & type) override; + CHIP_ERROR StoreCalendarType(uint8_t type) override; CHIP_ERROR RunUnitTests(void) override; bool IsFullyProvisioned() override; void InitiateFactoryReset() override; diff --git a/src/include/platform/internal/GenericPlatformManagerImpl.h b/src/include/platform/internal/GenericPlatformManagerImpl.h index cd058dea30c461..e2af4652b51361 100644 --- a/src/include/platform/internal/GenericPlatformManagerImpl.h +++ b/src/include/platform/internal/GenericPlatformManagerImpl.h @@ -65,6 +65,7 @@ class GenericPlatformManagerImpl AttributeList & labelList); CHIP_ERROR _GetUserLabelList(EndpointId endpoint, AttributeList & labelList); + CHIP_ERROR _GetSupportedLocales(AttributeList & supportedLocales); // ===== Support methods that can be overridden by the implementation subclass. @@ -102,6 +103,13 @@ inline CHIP_ERROR GenericPlatformManagerImpl::_GetUserLabelList( return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } +template +inline CHIP_ERROR +GenericPlatformManagerImpl::_GetSupportedLocales(AttributeList & supportedLocales) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + } // namespace Internal } // namespace DeviceLayer } // namespace chip diff --git a/src/inet/BUILD.gn b/src/inet/BUILD.gn index fc94850e7e7f8d..164c0076c5a546 100644 --- a/src/inet/BUILD.gn +++ b/src/inet/BUILD.gn @@ -24,6 +24,10 @@ import("${chip_root}/src/lwip/lwip.gni") import("${chip_root}/src/platform/device.gni") import("inet.gni") +if (chip_system_config_use_open_thread_udp) { + import("//build_overrides/openthread.gni") +} + declare_args() { # Extra header to include in SystemConfig.h for project. chip_inet_project_config_include = "" @@ -50,10 +54,14 @@ buildconfig_header("inet_buildconfig") { [ "INET_PLATFORM_CONFIG_INCLUDE=${chip_inet_platform_config_include}" ] } - defines += [ - "INET_TCP_END_POINT_IMPL_CONFIG_FILE=", - "INET_UDP_END_POINT_IMPL_CONFIG_FILE=", - ] + defines += [ "INET_TCP_END_POINT_IMPL_CONFIG_FILE=" ] + if (chip_system_config_use_open_thread_udp) { + defines += [ + "INET_UDP_END_POINT_IMPL_CONFIG_FILE=", + ] + } else { + defines += [ "INET_UDP_END_POINT_IMPL_CONFIG_FILE=" ] + } } source_set("inet_config_header") { @@ -105,6 +113,16 @@ static_library("inet") { public_deps += [ "${chip_root}/src/lwip" ] } + if (chip_system_config_use_open_thread_udp) { + if (chip_openthread_ftd) { + public_deps += + [ "${chip_root}/third_party/openthread/repo:libopenthread-ftd" ] + } else { + public_deps += + [ "${chip_root}/third_party/openthread/repo:libopenthread-mtd" ] + } + } + if (chip_inet_config_enable_tcp_endpoint) { sources += [ "TCPEndPoint.cpp", @@ -119,10 +137,20 @@ static_library("inet") { sources += [ "UDPEndPoint.cpp", "UDPEndPoint.h", - "UDPEndPointImpl${chip_system_config_inet}.cpp", - "UDPEndPointImpl${chip_system_config_inet}.h", "UDPEndPointImpl.h", ] + + if (chip_system_config_use_open_thread_udp) { + sources += [ + "UDPEndPointImpl_OpenThread.cpp", + "UDPEndPointImpl_OpenThread.h", + ] + } else { + sources += [ + "UDPEndPointImpl${chip_system_config_inet}.cpp", + "UDPEndPointImpl${chip_system_config_inet}.h", + ] + } } if (chip_with_nlfaultinjection) { diff --git a/src/inet/UDPEndPoint.h b/src/inet/UDPEndPoint.h index 005dccf26eb8b5..9cea83fb3cbc88 100644 --- a/src/inet/UDPEndPoint.h +++ b/src/inet/UDPEndPoint.h @@ -37,6 +37,8 @@ #include #include +struct otInstance; + namespace chip { namespace Inet { @@ -245,6 +247,13 @@ class DLL_EXPORT UDPEndPoint : public EndPointBasis */ virtual void Free() = 0; + /** + * Set Network Native Parameters (optional) + * + * Some networking stack requires additionnal parameters + */ + virtual inline void SetNativeParams(void * params) { (void) params; } + protected: UDPEndPoint(EndPointManager & endPointManager) : EndPointBasis(endPointManager), mState(State::kReady), OnMessageReceived(nullptr), OnReceiveError(nullptr) diff --git a/src/inet/UDPEndPointImpl_OpenThread.cpp b/src/inet/UDPEndPointImpl_OpenThread.cpp new file mode 100644 index 00000000000000..7822c33f83aad2 --- /dev/null +++ b/src/inet/UDPEndPointImpl_OpenThread.cpp @@ -0,0 +1,265 @@ +/* + * + * Copyright (c) 2020-2021 Project CHIP Authors + * Copyright (c) 2018 Google LLC. + * Copyright (c) 2013-2018 Nest Labs, Inc. + * + * 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. + */ + +#include + +#include +#include +#include + +#include + +#include + +namespace chip { +namespace Inet { + +void UDPEndPointImplOT::handleUdpReceive(void * aContext, otMessage * aMessage, const otMessageInfo * aMessageInfo) +{ + UDPEndPointImplOT * ep = static_cast(aContext); + IPPacketInfo pktInfo; + uint16_t msgLen = otMessageGetLength(aMessage); + System::PacketBufferHandle payload; +#if CHIP_DETAIL_LOGGING + static uint16_t msgReceivedCount = 0; + char sourceStr[Inet::IPAddress::kMaxStringLength]; + char destStr[Inet::IPAddress::kMaxStringLength]; +#endif + + if (msgLen > System::PacketBuffer::kMaxSizeWithoutReserve) + { + ChipLogError(Inet, "UDP message too long, discarding. Size received %d", msgLen); + return; + } + + pktInfo.SrcAddress = chip::DeviceLayer::Internal::ToIPAddress(aMessageInfo->mPeerAddr); + pktInfo.DestAddress = chip::DeviceLayer::Internal::ToIPAddress(aMessageInfo->mSockAddr); + pktInfo.SrcPort = aMessageInfo->mPeerPort; + pktInfo.DestPort = aMessageInfo->mSockPort; + + payload = System::PacketBufferHandle::New(msgLen, 0); + + if (payload.IsNull()) + { + ChipLogError(Inet, "Failed to allocate a System buffer of size %d for UDP Message reception.", msgLen); + return; + } + +#if CHIP_DETAIL_LOGGING + pktInfo.SrcAddress.ToString(sourceStr, Inet::IPAddress::kMaxStringLength); + pktInfo.DestAddress.ToString(destStr, Inet::IPAddress::kMaxStringLength); + + ChipLogDetail(Inet, + "UDP Message Received packet nb : %d with the following data :\r\nSrcAddr : %s\r\nSrc Port : %d\r\n\r\nDestAddr " + ": %s\r\nDest Port %d\r\nPayload Length %d", + ++msgReceivedCount, sourceStr, pktInfo.SrcPort, destStr, pktInfo.DestPort, msgLen); + +#endif + + memcpy(payload->Start(), &pktInfo, sizeof(IPPacketInfo)); + + if (otMessageRead(aMessage, 0, payload->Start() + sizeof(IPPacketInfo), msgLen) != msgLen) + { + ChipLogError(Inet, "Failed to copy OpenThread buffer into System Packet buffer"); + return; + } + payload->SetDataLength(msgLen + sizeof(IPPacketInfo)); + + ep->Retain(); + CHIP_ERROR err = ep->GetSystemLayer().ScheduleLambda([ep, p = System::LwIPPacketBufferView::UnsafeGetLwIPpbuf(payload)] { + ep->HandleDataReceived(System::PacketBufferHandle::Adopt(p)); + ep->Release(); + }); + if (err == CHIP_NO_ERROR) + { + // If ScheduleLambda() succeeded, it has ownership of the buffer, so we need to release it (without freeing it). + static_cast(std::move(payload).UnsafeRelease()); + } + else + { + ep->Release(); + } +} + +CHIP_ERROR UDPEndPointImplOT::IPv6Bind(otUdpSocket & socket, const IPAddress & address, uint16_t port, InterfaceId interface) +{ + (void) interface; + otError err = OT_ERROR_NONE; + otSockAddr listenSockAddr; + + memset(&socket, 0, sizeof(socket)); + memset(&listenSockAddr, 0, sizeof(listenSockAddr)); + + listenSockAddr.mPort = port; + listenSockAddr.mAddress = chip::DeviceLayer::Internal::ToOpenThreadIP6Address(address); + + otUdpOpen(mOTInstance, &socket, handleUdpReceive, this); + otUdpBind(mOTInstance, &socket, &listenSockAddr, OT_NETIF_THREAD); + + return chip::DeviceLayer::Internal::MapOpenThreadError(err); +} + +CHIP_ERROR UDPEndPointImplOT::BindImpl(IPAddressType addressType, const IPAddress & addr, uint16_t port, InterfaceId interface) +{ + + if (addressType != IPAddressType::kIPv6) + { + return INET_ERROR_WRONG_ADDRESS_TYPE; + } + + ReturnErrorOnFailure(IPv6Bind(mSocket, addr, port, interface)); + mBoundPort = port; + mBoundIntfId = interface; + + return CHIP_NO_ERROR; +} + +InterfaceId UDPEndPointImplOT::GetBoundInterface() const +{ + return mBoundIntfId; +} + +uint16_t UDPEndPointImplOT::GetBoundPort() const +{ + return mBoundPort; +} + +CHIP_ERROR UDPEndPointImplOT::ListenImpl() +{ + // Nothing to do. Callback was set upon Binding call. + return CHIP_NO_ERROR; +} + +void UDPEndPointImplOT::HandleDataReceived(System::PacketBufferHandle && msg) +{ + if ((mState == State::kListening) && (OnMessageReceived != nullptr)) + { + const IPPacketInfo * pktInfo = GetPacketInfo(msg); + + if (pktInfo != nullptr) + { + const IPPacketInfo pktInfoCopy = *pktInfo; // copy the address info so that the app can free the + // PacketBuffer without affecting access to address info. + + msg->ConsumeHead(sizeof(IPPacketInfo)); + OnMessageReceived(this, std::move(msg), &pktInfoCopy); + } + else + { + if (OnReceiveError != nullptr) + { + OnReceiveError(this, CHIP_ERROR_INBOUND_MESSAGE_TOO_BIG, nullptr); + } + } + } +} + +CHIP_ERROR UDPEndPointImplOT::SetMulticastLoopback(IPVersion aIPVersion, bool aLoopback) +{ + (void) aIPVersion; + (void) aLoopback; + // TODO + return CHIP_ERROR_NOT_IMPLEMENTED; +} + +CHIP_ERROR UDPEndPointImplOT::BindInterfaceImpl(IPAddressType addressType, InterfaceId interfaceId) +{ + (void) addressType; + (void) interfaceId; + return CHIP_NO_ERROR; +} + +CHIP_ERROR UDPEndPointImplOT::SendMsgImpl(const IPPacketInfo * aPktInfo, System::PacketBufferHandle && msg) +{ + otError error = OT_ERROR_NONE; + otMessage * message; + otMessageInfo messageInfo; + + // For now the entire message must fit within a single buffer. + VerifyOrReturnError(!msg->HasChainedBuffer(), CHIP_ERROR_MESSAGE_TOO_LONG); + + memset(&messageInfo, 0, sizeof(messageInfo)); + + messageInfo.mSockAddr = chip::DeviceLayer::Internal::ToOpenThreadIP6Address(aPktInfo->SrcAddress); + messageInfo.mPeerAddr = chip::DeviceLayer::Internal::ToOpenThreadIP6Address(aPktInfo->DestAddress); + messageInfo.mPeerPort = aPktInfo->DestPort; + + message = otUdpNewMessage(mOTInstance, NULL); + VerifyOrExit(message != NULL, error = OT_ERROR_NO_BUFS); + + error = otMessageAppend(message, msg->Start(), msg->DataLength()); + + if (error == OT_ERROR_NONE) + { + error = otUdpSend(mOTInstance, &mSocket, message, &messageInfo); + } + +exit: + if (error != OT_ERROR_NONE && message != NULL) + { + otMessageFree(message); + } + + return chip::DeviceLayer::Internal::MapOpenThreadError(error); +} + +void UDPEndPointImplOT::CloseImpl() +{ + if (otUdpIsOpen(mOTInstance, &mSocket)) + { + otUdpClose(mOTInstance, &mSocket); + } +} + +void UDPEndPointImplOT::Free() +{ + Close(); + Release(); +} + +CHIP_ERROR UDPEndPointImplOT::IPv6JoinLeaveMulticastGroupImpl(InterfaceId aInterfaceId, const IPAddress & aAddress, bool join) +{ + const otIp6Address otAddress = chip::DeviceLayer::Internal::ToOpenThreadIP6Address(aAddress); + + if (join) + { + return chip::DeviceLayer::Internal::MapOpenThreadError(otIp6SubscribeMulticastAddress(mOTInstance, &otAddress)); + } + else + { + return chip::DeviceLayer::Internal::MapOpenThreadError(otIp6UnsubscribeMulticastAddress(mOTInstance, &otAddress)); + } +} + +IPPacketInfo * UDPEndPointImplOT::GetPacketInfo(const System::PacketBufferHandle & aBuffer) +{ + if (!aBuffer->EnsureReservedSize(sizeof(IPPacketInfo))) + { + return nullptr; + } + + uintptr_t lStart = (uintptr_t) aBuffer->Start(); + uintptr_t lPacketInfoStart = lStart - sizeof(IPPacketInfo); + + // Align to a 4-byte boundary + return reinterpret_cast(lPacketInfoStart & ~(sizeof(uint32_t) - 1)); +} + +} // namespace Inet +} // namespace chip diff --git a/src/inet/UDPEndPointImpl_OpenThread.h b/src/inet/UDPEndPointImpl_OpenThread.h new file mode 100644 index 00000000000000..e6299c40c95ea8 --- /dev/null +++ b/src/inet/UDPEndPointImpl_OpenThread.h @@ -0,0 +1,71 @@ +/* + * + * Copyright (c) 2020-2021 Project CHIP Authors + * Copyright (c) 2018 Google LLC + * Copyright (c) 2013-2017 Nest Labs, Inc. + * + * 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. + */ + +#pragma once + +#include + +#include +#include +#include +#include +#include +#include + +namespace chip { +namespace Inet { + +class UDPEndPointImplOT : public UDPEndPoint +{ +public: + UDPEndPointImplOT(EndPointManager & endPointManager) : + UDPEndPoint(endPointManager), mBoundIntfId(InterfaceId::Null()) + {} + + // UDPEndPoint overrides. + InterfaceId GetBoundInterface() const override; + uint16_t GetBoundPort() const override; + void Free() override; + void HandleDataReceived(System::PacketBufferHandle && msg); + inline void SetNativeParams(void * params) { mOTInstance = static_cast(params); } + CHIP_ERROR SetMulticastLoopback(IPVersion aIPVersion, bool aLoopback) override; + CHIP_ERROR BindInterfaceImpl(IPAddressType addressType, InterfaceId interfaceId) override; + +private: + // UDPEndPoint overrides. + CHIP_ERROR IPv6JoinLeaveMulticastGroupImpl(InterfaceId aInterfaceId, const IPAddress & aAddress, bool join) override; + CHIP_ERROR BindImpl(IPAddressType addressType, const IPAddress & address, uint16_t port, InterfaceId interfaceId) override; + CHIP_ERROR ListenImpl() override; + CHIP_ERROR SendMsgImpl(const IPPacketInfo * pktInfo, chip::System::PacketBufferHandle && msg) override; + void CloseImpl() override; + CHIP_ERROR IPv6Bind(otUdpSocket & socket, const IPAddress & address, uint16_t port, InterfaceId interface); + static IPPacketInfo * GetPacketInfo(const System::PacketBufferHandle & aBuffer); + + static void handleUdpReceive(void * aContext, otMessage * aMessage, const otMessageInfo * aMessageInfo); + + InterfaceId mBoundIntfId; + uint16_t mBoundPort; + otUdpSocket mSocket; + otInstance * mOTInstance = nullptr; +}; + +using UDPEndPointImpl = UDPEndPointImplOT; + +} // namespace Inet +} // namespace chip diff --git a/src/lib/core/CHIPError.h b/src/lib/core/CHIPError.h index f1039996298ca8..f7961f7c55768d 100644 --- a/src/lib/core/CHIPError.h +++ b/src/lib/core/CHIPError.h @@ -2357,6 +2357,15 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_MISSING_URI_SEPARATOR CHIP_CORE_ERROR(0xd7) +/** + * @def CHIP_ERROR_IM_CONSTRAINT_ERROR + * + * @brief + * The equivalent of a CONSTRAINT_ERROR status: a value was out of the valid + * range. + */ +#define CHIP_ERROR_IM_CONSTRAINT_ERROR CHIP_CORE_ERROR(0xd8) + /** * @} */ diff --git a/src/lib/core/CHIPTLVReader.cpp b/src/lib/core/CHIPTLVReader.cpp index 4af5d8d9b3d84b..18950d7111e863 100644 --- a/src/lib/core/CHIPTLVReader.cpp +++ b/src/lib/core/CHIPTLVReader.cpp @@ -245,8 +245,8 @@ namespace { float BitCastToFloat(const uint64_t elemLenOrVal) { float f; - auto u32 = static_cast(elemLenOrVal); - memcpy(&f, &u32, sizeof(f)); + auto unsigned32 = static_cast(elemLenOrVal); + memcpy(&f, &unsigned32, sizeof(f)); return f; } } // namespace diff --git a/src/lib/core/NodeId.h b/src/lib/core/NodeId.h index 6dc6b923e069e4..ea2024266b76dd 100644 --- a/src/lib/core/NodeId.h +++ b/src/lib/core/NodeId.h @@ -78,7 +78,7 @@ constexpr NodeId NodeIdFromGroupId(GroupId aGroupId) return kMinGroupNodeId | aGroupId; } -constexpr NodeId NodeIdFromPAKEKeyId(GroupId aPAKEKeyId) +constexpr NodeId NodeIdFromPAKEKeyId(uint16_t aPAKEKeyId) { return kMinPAKEKeyId | aPAKEKeyId; } diff --git a/src/lib/dnssd/minimal_mdns/Server.cpp b/src/lib/dnssd/minimal_mdns/Server.cpp index b58c60cb3e463f..01b881f39c78fb 100644 --- a/src/lib/dnssd/minimal_mdns/Server.cpp +++ b/src/lib/dnssd/minimal_mdns/Server.cpp @@ -189,10 +189,7 @@ ServerBase::~ServerBase() void ServerBase::Shutdown() { - mEndpoints.ForEachActiveObject([&](auto * endpoint) { - ShutdownEndpoint(*endpoint); - return chip::Loop::Continue; - }); + mEndpoints.ReleaseAll(); } void ServerBase::ShutdownEndpoint(EndpointInfo & aEndpoint) diff --git a/src/lib/shell/commands/Dns.cpp b/src/lib/shell/commands/Dns.cpp index 4ab4cd2c26f5f1..57c182da402598 100644 --- a/src/lib/shell/commands/Dns.cpp +++ b/src/lib/shell/commands/Dns.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -113,6 +114,7 @@ class DnsShellResolverDelegate : public Dnssd::ResolverDelegate }; DnsShellResolverDelegate sDnsShellResolverDelegate; +Dnssd::ResolverProxy sResolverProxy; CHIP_ERROR ResolveHandler(int argc, char ** argv) { @@ -124,7 +126,7 @@ CHIP_ERROR ResolveHandler(int argc, char ** argv) peerId.SetCompressedFabricId(strtoull(argv[0], NULL, 10)); peerId.SetNodeId(strtoull(argv[1], NULL, 10)); - return Dnssd::Resolver::Instance().ResolveNodeId(peerId, Inet::IPAddressType::kAny, Dnssd::Resolver::CacheBypass::On); + return sResolverProxy.ResolveNodeId(peerId, Inet::IPAddressType::kAny, Dnssd::Resolver::CacheBypass::On); } bool ParseSubType(int argc, char ** argv, Dnssd::DiscoveryFilter & filter) @@ -184,7 +186,7 @@ CHIP_ERROR BrowseCommissionableHandler(int argc, char ** argv) streamer_printf(streamer_get(), "Browsing commissionable nodes...\r\n"); - return Dnssd::Resolver::Instance().FindCommissionableNodes(filter); + return sResolverProxy.FindCommissionableNodes(filter); } CHIP_ERROR BrowseCommissionerHandler(int argc, char ** argv) @@ -199,7 +201,7 @@ CHIP_ERROR BrowseCommissionerHandler(int argc, char ** argv) streamer_printf(streamer_get(), "Browsing commissioners...\r\n"); - return Dnssd::Resolver::Instance().FindCommissioners(filter); + return sResolverProxy.FindCommissioners(filter); } CHIP_ERROR BrowseHandler(int argc, char ** argv) @@ -221,8 +223,8 @@ CHIP_ERROR DnsHandler(int argc, char ** argv) return CHIP_NO_ERROR; } - Dnssd::Resolver::Instance().Init(DeviceLayer::UDPEndPointManager()); - Dnssd::Resolver::Instance().SetResolverDelegate(&sDnsShellResolverDelegate); + sResolverProxy.Init(DeviceLayer::UDPEndPointManager()); + sResolverProxy.SetResolverDelegate(&sDnsShellResolverDelegate); return sShellDnsSubcommands.ExecCommand(argc, argv); } diff --git a/src/lib/shell/commands/Ota.cpp b/src/lib/shell/commands/Ota.cpp index 93dee547918bc9..3f2067f44e860c 100644 --- a/src/lib/shell/commands/Ota.cpp +++ b/src/lib/shell/commands/Ota.cpp @@ -26,16 +26,6 @@ using namespace chip::DeviceLayer; namespace chip { - -// TODO: Remove weak functions when ESP32 all-clusters-app includes code from src/app/clusters/ota-requestor -// The code requires OTA Provider client cluster which interferes with OTA Provider server cluster, -// already enabled in the all-clusters-app. -__attribute__((weak)) void SetRequestorInstance(OTARequestorInterface * instance) {} -__attribute__((weak)) OTARequestorInterface * GetRequestorInstance() -{ - return nullptr; -} - namespace Shell { namespace { diff --git a/src/lib/support/JniTypeWrappers.h b/src/lib/support/JniTypeWrappers.h index 64d03301333b5a..ced71bb0e1b793 100644 --- a/src/lib/support/JniTypeWrappers.h +++ b/src/lib/support/JniTypeWrappers.h @@ -37,7 +37,13 @@ class JniUtfString mChars = env->GetStringUTFChars(string, 0); mDataLength = env->GetStringUTFLength(string); } - ~JniUtfString() { mEnv->ReleaseStringUTFChars(mString, mChars); } + ~JniUtfString() + { + if (mString != nullptr) + { + mEnv->ReleaseStringUTFChars(mString, mChars); + } + } const char * c_str() const { return mChars; } diff --git a/src/messaging/ExchangeContext.cpp b/src/messaging/ExchangeContext.cpp index 3a5cfb477ee7c7..8ec3b67989aff8 100644 --- a/src/messaging/ExchangeContext.cpp +++ b/src/messaging/ExchangeContext.cpp @@ -317,17 +317,18 @@ bool ExchangeContext::MatchExchange(const SessionHandle & session, const PacketH void ExchangeContext::OnSessionReleased() { - if (!IsResponseExpected()) + ExchangeHandle ref(*this); + + if (IsResponseExpected()) { - // Nothing to do in this case - return; + // If we're waiting on a response, we now know it's never going to show up + // and we should notify our delegate accordingly. + CancelResponseTimer(); + SetResponseExpected(false); + NotifyResponseTimeout(); } - // If we're waiting on a response, we now know it's never going to show up - // and we should notify our delegate accordingly. - CancelResponseTimer(); - SetResponseExpected(false); - NotifyResponseTimeout(); + DoClose(true /* clearRetransTable */); } CHIP_ERROR ExchangeContext::StartResponseTimer() diff --git a/src/messaging/ReliableMessageMgr.cpp b/src/messaging/ReliableMessageMgr.cpp index 4c696e891d7cd1..4869be51e4dbc9 100644 --- a/src/messaging/ReliableMessageMgr.cpp +++ b/src/messaging/ReliableMessageMgr.cpp @@ -35,6 +35,8 @@ #include #include +using namespace chip::System::Clock::Literals; + namespace chip { namespace Messaging { @@ -308,7 +310,10 @@ void ReliableMessageMgr::StartTimer() #endif StopTimer(); - VerifyOrDie(mSystemLayer->StartTimer(nextWakeTime, Timeout, this) == CHIP_NO_ERROR); + + const System::Clock::Timestamp now = System::SystemClock().GetMonotonicTimestamp(); + const auto nextWakeDelay = (nextWakeTime > now) ? nextWakeTime - now : 0_ms; + VerifyOrDie(mSystemLayer->StartTimer(nextWakeDelay, Timeout, this) == CHIP_NO_ERROR); } else { diff --git a/src/messaging/tests/MessagingContext.h b/src/messaging/tests/MessagingContext.h index be14c0a3f172fc..768fde0abb26f5 100644 --- a/src/messaging/tests/MessagingContext.h +++ b/src/messaging/tests/MessagingContext.h @@ -185,6 +185,8 @@ class LoopbackMessagingContext : public MessagingContext TransportMgrBase & GetTransportMgr() { return mTransportManager; } + IOContext & GetIOContext() { return mIOContext; } + /* * For unit-tests that simulate end-to-end transmission and reception of messages in loopback mode, * this mode better replicates a real-functioning stack that correctly handles the processing diff --git a/src/messaging/tests/TestReliableMessageProtocol.cpp b/src/messaging/tests/TestReliableMessageProtocol.cpp index 981c019880ed72..4eaa0f6f5c9d77 100644 --- a/src/messaging/tests/TestReliableMessageProtocol.cpp +++ b/src/messaging/tests/TestReliableMessageProtocol.cpp @@ -227,9 +227,8 @@ void CheckResendApplicationMessage(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, gLoopback.mDroppedMessageCount == 1); NL_TEST_ASSERT(inSuite, rm->TestGetCountRetransTable() == 1); - // sleep 65 ms to trigger first re-transmit - chip::test_utils::SleepMillis(65); - ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm); + // Wait for the first re-transmit (should take 64ms) + ctx.GetIOContext().DriveIOUntil(1000_ms32, [] { return gLoopback.mSentMessageCount >= 2; }); ctx.DrainAndServiceIO(); // Ensure the retransmit message was dropped, and is still there in the retransmit table @@ -238,9 +237,8 @@ void CheckResendApplicationMessage(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, gLoopback.mDroppedMessageCount == 2); NL_TEST_ASSERT(inSuite, rm->TestGetCountRetransTable() == 1); - // sleep another 65 ms to trigger second re-transmit - chip::test_utils::SleepMillis(65); - ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm); + // Wait for the second re-transmit (should take 64ms) + ctx.GetIOContext().DriveIOUntil(1000_ms32, [] { return gLoopback.mSentMessageCount >= 3; }); ctx.DrainAndServiceIO(); // Ensure the retransmit message was NOT dropped, and the retransmit table is empty, as we should have gotten an ack @@ -290,9 +288,8 @@ void CheckCloseExchangeAndResendApplicationMessage(nlTestSuite * inSuite, void * NL_TEST_ASSERT(inSuite, gLoopback.mDroppedMessageCount == 1); NL_TEST_ASSERT(inSuite, rm->TestGetCountRetransTable() == 1); - // sleep 65 ms to trigger first re-transmit - chip::test_utils::SleepMillis(65); - ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm); + // Wait for the first re-transmit (should take 64ms) + ctx.GetIOContext().DriveIOUntil(1000_ms32, [] { return gLoopback.mSentMessageCount >= 2; }); ctx.DrainAndServiceIO(); // Ensure the retransmit message was dropped, and is still there in the retransmit table @@ -301,9 +298,8 @@ void CheckCloseExchangeAndResendApplicationMessage(nlTestSuite * inSuite, void * NL_TEST_ASSERT(inSuite, gLoopback.mDroppedMessageCount == 2); NL_TEST_ASSERT(inSuite, rm->TestGetCountRetransTable() == 1); - // sleep another 65 ms to trigger second re-transmit - chip::test_utils::SleepMillis(65); - ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm); + // Wait for the second re-transmit (should take 64ms) + ctx.GetIOContext().DriveIOUntil(1000_ms32, [] { return gLoopback.mSentMessageCount >= 3; }); ctx.DrainAndServiceIO(); // Ensure the retransmit message was NOT dropped, and the retransmit table is empty, as we should have gotten an ack @@ -349,9 +345,8 @@ void CheckFailedMessageRetainOnSend(nlTestSuite * inSuite, void * inContext) // Ensure the message was dropped NL_TEST_ASSERT(inSuite, gLoopback.mDroppedMessageCount == 1); - // sleep 65 ms to trigger first re-transmit - chip::test_utils::SleepMillis(65); - ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm); + // Wait for the first re-transmit (should take 64ms) + ctx.GetIOContext().DriveIOUntil(1000_ms32, [] { return gLoopback.mSentMessageCount >= 2; }); ctx.DrainAndServiceIO(); // Ensure the retransmit table is empty, as we did not provide a message to retain @@ -441,9 +436,8 @@ void CheckResendApplicationMessageWithPeerExchange(nlTestSuite * inSuite, void * NL_TEST_ASSERT(inSuite, rm->TestGetCountRetransTable() == 1); NL_TEST_ASSERT(inSuite, !mockReceiver.IsOnMessageReceivedCalled); - // sleep 65 ms to trigger first re-transmit - chip::test_utils::SleepMillis(65); - ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm); + // Wait for the first re-transmit (should take 64ms) + ctx.GetIOContext().DriveIOUntil(1000_ms32, [] { return gLoopback.mSentMessageCount >= 2; }); ctx.DrainAndServiceIO(); // Ensure the retransmit message was not dropped, and is no longer in the retransmit table @@ -513,9 +507,8 @@ void CheckDuplicateMessageClosedExchange(nlTestSuite * inSuite, void * inContext err = ctx.GetExchangeManager().UnregisterUnsolicitedMessageHandlerForType(Echo::MsgType::EchoRequest); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); - // sleep 65 ms to trigger first re-transmit - chip::test_utils::SleepMillis(65); - ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm); + // Wait for the first re-transmit and ack (should take 64ms) + ctx.GetIOContext().DriveIOUntil(1000_ms32, [] { return gLoopback.mSentMessageCount >= 3; }); ctx.DrainAndServiceIO(); // Ensure the retransmit message was sent and the ack was sent @@ -574,9 +567,8 @@ void CheckResendSessionEstablishmentMessageWithPeerExchange(nlTestSuite * inSuit NL_TEST_ASSERT(inSuite, rm->TestGetCountRetransTable() == 1); NL_TEST_ASSERT(inSuite, !mockReceiver.IsOnMessageReceivedCalled); - // sleep 65 ms to trigger first re-transmit - chip::test_utils::SleepMillis(65); - ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm); + // Wait for the first re-transmit (should take 64ms) + inctx.GetIOContext().DriveIOUntil(1000_ms32, [] { return gLoopback.mSentMessageCount >= 2; }); inctx.DrainAndServiceIO(); // Ensure the retransmit message was not dropped, and is no longer in the retransmit table @@ -649,9 +641,8 @@ void CheckDuplicateMessage(nlTestSuite * inSuite, void * inContext) mockReceiver.mDropAckResponse = false; mockReceiver.mRetainExchange = false; - // sleep 65 ms to trigger first re-transmit - chip::test_utils::SleepMillis(65); - ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm); + // Wait for the first re-transmit and ack (should take 64ms) + ctx.GetIOContext().DriveIOUntil(1000_ms32, [] { return gLoopback.mSentMessageCount >= 3; }); ctx.DrainAndServiceIO(); // Ensure the retransmit message was sent and the ack was sent @@ -1186,9 +1177,8 @@ void CheckLostResponseWithPiggyback(nlTestSuite * inSuite, void * inContext) mockSender.IsOnMessageReceivedCalled = false; mockSender.mReceivedPiggybackAck = false; - // sleep 65 ms to trigger re-transmit from sender - chip::test_utils::SleepMillis(65); - ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm); + // Wait for re-transmit from sender and ack (should take 64ms) + ctx.GetIOContext().DriveIOUntil(1000_ms32, [] { return gLoopback.mSentMessageCount >= 4; }); ctx.DrainAndServiceIO(); // We resent our first message, which did not make it to the app-level @@ -1216,9 +1206,8 @@ void CheckLostResponseWithPiggyback(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, rm->TestGetCountRetransTable() == 0); } - // sleep 65*3 ms to trigger re-transmit from receiver - chip::test_utils::SleepMillis(65 * 3); - ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm); + // Wait for re-transmit from receiver (should take 256ms) + ctx.GetIOContext().DriveIOUntil(1000_ms32, [] { return gLoopback.mSentMessageCount >= 6; }); ctx.DrainAndServiceIO(); // And now we've definitely resent our response message, which should show @@ -1355,6 +1344,14 @@ void CheckLostStandaloneAck(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, rm->TestGetCountRetransTable() == 0); } +int InitializeTestCase(void * inContext) +{ + TestContext & ctx = *static_cast(inContext); + ctx.GetSessionAliceToBob()->AsSecureSession()->SetMRPConfig(gDefaultMRPConfig); + ctx.GetSessionBobToAlice()->AsSecureSession()->SetMRPConfig(gDefaultMRPConfig); + return SUCCESS; +} + /** * TODO: A test that we should have but can't write with the existing * infrastructure we have: @@ -1403,7 +1400,8 @@ nlTestSuite sSuite = "Test-CHIP-ReliableMessageProtocol", &sTests[0], TestContext::InitializeAsync, - TestContext::Finalize + TestContext::Finalize, + InitializeTestCase, }; // clang-format on diff --git a/src/platform/Ameba/AmebaConfig.cpp b/src/platform/Ameba/AmebaConfig.cpp index 02d0580ca82c4c..4e23b7c115db21 100644 --- a/src/platform/Ameba/AmebaConfig.cpp +++ b/src/platform/Ameba/AmebaConfig.cpp @@ -72,7 +72,10 @@ const AmebaConfig::Key AmebaConfig::kConfigKey_OperationalDeviceICACerts = { k const AmebaConfig::Key AmebaConfig::kConfigKey_OperationalDevicePrivateKey = { kConfigNamespace_ChipConfig, "op-device-key" }; const AmebaConfig::Key AmebaConfig::kConfigKey_RegulatoryLocation = { kConfigNamespace_ChipConfig, "regulatory-location" }; const AmebaConfig::Key AmebaConfig::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; +const AmebaConfig::Key AmebaConfig::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; const AmebaConfig::Key AmebaConfig::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; +const AmebaConfig::Key AmebaConfig::kConfigKey_HourFormat = { kConfigNamespace_ChipConfig, "hour-format" }; +const AmebaConfig::Key AmebaConfig::kConfigKey_CalendarType = { kConfigNamespace_ChipConfig, "calendar-type" }; // Keys stored in the Chip-counters namespace const AmebaConfig::Key AmebaConfig::kCounterKey_RebootCount = { kConfigNamespace_ChipCounters, "reboot-count" }; diff --git a/src/platform/Ameba/AmebaConfig.h b/src/platform/Ameba/AmebaConfig.h index eb046e16a412d6..1ba6bf7c37a6f8 100755 --- a/src/platform/Ameba/AmebaConfig.h +++ b/src/platform/Ameba/AmebaConfig.h @@ -66,7 +66,12 @@ class AmebaConfig static const Key kConfigKey_SetupDiscriminator; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; + static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; + static const Key kConfigKey_HourFormat; + static const Key kConfigKey_CalendarType; + + // Counter keys static const Key kCounterKey_RebootCount; static const Key kCounterKey_UpTime; static const Key kCounterKey_TotalOperationalHours; diff --git a/src/platform/Darwin/ConfigurationManagerImpl.cpp b/src/platform/Darwin/ConfigurationManagerImpl.cpp index 3011c9e97ea266..e774115bb3d061 100644 --- a/src/platform/Darwin/ConfigurationManagerImpl.cpp +++ b/src/platform/Darwin/ConfigurationManagerImpl.cpp @@ -164,6 +164,18 @@ CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * buf) #endif // TARGET_OS_OSX } +CHIP_ERROR ConfigurationManagerImpl::GetActiveLocale(char * buf, size_t bufSize, size_t & codeLen) +{ + // TODO: read current active locale. + return CHIP_NO_ERROR; +} + +CHIP_ERROR ConfigurationManagerImpl::StoreActiveLocale(const char * code, size_t codeLen) +{ + // TODO: write current active locale. + return CHIP_NO_ERROR; +} + bool ConfigurationManagerImpl::CanFactoryReset() { // TODO(#742): query the application to determine if factory reset is allowed. diff --git a/src/platform/Darwin/ConfigurationManagerImpl.h b/src/platform/Darwin/ConfigurationManagerImpl.h index 364ffdd035e533..386e66a9733db5 100644 --- a/src/platform/Darwin/ConfigurationManagerImpl.h +++ b/src/platform/Darwin/ConfigurationManagerImpl.h @@ -44,6 +44,8 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp CHIP_ERROR Init(void) override; CHIP_ERROR GetPrimaryWiFiMACAddress(uint8_t * buf) override; + CHIP_ERROR GetActiveLocale(char * buf, size_t bufSize, size_t & codeLen) override; + CHIP_ERROR StoreActiveLocale(const char * code, size_t codeLen) override; bool CanFactoryReset(void) override; void InitiateFactoryReset(void) override; CHIP_ERROR ReadPersistedStorageValue(::chip::Platform::PersistedStorage::Key key, uint32_t & value) override; diff --git a/src/platform/Darwin/PlatformManagerImpl.cpp b/src/platform/Darwin/PlatformManagerImpl.cpp index f67445ef255b15..628f3266b1fc1a 100644 --- a/src/platform/Darwin/PlatformManagerImpl.cpp +++ b/src/platform/Darwin/PlatformManagerImpl.cpp @@ -133,5 +133,21 @@ PlatformManagerImpl::_SetUserLabelList( return CHIP_NO_ERROR; } +CHIP_ERROR +PlatformManagerImpl::_GetSupportedLocales(AttributeList & supportedLocales) +{ + // In Darwin simulation, return following hardcoded list of Strings that are valid values for the ActiveLocale. + supportedLocales.add(CharSpan("en-US", strlen("en-US"))); + supportedLocales.add(CharSpan("de-DE", strlen("de-DE"))); + supportedLocales.add(CharSpan("fr-FR", strlen("fr-FR"))); + supportedLocales.add(CharSpan("en-GB", strlen("en-GB"))); + supportedLocales.add(CharSpan("es-ES", strlen("es-ES"))); + supportedLocales.add(CharSpan("zh-CN", strlen("zh-CN"))); + supportedLocales.add(CharSpan("it-IT", strlen("it-IT"))); + supportedLocales.add(CharSpan("ja-JP", strlen("ja-JP"))); + + return CHIP_NO_ERROR; +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/Darwin/PlatformManagerImpl.h b/src/platform/Darwin/PlatformManagerImpl.h index 7a69e07f0d49d4..e3a535edb1abcd 100644 --- a/src/platform/Darwin/PlatformManagerImpl.h +++ b/src/platform/Darwin/PlatformManagerImpl.h @@ -64,6 +64,7 @@ class PlatformManagerImpl final : public PlatformManager, public Internal::Gener CHIP_ERROR _SetUserLabelList(EndpointId endpoint, AttributeList & labelList); + CHIP_ERROR _GetSupportedLocales(AttributeList & supportedLocales); void _RunEventLoop(); void _LockChipStack(){}; diff --git a/src/platform/Darwin/PosixConfig.cpp b/src/platform/Darwin/PosixConfig.cpp index 5215d7bbf997da..ea815f11832a5c 100644 --- a/src/platform/Darwin/PosixConfig.cpp +++ b/src/platform/Darwin/PosixConfig.cpp @@ -65,7 +65,10 @@ const PosixConfig::Key PosixConfig::kConfigKey_FailSafeArmed = { kConfigNam const PosixConfig::Key PosixConfig::kConfigKey_WiFiStationSecType = { kConfigNamespace_ChipConfig, "sta-sec-type" }; const PosixConfig::Key PosixConfig::kConfigKey_RegulatoryLocation = { kConfigNamespace_ChipConfig, "regulatory-location" }; const PosixConfig::Key PosixConfig::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; +const PosixConfig::Key PosixConfig::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; const PosixConfig::Key PosixConfig::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; +const PosixConfig::Key PosixConfig::kConfigKey_HourFormat = { kConfigNamespace_ChipConfig, "hour-format" }; +const PosixConfig::Key PosixConfig::kConfigKey_CalendarType = { kConfigNamespace_ChipConfig, "calendar-type" }; // Prefix used for NVS keys that contain Chip group encryption keys. const char PosixConfig::kGroupKeyNamePrefix[] = "gk-"; diff --git a/src/platform/Darwin/PosixConfig.h b/src/platform/Darwin/PosixConfig.h index f45026905d6edd..1d852822078c43 100644 --- a/src/platform/Darwin/PosixConfig.h +++ b/src/platform/Darwin/PosixConfig.h @@ -72,7 +72,10 @@ class PosixConfig static const Key kConfigKey_SetupDiscriminator; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; + static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; + static const Key kConfigKey_HourFormat; + static const Key kConfigKey_CalendarType; static const char kGroupKeyNamePrefix[]; diff --git a/src/platform/EFR32/EFR32Config.h b/src/platform/EFR32/EFR32Config.h index ec0715e231f745..c008db24251489 100644 --- a/src/platform/EFR32/EFR32Config.h +++ b/src/platform/EFR32/EFR32Config.h @@ -94,8 +94,11 @@ class EFR32Config static constexpr Key kConfigKey_RegulatoryLocation = EFR32ConfigKey(kChipConfig_KeyBase, 0x09); static constexpr Key kConfigKey_CountryCode = EFR32ConfigKey(kChipConfig_KeyBase, 0x0A); static constexpr Key kConfigKey_Breadcrumb = EFR32ConfigKey(kChipConfig_KeyBase, 0x0B); - static constexpr Key kConfigKey_GroupKeyBase = EFR32ConfigKey(kChipConfig_KeyBase, 0x0C); - static constexpr Key kConfigKey_GroupKeyMax = EFR32ConfigKey(kChipConfig_KeyBase, 0x1B); // Allows 16 Group Keys to be created. + static constexpr Key kConfigKey_ActiveLocale = EFR32ConfigKey(kChipConfig_KeyBase, 0x0C); + static constexpr Key kConfigKey_HourFormat = EFR32ConfigKey(kChipConfig_KeyBase, 0x0D); + static constexpr Key kConfigKey_CalendarType = EFR32ConfigKey(kChipConfig_KeyBase, 0x0E); + static constexpr Key kConfigKey_GroupKeyBase = EFR32ConfigKey(kChipConfig_KeyBase, 0x0F); + static constexpr Key kConfigKey_GroupKeyMax = EFR32ConfigKey(kChipConfig_KeyBase, 0x1E); // Allows 16 Group Keys to be created. // CHIP Counter Keys static constexpr Key kConfigKey_BootCount = EFR32ConfigKey(kChipCounter_KeyBase, 0x00); diff --git a/src/platform/ESP32/BUILD.gn b/src/platform/ESP32/BUILD.gn index 3b13cfd87d9509..67a8c304661c7b 100644 --- a/src/platform/ESP32/BUILD.gn +++ b/src/platform/ESP32/BUILD.gn @@ -20,7 +20,6 @@ assert(chip_device_platform == "esp32") static_library("ESP32") { sources = [ - "../FreeRTOS/SystemTimeSupport.cpp", "../SingletonConfigurationManager.cpp", "BLEManagerImpl.h", "CHIPDevicePlatformConfig.h", @@ -41,9 +40,11 @@ static_library("ESP32") { "KeyValueStoreManagerImpl.h", "Logging.cpp", "LwIPCoreLock.cpp", + "NetworkCommissioningDriver.h", "PlatformManagerImpl.cpp", "PlatformManagerImpl.h", "SystemTimeSupport.cpp", + "SystemTimeSupport.h", "bluedroid/BLEManagerImpl.cpp", "nimble/BLEManagerImpl.cpp", ] @@ -67,8 +68,7 @@ static_library("ESP32") { if (chip_enable_wifi) { sources += [ "ConnectivityManagerImpl_WiFi.cpp", - "WiFiProvisioning.cpp", - "WiFiProvisioning.h", + "NetworkCommissioningWiFiDriver.cpp", ] } diff --git a/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp b/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp index b053bd9e70e0c7..85e739e58cf524 100644 --- a/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp +++ b/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include "esp_event.h" @@ -441,6 +442,10 @@ void ConnectivityManagerImpl::OnWiFiPlatformEvent(const ChipDeviceEvent * event) { switch (event->Platform.ESPSystemEvent.Id) { + case WIFI_EVENT_SCAN_DONE: + ChipLogProgress(DeviceLayer, "WIFI_EVENT_SCAN_DONE"); + NetworkCommissioning::ESPWiFiDriver::GetInstance().OnScanWiFiNetworkDone(); + break; case WIFI_EVENT_STA_START: ChipLogProgress(DeviceLayer, "WIFI_EVENT_STA_START"); DriveStationState(); @@ -644,7 +649,7 @@ void ConnectivityManagerImpl::OnStationConnected() { ChipLogError(DeviceLayer, "esp_netif_create_ip6_linklocal() failed for WIFI_STA_DEF interface: %s", esp_err_to_name(err)); } - + NetworkCommissioning::ESPWiFiDriver::GetInstance().OnConnectWiFiNetwork(); // TODO Invoke WARM to perform actions that occur when the WiFi station interface comes up. // Alert other components of the new state. diff --git a/src/platform/ESP32/DeviceNetworkProvisioningDelegateImpl.cpp b/src/platform/ESP32/DeviceNetworkProvisioningDelegateImpl.cpp index 25461a06ca5606..aa2bef3b2fc6b8 100644 --- a/src/platform/ESP32/DeviceNetworkProvisioningDelegateImpl.cpp +++ b/src/platform/ESP32/DeviceNetworkProvisioningDelegateImpl.cpp @@ -19,7 +19,7 @@ #include #include "DeviceNetworkProvisioningDelegateImpl.h" -#include "WiFiProvisioning.h" +#include "NetworkCommissioningDriver.h" namespace chip { namespace DeviceLayer { @@ -29,7 +29,7 @@ CHIP_ERROR DeviceNetworkProvisioningDelegateImpl::_ProvisionWiFiNetwork(const ch #if CHIP_DEVICE_CONFIG_ENABLE_WIFI CHIP_ERROR err = CHIP_NO_ERROR; ChipLogProgress(NetworkProvisioning, "ESP32NetworkProvisioningDelegate: SSID: %s", ssid); - err = SetWiFiStationProvisioning(ssid, key); + err = NetworkCommissioning::ESPWiFiDriver::GetInstance().ConnectWiFiNetwork(ssid, strlen(ssid), key, strlen(key)); if (err != CHIP_NO_ERROR) { ChipLogError(NetworkProvisioning, "Failed to connect to WiFi network: %s", chip::ErrorStr(err)); diff --git a/src/platform/ESP32/ESP32Config.cpp b/src/platform/ESP32/ESP32Config.cpp index 62fbddfc51ee71..a41a86c0002b15 100644 --- a/src/platform/ESP32/ESP32Config.cpp +++ b/src/platform/ESP32/ESP32Config.cpp @@ -71,7 +71,10 @@ const ESP32Config::Key ESP32Config::kConfigKey_FailSafeArmed = { kConfigNam const ESP32Config::Key ESP32Config::kConfigKey_WiFiStationSecType = { kConfigNamespace_ChipConfig, "sta-sec-type" }; const ESP32Config::Key ESP32Config::kConfigKey_RegulatoryLocation = { kConfigNamespace_ChipConfig, "regulatory-location" }; const ESP32Config::Key ESP32Config::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; +const ESP32Config::Key ESP32Config::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; const ESP32Config::Key ESP32Config::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; +const ESP32Config::Key ESP32Config::kConfigKey_HourFormat = { kConfigNamespace_ChipConfig, "hour-format" }; +const ESP32Config::Key ESP32Config::kConfigKey_CalendarType = { kConfigNamespace_ChipConfig, "calendar-type" }; // Keys stored in the Chip-counters namespace const ESP32Config::Key ESP32Config::kCounterKey_RebootCount = { kConfigNamespace_ChipCounters, "reboot-count" }; diff --git a/src/platform/ESP32/ESP32Config.h b/src/platform/ESP32/ESP32Config.h index cfaa4d35a2fcd7..a16254d661579d 100644 --- a/src/platform/ESP32/ESP32Config.h +++ b/src/platform/ESP32/ESP32Config.h @@ -73,7 +73,12 @@ class ESP32Config static const Key kConfigKey_SetupDiscriminator; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; + static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; + static const Key kConfigKey_HourFormat; + static const Key kConfigKey_CalendarType; + + // CHIP Counter keys static const Key kCounterKey_RebootCount; static const Key kCounterKey_UpTime; static const Key kCounterKey_TotalOperationalHours; diff --git a/src/platform/ESP32/NetworkCommissioningDriver.h b/src/platform/ESP32/NetworkCommissioningDriver.h new file mode 100644 index 00000000000000..c57080f7dbe431 --- /dev/null +++ b/src/platform/ESP32/NetworkCommissioningDriver.h @@ -0,0 +1,136 @@ +/* + * + * 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. + */ + +#pragma once +#include +#include + +namespace chip { +namespace DeviceLayer { +namespace NetworkCommissioning { +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI +namespace { +constexpr uint8_t kMaxWiFiNetworks = 1; +constexpr uint8_t kWiFiScanNetworksTimeOutSeconds = 10; +constexpr uint8_t kWiFiConnectNetworkTimeoutSeconds = 20; +} // namespace + +class ESPScanResponseIterator : public Iterator +{ +public: + ESPScanResponseIterator(const size_t size, const wifi_ap_record_t * scanResults) : mSize(size), mpScanResults(scanResults) {} + size_t Count() override { return mSize; } + bool Next(WiFiScanResponse & item) override + { + if (mIternum >= mSize) + { + return false; + } + + item.security = mpScanResults[mIternum].authmode; + item.ssidLen = + strnlen(reinterpret_cast(mpScanResults[mIternum].ssid), chip::DeviceLayer::Internal::kMaxWiFiSSIDLength); + item.channel = mpScanResults[mIternum].primary; + item.wiFiBand = chip::DeviceLayer::NetworkCommissioning::WiFiBand::k2g4; + item.rssi = mpScanResults[mIternum].rssi; + memcpy(item.ssid, mpScanResults[mIternum].ssid, item.ssidLen); + memcpy(item.bssid, mpScanResults[mIternum].bssid, 6); + + mIternum++; + return true; + } + void Release() override {} + +private: + const size_t mSize; + const wifi_ap_record_t * mpScanResults; + size_t mIternum = 0; +}; + +class ESPWiFiDriver final : public WiFiDriver +{ +public: + class WiFiNetworkIterator final : public NetworkIterator + { + public: + WiFiNetworkIterator(ESPWiFiDriver * aDriver) : mDriver(aDriver) {} + size_t Count() override; + bool Next(Network & item) override; + void Release() override { delete this; } + ~WiFiNetworkIterator() = default; + + private: + ESPWiFiDriver * mDriver; + bool mExhausted = false; + }; + + struct WiFiNetwork + { + char ssid[DeviceLayer::Internal::kMaxWiFiSSIDLength]; + uint8_t ssidLen = 0; + char credentials[DeviceLayer::Internal::kMaxWiFiKeyLength]; + uint8_t credentialsLen = 0; + }; + + // BaseDriver + NetworkIterator * GetNetworks() override { return new WiFiNetworkIterator(this); } + CHIP_ERROR Init() override; + CHIP_ERROR Shutdown() override; + + // WirelessDriver + uint8_t GetMaxNetworks() override { return kMaxWiFiNetworks; } + uint8_t GetScanNetworkTimeoutSeconds() override { return kWiFiScanNetworksTimeOutSeconds; } + uint8_t GetConnectNetworkTimeoutSeconds() override { return kWiFiConnectNetworkTimeoutSeconds; } + + CHIP_ERROR CommitConfiguration() override; + CHIP_ERROR RevertConfiguration() override; + + Status RemoveNetwork(ByteSpan networkId) override; + Status ReorderNetwork(ByteSpan networkId, uint8_t index) override; + void ConnectNetwork(ByteSpan networkId, ConnectCallback * callback) override; + + // WiFiDriver + Status AddOrUpdateNetwork(ByteSpan ssid, ByteSpan credentials) override; + void ScanNetworks(ByteSpan ssid, ScanCallback * callback) override; + + CHIP_ERROR ConnectWiFiNetwork(const char * ssid, uint8_t ssidLen, const char * key, uint8_t keyLen); + void OnConnectWiFiNetwork(); + void OnScanWiFiNetworkDone(); + static ESPWiFiDriver & GetInstance() + { + static ESPWiFiDriver instance; + return instance; + } + +private: + bool NetworkMatch(const WiFiNetwork & network, ByteSpan networkId); + CHIP_ERROR StartScanWiFiNetworks(ByteSpan ssid); + + WiFiNetworkIterator mWiFiIterator = WiFiNetworkIterator(this); + WiFiNetwork mSavedNetwork; + WiFiNetwork mStagingNetwork; + ScanCallback * mpScanCallback; + ConnectCallback * mpConnectCallback; +}; +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD +// TODO: Add Thread Driver for ESP32H2 platform +#endif +} // namespace NetworkCommissioning +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/ESP32/NetworkCommissioningWiFiDriver.cpp b/src/platform/ESP32/NetworkCommissioningWiFiDriver.cpp new file mode 100644 index 00000000000000..9468143aabad64 --- /dev/null +++ b/src/platform/ESP32/NetworkCommissioningWiFiDriver.cpp @@ -0,0 +1,326 @@ +/* + * + * 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. + */ + +#include +#include +#include +#include +#include + +#include "esp_wifi.h" + +#include +#include + +using namespace ::chip; +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI +namespace chip { +namespace DeviceLayer { +namespace NetworkCommissioning { + +namespace { +constexpr char kWiFiSSIDKeyName[] = "wifi-ssid"; +constexpr char kWiFiCredentialsKeyName[] = "wifi-pass"; +static uint8_t WiFiSSIDStr[DeviceLayer::Internal::kMaxWiFiSSIDLength]; +} // namespace + +CHIP_ERROR ESPWiFiDriver::Init() +{ + CHIP_ERROR err; + size_t ssidLen = 0; + size_t credentialsLen = 0; + + err = PersistedStorage::KeyValueStoreMgr().Get(kWiFiCredentialsKeyName, mSavedNetwork.credentials, + sizeof(mSavedNetwork.credentials), &credentialsLen); + if (err == CHIP_ERROR_NOT_FOUND) + { + return CHIP_NO_ERROR; + } + + err = PersistedStorage::KeyValueStoreMgr().Get(kWiFiSSIDKeyName, mSavedNetwork.ssid, sizeof(mSavedNetwork.ssid), &ssidLen); + if (err == CHIP_ERROR_NOT_FOUND) + { + return CHIP_NO_ERROR; + } + mSavedNetwork.credentialsLen = credentialsLen; + mSavedNetwork.ssidLen = ssidLen; + + mStagingNetwork = mSavedNetwork; + mpScanCallback = nullptr; + mpConnectCallback = nullptr; + return err; +} + +CHIP_ERROR ESPWiFiDriver::Shutdown() +{ + return CHIP_NO_ERROR; +} + +CHIP_ERROR ESPWiFiDriver::CommitConfiguration() +{ + ReturnErrorOnFailure(PersistedStorage::KeyValueStoreMgr().Put(kWiFiSSIDKeyName, mStagingNetwork.ssid, mStagingNetwork.ssidLen)); + ReturnErrorOnFailure(PersistedStorage::KeyValueStoreMgr().Put(kWiFiCredentialsKeyName, mStagingNetwork.credentials, + mStagingNetwork.credentialsLen)); + mSavedNetwork = mStagingNetwork; + return CHIP_NO_ERROR; +} + +CHIP_ERROR ESPWiFiDriver::RevertConfiguration() +{ + mStagingNetwork = mSavedNetwork; + return CHIP_NO_ERROR; +} + +bool ESPWiFiDriver::NetworkMatch(const WiFiNetwork & network, ByteSpan networkId) +{ + return networkId.size() == network.ssidLen && memcmp(networkId.data(), network.ssid, network.ssidLen) == 0; +} + +Status ESPWiFiDriver::AddOrUpdateNetwork(ByteSpan ssid, ByteSpan credentials) +{ + VerifyOrReturnError(mStagingNetwork.ssidLen == 0 || NetworkMatch(mStagingNetwork, ssid), Status::kBoundsExceeded); + VerifyOrReturnError(credentials.size() <= sizeof(mStagingNetwork.credentials), Status::kOutOfRange); + VerifyOrReturnError(ssid.size() <= sizeof(mStagingNetwork.ssid), Status::kOutOfRange); + + memcpy(mStagingNetwork.credentials, credentials.data(), credentials.size()); + mStagingNetwork.credentialsLen = static_cast(credentials.size()); + + memcpy(mStagingNetwork.ssid, ssid.data(), ssid.size()); + mStagingNetwork.ssidLen = static_cast(ssid.size()); + + return Status::kSuccess; +} + +Status ESPWiFiDriver::RemoveNetwork(ByteSpan networkId) +{ + VerifyOrReturnError(NetworkMatch(mStagingNetwork, networkId), Status::kNetworkIDNotFound); + + // Use empty ssid for representing invalid network + mStagingNetwork.ssidLen = 0; + return Status::kSuccess; +} + +Status ESPWiFiDriver::ReorderNetwork(ByteSpan networkId, uint8_t index) +{ + // Only one network is supported now + VerifyOrReturnError(index == 0, Status::kOutOfRange); + VerifyOrReturnError(NetworkMatch(mStagingNetwork, networkId), Status::kNetworkIDNotFound); + return Status::kSuccess; +} + +CHIP_ERROR ESPWiFiDriver::ConnectWiFiNetwork(const char * ssid, uint8_t ssidLen, const char * key, uint8_t keyLen) +{ + ReturnErrorOnFailure(ConnectivityMgr().SetWiFiStationMode(ConnectivityManager::kWiFiStationMode_Disabled)); + + wifi_config_t wifiConfig; + + // Set the wifi configuration + memset(&wifiConfig, 0, sizeof(wifiConfig)); + memcpy(wifiConfig.sta.ssid, ssid, std::min(ssidLen, static_cast(sizeof(wifiConfig.sta.ssid)))); + memcpy(wifiConfig.sta.password, key, std::min(keyLen, static_cast(sizeof(wifiConfig.sta.password)))); + wifiConfig.sta.scan_method = WIFI_ALL_CHANNEL_SCAN; + wifiConfig.sta.sort_method = WIFI_CONNECT_AP_BY_SIGNAL; + + // Configure the ESP WiFi interface. + esp_err_t err = esp_wifi_set_config(WIFI_IF_STA, &wifiConfig); + if (err != ESP_OK) + { + ChipLogError(DeviceLayer, "esp_wifi_set_config() failed: %s", esp_err_to_name(err)); + return chip::DeviceLayer::Internal::ESP32Utils::MapError(err); + } + + ReturnErrorOnFailure(ConnectivityMgr().SetWiFiStationMode(ConnectivityManager::kWiFiStationMode_Disabled)); + return ConnectivityMgr().SetWiFiStationMode(ConnectivityManager::kWiFiStationMode_Enabled); +} + +void ESPWiFiDriver::OnConnectWiFiNetwork() +{ + if (mpConnectCallback) + { + mpConnectCallback->OnResult(Status::kSuccess, CharSpan(), 0); + mpConnectCallback = nullptr; + } +} + +void ESPWiFiDriver::ConnectNetwork(ByteSpan networkId, ConnectCallback * callback) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + Status networkingStatus = Status::kSuccess; + + VerifyOrExit(NetworkMatch(mStagingNetwork, networkId), networkingStatus = Status::kNetworkIDNotFound); + VerifyOrExit(mpConnectCallback == nullptr, networkingStatus = Status::kUnknownError); + ChipLogProgress(NetworkProvisioning, "ESP NetworkCommissioningDelegate: SSID: %s", networkId.data()); + + err = ConnectWiFiNetwork(reinterpret_cast(mStagingNetwork.ssid), mStagingNetwork.ssidLen, + reinterpret_cast(mStagingNetwork.credentials), mStagingNetwork.credentialsLen); + mpConnectCallback = callback; +exit: + if (err != CHIP_NO_ERROR) + { + networkingStatus = Status::kUnknownError; + } + if (networkingStatus != Status::kSuccess) + { + ChipLogError(NetworkProvisioning, "Failed to connect to WiFi network:%s", chip::ErrorStr(err)); + mpConnectCallback = nullptr; + callback->OnResult(networkingStatus, CharSpan(), 0); + } +} + +CHIP_ERROR ESPWiFiDriver::StartScanWiFiNetworks(ByteSpan ssid) +{ + esp_err_t err = ESP_OK; + if (ssid.data()) + { + wifi_scan_config_t scan_config = { 0 }; + memset(WiFiSSIDStr, 0, sizeof(WiFiSSIDStr)); + memcpy(WiFiSSIDStr, ssid.data(), ssid.size()); + scan_config.ssid = WiFiSSIDStr; + err = esp_wifi_scan_start(&scan_config, false); + } + else + { + err = esp_wifi_scan_start(NULL, false); + } + if (err != ESP_OK) + { + return chip::DeviceLayer::Internal::ESP32Utils::MapError(err); + } + return CHIP_NO_ERROR; +} + +void ESPWiFiDriver::OnScanWiFiNetworkDone() +{ + uint16_t ap_number; + esp_wifi_scan_get_ap_num(&ap_number); + if (!ap_number) + { + ChipLogProgress(DeviceLayer, "No AP found"); + if (mpScanCallback != nullptr) + { + mpScanCallback->OnFinished(Status::kSuccess, CharSpan(), nullptr); + mpScanCallback = nullptr; + } + return; + } + std::unique_ptr ap_buffer_ptr(new wifi_ap_record_t[ap_number]); + if (ap_buffer_ptr == NULL) + { + ChipLogError(DeviceLayer, "can't malloc memory for ap_list_buffer"); + if (mpScanCallback) + { + mpScanCallback->OnFinished(Status::kUnknownError, CharSpan(), nullptr); + mpScanCallback = nullptr; + } + return; + } + wifi_ap_record_t * ap_list_buffer = ap_buffer_ptr.get(); + if (esp_wifi_scan_get_ap_records(&ap_number, ap_list_buffer) == ESP_OK) + { + if (CHIP_NO_ERROR == DeviceLayer::SystemLayer().ScheduleLambda([ap_number, ap_list_buffer]() { + std::unique_ptr auto_free(ap_list_buffer); + ESPScanResponseIterator iter(ap_number, ap_list_buffer); + if (GetInstance().mpScanCallback) + { + GetInstance().mpScanCallback->OnFinished(Status::kSuccess, CharSpan(), &iter); + GetInstance().mpScanCallback = nullptr; + } + else + { + ChipLogError(DeviceLayer, "can't find the ScanCallback function"); + } + })) + { + ap_buffer_ptr.release(); + } + } + else + { + ChipLogError(DeviceLayer, "can't get ap_records "); + if (mpScanCallback) + { + mpScanCallback->OnFinished(Status::kUnknownError, CharSpan(), nullptr); + mpScanCallback = nullptr; + } + } +} + +void ESPWiFiDriver::ScanNetworks(ByteSpan ssid, WiFiDriver::ScanCallback * callback) +{ + if (callback != nullptr) + { + mpScanCallback = callback; + if (StartScanWiFiNetworks(ssid) != CHIP_NO_ERROR) + { + mpScanCallback = nullptr; + callback->OnFinished(Status::kUnknownError, CharSpan(), nullptr); + } + } +} + +CHIP_ERROR GetConnectedNetwork(Network & network) +{ + wifi_ap_record_t ap_info; + esp_err_t err; + err = esp_wifi_sta_get_ap_info(&ap_info); + if (err != ESP_OK) + { + return chip::DeviceLayer::Internal::ESP32Utils::MapError(err); + } + uint8_t length = strnlen(reinterpret_cast(ap_info.ssid), DeviceLayer::Internal::kMaxWiFiSSIDLength); + if (length > sizeof(network.networkID)) + { + return CHIP_ERROR_INTERNAL; + } + memcpy(network.networkID, ap_info.ssid, length); + network.networkIDLen = length; + return CHIP_NO_ERROR; +} + +size_t ESPWiFiDriver::WiFiNetworkIterator::Count() +{ + return mDriver->mStagingNetwork.ssidLen == 0 ? 0 : 1; +} + +bool ESPWiFiDriver::WiFiNetworkIterator::Next(Network & item) +{ + if (mExhausted || mDriver->mStagingNetwork.ssidLen == 0) + { + return false; + } + memcpy(item.networkID, mDriver->mStagingNetwork.ssid, mDriver->mStagingNetwork.ssidLen); + item.networkIDLen = mDriver->mStagingNetwork.ssidLen; + item.connected = false; + mExhausted = true; + + Network connectedNetwork; + CHIP_ERROR err = GetConnectedNetwork(connectedNetwork); + if (err == CHIP_NO_ERROR) + { + if (connectedNetwork.networkIDLen == item.networkIDLen && + memcmp(connectedNetwork.networkID, item.networkID, item.networkIDLen) == 0) + { + item.connected = true; + } + } + return true; +} + +} // namespace NetworkCommissioning +} // namespace DeviceLayer +} // namespace chip +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI diff --git a/src/platform/ESP32/PlatformManagerImpl.cpp b/src/platform/ESP32/PlatformManagerImpl.cpp index b3836f1d50f7ab..bd47cdfaf8976c 100644 --- a/src/platform/ESP32/PlatformManagerImpl.cpp +++ b/src/platform/ESP32/PlatformManagerImpl.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -123,6 +124,7 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) // to finish the initialization process. ReturnErrorOnFailure(Internal::GenericPlatformManagerImpl_FreeRTOS::_InitChipStack()); + ReturnErrorOnFailure(System::Clock::InitClock_RealTime()); exit: return chip::DeviceLayer::Internal::ESP32Utils::MapError(err); } diff --git a/src/platform/ESP32/SystemTimeSupport.cpp b/src/platform/ESP32/SystemTimeSupport.cpp index d802ea8ed4d389..67d83ac3153fdc 100644 --- a/src/platform/ESP32/SystemTimeSupport.cpp +++ b/src/platform/ESP32/SystemTimeSupport.cpp @@ -25,8 +25,8 @@ /* this file behaves like a config.h, comes first */ #include -#include #include +#include #include @@ -112,6 +112,15 @@ CHIP_ERROR ClockImpl::SetClock_RealTime(Clock::Microseconds64 aNewCurTime) return CHIP_NO_ERROR; } +CHIP_ERROR InitClock_RealTime() +{ + Clock::Microseconds64 curTime = + Clock::Microseconds64((static_cast(CHIP_SYSTEM_CONFIG_VALID_REAL_TIME_THRESHOLD) * UINT64_C(1000000))); + // Use CHIP_SYSTEM_CONFIG_VALID_REAL_TIME_THRESHOLD as the initial value of RealTime. + // Then the RealTime obtained from GetClock_RealTime will be always valid. + return System::SystemClock().SetClock_RealTime(curTime); +} + } // namespace Clock } // namespace System } // namespace chip diff --git a/src/platform/ESP32/WiFiProvisioning.h b/src/platform/ESP32/SystemTimeSupport.h similarity index 70% rename from src/platform/ESP32/WiFiProvisioning.h rename to src/platform/ESP32/SystemTimeSupport.h index 109ec4ae33ea6c..da38a26ced25c2 100644 --- a/src/platform/ESP32/WiFiProvisioning.h +++ b/src/platform/ESP32/SystemTimeSupport.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2022 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. @@ -15,11 +15,14 @@ * limitations under the License. */ -#ifndef _SERVICE_PROVISIONING_H -#define _SERVICE_PROVISIONING_H +#include -#include +namespace chip { +namespace System { +namespace Clock { -CHIP_ERROR SetWiFiStationProvisioning(const char * ssid, const char * key); +CHIP_ERROR InitClock_RealTime(); -#endif // _SERVICE_PROVISIONING_H +} // namespace Clock +} // namespace System +} // namespace chip diff --git a/src/platform/ESP32/WiFiProvisioning.cpp b/src/platform/ESP32/WiFiProvisioning.cpp deleted file mode 100644 index 290c2b35a6be90..00000000000000 --- a/src/platform/ESP32/WiFiProvisioning.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * - * Copyright (c) 2020 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. - */ - -#include -#include -#include -#include - -#include - -#include "esp_wifi.h" - -#include "WiFiProvisioning.h" - -using namespace ::chip::DeviceLayer; - -CHIP_ERROR SetWiFiStationProvisioning(const char * ssid, const char * key) -{ - ConnectivityMgr().SetWiFiStationMode(ConnectivityManager::kWiFiStationMode_Disabled); - - wifi_config_t wifiConfig; - - // Set the wifi configuration - memset(&wifiConfig, 0, sizeof(wifiConfig)); - memcpy(wifiConfig.sta.ssid, ssid, std::min(strlen(ssid) + 1, sizeof(wifiConfig.sta.ssid))); - memcpy(wifiConfig.sta.password, key, std::min(strlen(key) + 1, sizeof(wifiConfig.sta.password))); - wifiConfig.sta.scan_method = WIFI_ALL_CHANNEL_SCAN; - wifiConfig.sta.sort_method = WIFI_CONNECT_AP_BY_SIGNAL; - - // Configure the ESP WiFi interface. - esp_err_t err = esp_wifi_set_config(WIFI_IF_STA, &wifiConfig); - if (err != ESP_OK) - { - ChipLogError(DeviceLayer, "esp_wifi_set_config() failed: %s", esp_err_to_name(err)); - return chip::DeviceLayer::Internal::ESP32Utils::MapError(err); - } - - ConnectivityMgr().SetWiFiStationMode(ConnectivityManager::kWiFiStationMode_Disabled); - ConnectivityMgr().SetWiFiStationMode(ConnectivityManager::kWiFiStationMode_Enabled); - - return CHIP_NO_ERROR; -} diff --git a/src/platform/Linux/ConfigurationManagerImpl.cpp b/src/platform/Linux/ConfigurationManagerImpl.cpp index d536cf672a9dec..6d4282bf0440ca 100644 --- a/src/platform/Linux/ConfigurationManagerImpl.cpp +++ b/src/platform/Linux/ConfigurationManagerImpl.cpp @@ -106,6 +106,12 @@ CHIP_ERROR ConfigurationManagerImpl::Init() SuccessOrExit(err); } + if (!PosixConfig::ConfigValueExists(PosixConfig::kConfigKey_ActiveLocale)) + { + err = WriteConfigValueStr(PosixConfig::kConfigKey_ActiveLocale, "en-US", strlen("en-US")); + SuccessOrExit(err); + } + // If the fail-safe was armed when the device last shutdown, initiate a factory reset. if (GetFailSafeArmed(failSafeArmed) == CHIP_NO_ERROR && failSafeArmed) { diff --git a/src/platform/Linux/PlatformManagerImpl.cpp b/src/platform/Linux/PlatformManagerImpl.cpp index 7ff96b9de8e34e..d9fbaeb9d32c1a 100644 --- a/src/platform/Linux/PlatformManagerImpl.cpp +++ b/src/platform/Linux/PlatformManagerImpl.cpp @@ -339,6 +339,22 @@ PlatformManagerImpl::_GetUserLabelList( return CHIP_NO_ERROR; } +CHIP_ERROR +PlatformManagerImpl::_GetSupportedLocales(AttributeList & supportedLocales) +{ + // In Linux simulation, return following hardcoded list of Strings that are valid values for the ActiveLocale. + supportedLocales.add(CharSpan("en-US", strlen("en-US"))); + supportedLocales.add(CharSpan("de-DE", strlen("de-DE"))); + supportedLocales.add(CharSpan("fr-FR", strlen("fr-FR"))); + supportedLocales.add(CharSpan("en-GB", strlen("en-GB"))); + supportedLocales.add(CharSpan("es-ES", strlen("es-ES"))); + supportedLocales.add(CharSpan("zh-CN", strlen("zh-CN"))); + supportedLocales.add(CharSpan("it-IT", strlen("it-IT"))); + supportedLocales.add(CharSpan("ja-JP", strlen("ja-JP"))); + + return CHIP_NO_ERROR; +} + void PlatformManagerImpl::HandleDeviceRebooted(intptr_t arg) { PlatformManagerDelegate * platformManagerDelegate = PlatformMgr().GetDelegate(); diff --git a/src/platform/Linux/PlatformManagerImpl.h b/src/platform/Linux/PlatformManagerImpl.h index 9655772f8f5b02..57576286950bfb 100644 --- a/src/platform/Linux/PlatformManagerImpl.h +++ b/src/platform/Linux/PlatformManagerImpl.h @@ -72,6 +72,7 @@ class PlatformManagerImpl final : public PlatformManager, public Internal::Gener AttributeList & labelList); CHIP_ERROR _GetUserLabelList(EndpointId endpoint, AttributeList & labelList); + CHIP_ERROR _GetSupportedLocales(AttributeList & supportedLocales); // ===== Members for internal use by the following friends. diff --git a/src/platform/Linux/PosixConfig.cpp b/src/platform/Linux/PosixConfig.cpp index 69242ae05189e8..7187070494043a 100644 --- a/src/platform/Linux/PosixConfig.cpp +++ b/src/platform/Linux/PosixConfig.cpp @@ -70,8 +70,11 @@ const PosixConfig::Key PosixConfig::kConfigKey_FailSafeArmed = { kConfigNam const PosixConfig::Key PosixConfig::kConfigKey_WiFiStationSecType = { kConfigNamespace_ChipConfig, "sta-sec-type" }; const PosixConfig::Key PosixConfig::kConfigKey_RegulatoryLocation = { kConfigNamespace_ChipConfig, "regulatory-location" }; const PosixConfig::Key PosixConfig::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; +const PosixConfig::Key PosixConfig::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; const PosixConfig::Key PosixConfig::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; const PosixConfig::Key PosixConfig::kConfigKey_LocationCapability = { kConfigNamespace_ChipConfig, "location-capability" }; +const PosixConfig::Key PosixConfig::kConfigKey_HourFormat = { kConfigNamespace_ChipConfig, "hour-format" }; +const PosixConfig::Key PosixConfig::kConfigKey_CalendarType = { kConfigNamespace_ChipConfig, "calendar-type" }; // Keys stored in the Chip-counters namespace const PosixConfig::Key PosixConfig::kCounterKey_RebootCount = { kConfigNamespace_ChipCounters, "reboot-count" }; diff --git a/src/platform/Linux/PosixConfig.h b/src/platform/Linux/PosixConfig.h index 97ab64b80a5d12..4b38910fb65ea5 100644 --- a/src/platform/Linux/PosixConfig.h +++ b/src/platform/Linux/PosixConfig.h @@ -74,8 +74,11 @@ class PosixConfig static const Key kConfigKey_SetupDiscriminator; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; + static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; static const Key kConfigKey_LocationCapability; + static const Key kConfigKey_HourFormat; + static const Key kConfigKey_CalendarType; static const Key kCounterKey_RebootCount; static const Key kCounterKey_UpTime; diff --git a/src/platform/Linux/bluez/Helper.cpp b/src/platform/Linux/bluez/Helper.cpp index feae4149eab7d4..30844ce3bc5eab 100644 --- a/src/platform/Linux/bluez/Helper.cpp +++ b/src/platform/Linux/bluez/Helper.cpp @@ -1660,8 +1660,6 @@ static void SubscribeCharacteristicDone(GObject * aObject, GAsyncResult * aResul VerifyOrExit(success == TRUE, ChipLogError(DeviceLayer, "FAIL: BluezSubscribeCharacteristic : %s", error->message)); - // Get notifications on the TX characteristic change (e.g. indication is received) - g_signal_connect(c2, "g-properties-changed", G_CALLBACK(OnCharacteristicChanged), apConnection); BLEManagerImpl::HandleSubscribeOpComplete(static_cast(apConnection), true); exit: @@ -1671,9 +1669,13 @@ static void SubscribeCharacteristicDone(GObject * aObject, GAsyncResult * aResul static gboolean SubscribeCharacteristicImpl(BluezConnection * connection) { + BluezGattCharacteristic1 * c2 = nullptr; VerifyOrExit(connection != nullptr, ChipLogError(DeviceLayer, "BluezConnection is NULL in %s", __func__)); VerifyOrExit(connection->mpC2 != nullptr, ChipLogError(DeviceLayer, "C2 is NULL in %s", __func__)); + c2 = BLUEZ_GATT_CHARACTERISTIC1(connection->mpC2); + // Get notifications on the TX characteristic change (e.g. indication is received) + g_signal_connect(c2, "g-properties-changed", G_CALLBACK(OnCharacteristicChanged), connection); bluez_gatt_characteristic1_call_start_notify(connection->mpC2, nullptr, SubscribeCharacteristicDone, connection); exit: diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp index 950bb04f01574c..134cca16c7bcb2 100644 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp @@ -47,6 +47,7 @@ #include #include +#include #include #include #include @@ -2073,6 +2074,10 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::FromOtDnsRespons // Extract from the .. the part. size_t substringSize = strchr(serviceInfo.mHostNameBuffer, '.') - serviceInfo.mHostNameBuffer; + if (substringSize >= ArraySize(mdnsService.mHostName)) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } strncpy(mdnsService.mHostName, serviceInfo.mHostNameBuffer, substringSize); // Append string terminating character. mdnsService.mHostName[substringSize] = '\0'; @@ -2082,6 +2087,10 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::FromOtDnsRespons // Extract from the ... the part. substringSize = strchr(serviceType, '.') - serviceType; + if (substringSize >= ArraySize(mdnsService.mType)) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } strncpy(mdnsService.mType, serviceType, substringSize); // Append string terminating character. mdnsService.mType[substringSize] = '\0'; @@ -2093,6 +2102,10 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::FromOtDnsRespons return CHIP_ERROR_INVALID_ARGUMENT; substringSize = strchr(protocolSubstringStart, '.') - protocolSubstringStart; + if (substringSize >= ArraySize(protocol)) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } strncpy(protocol, protocolSubstringStart, substringSize); // Append string terminating character. protocol[substringSize] = '\0'; @@ -2211,7 +2224,9 @@ void GenericThreadStackManagerImpl_OpenThread::OnDnsBrowseResult(otEr // Invoke callback for every service one by one instead of for the whole list due to large memory size needed to // allocate on // stack. - strncpy(dnsResult->mMdnsService.mName, serviceName, sizeof(serviceName)); + static_assert(ArraySize(dnsResult->mMdnsService.mName) >= ArraySize(serviceName), + "The target buffer must be big enough"); + Platform::CopyString(dnsResult->mMdnsService.mName, serviceName); DeviceLayer::PlatformMgr().ScheduleWork(DispatchBrowse, reinterpret_cast(dnsResult)); wasAnythingBrowsed = true; } diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.cpp b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.cpp index 957dc20a05ab24..603418cd252ea7 100644 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.cpp +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.cpp @@ -34,8 +34,13 @@ #include #include +#include + #include +#include +#include + namespace chip { namespace DeviceLayer { namespace Internal { @@ -225,6 +230,41 @@ void GenericThreadStackManagerImpl_OpenThread_LwIP::UpdateThreadInter addrAssigned[addrIdx] = true; } } + +// Multicast won't work with LWIP on top of OT +// Duplication of listeners, unecessary timers, buffer duplication, hardfault etc... +#if CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_UDP + // Refresh Multicast listening + if (GenericThreadStackManagerImpl_OpenThread::IsThreadAttachedNoLock()) + { + ChipLogDetail(DeviceLayer, "Thread Attached updating Multicast address"); + + Credentials::GroupDataProvider * provider = Credentials::GetGroupDataProvider(); + TransportMgrBase * transportMgr = &(chip::Server::GetInstance().GetTransportManager()); + Credentials::GroupDataProvider::GroupInfo group; + CHIP_ERROR err = CHIP_NO_ERROR; + for (const FabricInfo & fabricInfo : Server::GetInstance().GetFabricTable()) + { + auto it = provider->IterateGroupInfo(fabricInfo.GetFabricIndex()); + if (it) + { + while (it->Next(group)) + { + err = transportMgr->MulticastGroupJoinLeave( + Transport::PeerAddress::Multicast(fabricInfo.GetFabricIndex(), group.group_id), true); + if (err != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "Failed to Join Multicast Group: %s", err.AsString()); + break; + } + } + it->Release(); + } + } + + err = transportMgr->MulticastGroupJoinLeave(Transport::PeerAddress::Multicast(0, 1234), true); + } +#endif // CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_UDP } ChipLogDetail(DeviceLayer, "LwIP Thread interface addresses %s", isInterfaceUp ? "updated" : "cleared"); diff --git a/src/platform/P6/P6Config.cpp b/src/platform/P6/P6Config.cpp index 71194b6ac4011f..d2ad8c7c4e6416 100644 --- a/src/platform/P6/P6Config.cpp +++ b/src/platform/P6/P6Config.cpp @@ -57,9 +57,6 @@ const P6Config::Key P6Config::kConfigKey_HardwareVersion = { kConfigNamespac const P6Config::Key P6Config::kConfigKey_ManufacturingDate = { kConfigNamespace_ChipFactory, "mfg-date" }; const P6Config::Key P6Config::kConfigKey_SetupPinCode = { kConfigNamespace_ChipFactory, "pin-code" }; const P6Config::Key P6Config::kConfigKey_SetupDiscriminator = { kConfigNamespace_ChipFactory, "discriminator" }; -const P6Config::Key P6Config::kConfigKey_RegulatoryLocation = { kConfigNamespace_ChipConfig, "regulatory-location" }; -const P6Config::Key P6Config::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; -const P6Config::Key P6Config::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; // Keys stored in the chip-config namespace const P6Config::Key P6Config::kConfigKey_FabricId = { kConfigNamespace_ChipConfig, "fabric-id" }; @@ -70,6 +67,12 @@ const P6Config::Key P6Config::kConfigKey_GroupKeyIndex = { kConfigNamespace const P6Config::Key P6Config::kConfigKey_LastUsedEpochKeyId = { kConfigNamespace_ChipConfig, "last-ek-id" }; const P6Config::Key P6Config::kConfigKey_FailSafeArmed = { kConfigNamespace_ChipConfig, "fail-safe-armed" }; const P6Config::Key P6Config::kConfigKey_WiFiStationSecType = { kConfigNamespace_ChipConfig, "sta-sec-type" }; +const P6Config::Key P6Config::kConfigKey_RegulatoryLocation = { kConfigNamespace_ChipConfig, "regulatory-location" }; +const P6Config::Key P6Config::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; +const P6Config::Key P6Config::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; +const P6Config::Key P6Config::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; +const P6Config::Key P6Config::kConfigKey_HourFormat = { kConfigNamespace_ChipConfig, "hour-format" }; +const P6Config::Key P6Config::kConfigKey_CalendarType = { kConfigNamespace_ChipConfig, "calendar-type" }; // Keys stored in the Chip-counters namespace const P6Config::Key P6Config::kCounterKey_RebootCount = { kConfigNamespace_ChipCounters, "reboot-count" }; diff --git a/src/platform/P6/P6Config.h b/src/platform/P6/P6Config.h index 7acfb5e13a5f07..3b9cffcfe96731 100644 --- a/src/platform/P6/P6Config.h +++ b/src/platform/P6/P6Config.h @@ -74,7 +74,12 @@ class P6Config static const Key kConfigKey_SetupDiscriminator; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; + static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; + static const Key kConfigKey_HourFormat; + static const Key kConfigKey_CalendarType; + + // CHIP Counter keys static const Key kCounterKey_RebootCount; static const Key kCounterKey_UpTime; static const Key kCounterKey_TotalOperationalHours; diff --git a/src/platform/Tizen/PosixConfig.cpp b/src/platform/Tizen/PosixConfig.cpp index 61acb6720d83fc..fa8fce00810827 100644 --- a/src/platform/Tizen/PosixConfig.cpp +++ b/src/platform/Tizen/PosixConfig.cpp @@ -67,6 +67,9 @@ const PosixConfig::Key PosixConfig::kConfigKey_WiFiStationSecType = { kConfigNam const PosixConfig::Key PosixConfig::kConfigKey_RegulatoryLocation = { kConfigNamespace_ChipConfig, "regulatory-location" }; const PosixConfig::Key PosixConfig::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; const PosixConfig::Key PosixConfig::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; +const PosixConfig::Key PosixConfig::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; +const PosixConfig::Key PosixConfig::kConfigKey_HourFormat = { kConfigNamespace_ChipConfig, "hour-format" }; +const PosixConfig::Key PosixConfig::kConfigKey_CalendarType = { kConfigNamespace_ChipConfig, "calendar-type" }; // Prefix used for NVS keys that contain Chip group encryption keys. const char PosixConfig::kGroupKeyNamePrefix[] = "gk-"; diff --git a/src/platform/Tizen/PosixConfig.h b/src/platform/Tizen/PosixConfig.h index 6a2c9c5e2f842a..37cdbcb1aea540 100644 --- a/src/platform/Tizen/PosixConfig.h +++ b/src/platform/Tizen/PosixConfig.h @@ -73,6 +73,9 @@ class PosixConfig static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; static const Key kConfigKey_Breadcrumb; + static const Key kConfigKey_ActiveLocale; + static const Key kConfigKey_HourFormat; + static const Key kConfigKey_CalendarType; static const char kGroupKeyNamePrefix[]; diff --git a/src/platform/Zephyr/BLEManagerImpl.cpp b/src/platform/Zephyr/BLEManagerImpl.cpp index 072e1c0d6903a6..f6f392ee1ceca7 100644 --- a/src/platform/Zephyr/BLEManagerImpl.cpp +++ b/src/platform/Zephyr/BLEManagerImpl.cpp @@ -31,6 +31,9 @@ #include #include #include +#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING +#include +#endif #include #include @@ -55,6 +58,11 @@ const bt_uuid_128 UUID128_CHIPoBLEChar_RX = BT_UUID_INIT_128(0x11, 0x9D, 0x9F, 0x42, 0x9C, 0x4F, 0x9F, 0x95, 0x59, 0x45, 0x3D, 0x26, 0xF5, 0x2E, 0xEE, 0x18); const bt_uuid_128 UUID128_CHIPoBLEChar_TX = BT_UUID_INIT_128(0x12, 0x9D, 0x9F, 0x42, 0x9C, 0x4F, 0x9F, 0x95, 0x59, 0x45, 0x3D, 0x26, 0xF5, 0x2E, 0xEE, 0x18); +#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING +const bt_uuid_128 UUID128_CHIPoBLEChar_C3 = + BT_UUID_INIT_128(0x04, 0x8F, 0x21, 0x83, 0x8A, 0x74, 0x7D, 0xB8, 0xF2, 0x45, 0x72, 0x87, 0x38, 0x02, 0x63, 0x64); +#endif + bt_uuid_16 UUID16_CHIPoBLEService = BT_UUID_INIT_16(0xFFF6); const ChipBleUUID chipUUID_CHIPoBLEChar_RX = { { 0x18, 0xEE, 0x2E, 0xF5, 0x26, 0x3D, 0x45, 0x59, 0x95, 0x9F, 0x4F, 0x9C, 0x42, 0x9F, @@ -76,7 +84,14 @@ struct bt_gatt_attr sChipoBleAttributes[] = { BT_GATT_PRIMARY_SERVICE(&UUID16 BT_GATT_CHRC_NOTIFY, BT_GATT_PERM_NONE, nullptr, nullptr, nullptr), - BT_GATT_CCC_MANAGED(&CHIPoBLEChar_TX_CCC, BT_GATT_PERM_READ | BT_GATT_PERM_WRITE)}; + BT_GATT_CCC_MANAGED(&CHIPoBLEChar_TX_CCC, BT_GATT_PERM_READ | BT_GATT_PERM_WRITE), +#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING + BT_GATT_CHARACTERISTIC(&UUID128_CHIPoBLEChar_C3.uuid, + BT_GATT_CHRC_READ, + BT_GATT_PERM_READ, + BLEManagerImpl::HandleC3Read, nullptr, nullptr), +#endif +}; struct bt_gatt_service sChipoBleService = BT_GATT_SERVICE(sChipoBleAttributes); @@ -273,6 +288,10 @@ CHIP_ERROR BLEManagerImpl::StartAdvertising(void) chip::Encoding::LittleEndian::Put16(serviceData.uuid, UUID16_CHIPoBLEService.val); ReturnErrorOnFailure(ConfigurationMgr().GetBLEDeviceIdentificationInfo(serviceData.deviceIdInfo)); +#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING + ReturnErrorOnFailure(PrepareC3CharData()); +#endif + if (!isAdvertisingRerun) { #if CONFIG_BT_PRIVACY @@ -340,6 +359,11 @@ CHIP_ERROR BLEManagerImpl::StopAdvertising(void) ChipLogProgress(DeviceLayer, "CHIPoBLE advertising stopped"); +#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING + // Increment life time counter to protect against long-term tracking of rotating device ID. + ReturnErrorOnFailure(ConfigurationMgr().IncrementLifetimeCounter()); +#endif + // Post a CHIPoBLEAdvertisingChange(Stopped) event. { ChipDeviceEvent advChange; @@ -563,6 +587,37 @@ CHIP_ERROR BLEManagerImpl::HandleTXCharComplete(const ChipDeviceEvent * event) return CHIP_NO_ERROR; } +#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING +CHIP_ERROR BLEManagerImpl::PrepareC3CharData() +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + char serialNumber[ConfigurationManager::kMaxSerialNumberLength + 1] = {}; + uint16_t lifetimeCounter = 0; + BitFlags additionalDataFields; + +#if CHIP_ENABLE_ROTATING_DEVICE_ID + err = ConfigurationMgr().GetSerialNumber(serialNumber, sizeof(serialNumber)); + SuccessOrExit(err); + err = ConfigurationMgr().GetLifetimeCounter(lifetimeCounter); + SuccessOrExit(err); + + additionalDataFields.Set(AdditionalDataFields::RotatingDeviceId); +#endif + + err = AdditionalDataPayloadGenerator().generateAdditionalDataPayload(lifetimeCounter, serialNumber, strlen(serialNumber), + c3CharDataBufferHandle, additionalDataFields); + +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "Failed to generate TLV encoded Additional Data (%s)", __func__); + } + + return err; +} +#endif + void BLEManagerImpl::HandleBLEAdvertisementTimeout(System::Layer * layer, void * param) { BLEMgr().SetAdvertisingEnabled(false); @@ -855,6 +910,23 @@ void BLEManagerImpl::HandleDisconnect(struct bt_conn * conId, uint8_t reason) exit: PlatformMgr().UnlockChipStack(); } + +#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING +ssize_t BLEManagerImpl::HandleC3Read(struct bt_conn * conId, const struct bt_gatt_attr * attr, void * buf, uint16_t len, + uint16_t offset) +{ + ChipLogDetail(DeviceLayer, "Read request received for CHIPoBLE C3 (ConnId 0x%02" PRIx16 ")", bt_conn_index(conId)); + + if (sInstance.c3CharDataBufferHandle.IsNull()) + { + return 0; + } + + return bt_gatt_attr_read(conId, attr, buf, len, offset, sInstance.c3CharDataBufferHandle->Start(), + sInstance.c3CharDataBufferHandle->DataLength()); +} +#endif + } // namespace Internal } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/Zephyr/BLEManagerImpl.h b/src/platform/Zephyr/BLEManagerImpl.h index f564b305f8a8aa..5c2146f8580706 100644 --- a/src/platform/Zephyr/BLEManagerImpl.h +++ b/src/platform/Zephyr/BLEManagerImpl.h @@ -103,6 +103,9 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla bool mSubscribedConns[CONFIG_BT_MAX_CONN]; bt_gatt_notify_params mNotifyParams[CONFIG_BT_MAX_CONN]; bt_conn_cb mConnCallbacks; +#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING + PacketBufferHandle c3CharDataBufferHandle; +#endif void DriveBLEState(void); CHIP_ERROR ConfigureAdvertising(void); @@ -113,6 +116,9 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla CHIP_ERROR HandleRXCharWrite(const ChipDeviceEvent * event); CHIP_ERROR HandleTXCharCCCDWrite(const ChipDeviceEvent * event); CHIP_ERROR HandleTXCharComplete(const ChipDeviceEvent * event); +#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING + CHIP_ERROR PrepareC3CharData(); +#endif bool IsSubscribed(bt_conn * conn); bool SetSubscribed(bt_conn * conn); bool UnsetSubscribed(bt_conn * conn); @@ -139,6 +145,10 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla static ssize_t HandleRXWrite(bt_conn * conn, const bt_gatt_attr * attr, const void * buf, uint16_t len, uint16_t offset, uint8_t flags); static ssize_t HandleTXCCCWrite(bt_conn * conn, const bt_gatt_attr * attr, uint16_t value); + +#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING + static ssize_t HandleC3Read(struct bt_conn * conn, const struct bt_gatt_attr * attr, void * buf, uint16_t len, uint16_t offset); +#endif }; /** diff --git a/src/platform/Zephyr/ZephyrConfig.cpp b/src/platform/Zephyr/ZephyrConfig.cpp index 395d6374921740..c151ccb23ac32a 100644 --- a/src/platform/Zephyr/ZephyrConfig.cpp +++ b/src/platform/Zephyr/ZephyrConfig.cpp @@ -70,7 +70,10 @@ const ZephyrConfig::Key ZephyrConfig::kConfigKey_LastUsedEpochKeyId = CONFIG_KEY const ZephyrConfig::Key ZephyrConfig::kConfigKey_FailSafeArmed = CONFIG_KEY(NAMESPACE_CONFIG "fail-safe-armed"); const ZephyrConfig::Key ZephyrConfig::kConfigKey_RegulatoryLocation = CONFIG_KEY(NAMESPACE_CONFIG "regulatory-location"); const ZephyrConfig::Key ZephyrConfig::kConfigKey_CountryCode = CONFIG_KEY(NAMESPACE_CONFIG "country-code"); +const ZephyrConfig::Key ZephyrConfig::kConfigKey_ActiveLocale = CONFIG_KEY(NAMESPACE_CONFIG "active-locale"); const ZephyrConfig::Key ZephyrConfig::kConfigKey_Breadcrumb = CONFIG_KEY(NAMESPACE_CONFIG "breadcrumb"); +const ZephyrConfig::Key ZephyrConfig::kConfigKey_HourFormat = CONFIG_KEY(NAMESPACE_CONFIG "hour-format"); +const ZephyrConfig::Key ZephyrConfig::kConfigKey_CalendarType = CONFIG_KEY(NAMESPACE_CONFIG "calendar-type"); // Keys stored in the counters namespace const ZephyrConfig::Key ZephyrConfig::kCounterKey_RebootCount = CONFIG_KEY(NAMESPACE_COUNTERS "reboot-count"); @@ -85,7 +88,8 @@ constexpr const char * sAllResettableConfigKeys[] = { ZephyrConfig::kConfigKey_FabricSecret, ZephyrConfig::kConfigKey_GroupKeyIndex, ZephyrConfig::kConfigKey_LastUsedEpochKeyId, ZephyrConfig::kConfigKey_FailSafeArmed, ZephyrConfig::kConfigKey_RegulatoryLocation, ZephyrConfig::kConfigKey_CountryCode, - ZephyrConfig::kConfigKey_Breadcrumb + ZephyrConfig::kConfigKey_ActiveLocale, ZephyrConfig::kConfigKey_Breadcrumb, + ZephyrConfig::kConfigKey_HourFormat, ZephyrConfig::kConfigKey_CalendarType, }; // Data structure to be passed as a parameter of Zephyr's settings_load_subtree_direct() function diff --git a/src/platform/Zephyr/ZephyrConfig.h b/src/platform/Zephyr/ZephyrConfig.h index f6a1b23ed921bd..7afffaccbf95ad 100644 --- a/src/platform/Zephyr/ZephyrConfig.h +++ b/src/platform/Zephyr/ZephyrConfig.h @@ -62,7 +62,11 @@ class ZephyrConfig static const Key kConfigKey_FailSafeArmed; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; + static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; + static const Key kConfigKey_HourFormat; + static const Key kConfigKey_CalendarType; + static const Key kCounterKey_RebootCount; static const Key kCounterKey_BootReason; static const Key kCounterKey_TotalOperationalHours; diff --git a/src/platform/android/AndroidConfig.cpp b/src/platform/android/AndroidConfig.cpp index d02fe792653ef7..1488c56f2715ae 100644 --- a/src/platform/android/AndroidConfig.cpp +++ b/src/platform/android/AndroidConfig.cpp @@ -91,7 +91,10 @@ const AndroidConfig::Key AndroidConfig::kConfigKey_FailSafeArmed = { kConfi const AndroidConfig::Key AndroidConfig::kConfigKey_WiFiStationSecType = { kConfigNamespace_ChipConfig, "sta-sec-type" }; const AndroidConfig::Key AndroidConfig::kConfigKey_RegulatoryLocation = { kConfigNamespace_ChipConfig, "regulatory-location" }; const AndroidConfig::Key AndroidConfig::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; +const AndroidConfig::Key AndroidConfig::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; const AndroidConfig::Key AndroidConfig::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; +const AndroidConfig::Key AndroidConfig::kConfigKey_HourFormat = { kConfigNamespace_ChipConfig, "hour-format" }; +const AndroidConfig::Key AndroidConfig::kConfigKey_CalendarType = { kConfigNamespace_ChipConfig, "calendar-type" }; // Prefix used for NVS keys that contain Chip group encryption keys. const char AndroidConfig::kGroupKeyNamePrefix[] = "gk-"; diff --git a/src/platform/android/AndroidConfig.h b/src/platform/android/AndroidConfig.h index 66f61930eb89ee..a9db855ef49979 100644 --- a/src/platform/android/AndroidConfig.h +++ b/src/platform/android/AndroidConfig.h @@ -74,7 +74,10 @@ class AndroidConfig static const Key kConfigKey_SetupDiscriminator; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; + static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; + static const Key kConfigKey_HourFormat; + static const Key kConfigKey_CalendarType; static const Key kConfigKey_ProductId; static const Key kConfigKey_ProductName; static const Key kConfigKey_SoftwareVersion; diff --git a/src/platform/android/java/chip/platform/ConfigurationManager.java b/src/platform/android/java/chip/platform/ConfigurationManager.java index 4751974356cbae..cd79a0c8fd3bd0 100644 --- a/src/platform/android/java/chip/platform/ConfigurationManager.java +++ b/src/platform/android/java/chip/platform/ConfigurationManager.java @@ -59,7 +59,10 @@ public interface ConfigurationManager { String kConfigKey_WiFiStationSecType = "sta-sec-type"; String kConfigKey_RegulatoryLocation = "regulatory-location"; String kConfigKey_CountryCode = "country-code"; + String kConfigKey_ActiveLocale = "active-locale"; String kConfigKey_Breadcrumb = "breadcrumb"; + String kConfigKey_HourFormat = "hour-format"; + String kConfigKey_CalendarType = "calendar-type"; // Prefix used for NVS keys that contain Chip group encryption keys. String kGroupKeyNamePrefix = "gk-"; diff --git a/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp b/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp index 68c219597b2c46..b379581b9252a8 100644 --- a/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp +++ b/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp @@ -43,56 +43,62 @@ namespace Internal { /* itemID and subID are limited to 10 bits, even though their types are uint16_t */ // Keys stored in the Chip-factory namespace -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_SerialNum = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_SerialNum = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, .itemID = 0x0001 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_MfrDeviceId = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_MfrDeviceId = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, .itemID = 0x0002 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_MfrDeviceCert = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_MfrDeviceCert = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, .itemID = 0x0003 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_MfrDeviceICACerts = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_MfrDeviceICACerts = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, .itemID = 0x0004 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_MfrDevicePrivateKey = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_MfrDevicePrivateKey = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, .itemID = 0x0005 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_HardwareVersion = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_HardwareVersion = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, .itemID = 0x0006 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_ManufacturingDate = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_ManufacturingDate = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, .itemID = 0x0007 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_SetupPinCode = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_SetupPinCode = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, .itemID = 0x0008 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_SetupDiscriminator = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_SetupDiscriminator = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, .itemID = 0x0009 } }; // Keys stored in the Chip-config namespace -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_FabricId = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_FabricId = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, .itemID = 0x0011 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_ServiceConfig = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_ServiceConfig = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, .itemID = 0x0012 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_PairedAccountId = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_PairedAccountId = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, .itemID = 0x0013 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_ServiceId = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_ServiceId = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, .itemID = 0x0014 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_FabricSecret = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_FabricSecret = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, .itemID = 0x0015 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_GroupKeyIndex = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_GroupKeyIndex = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, .itemID = 0x0016 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_LastUsedEpochKeyId = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_LastUsedEpochKeyId = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, .itemID = 0x0017 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_FailSafeArmed = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_FailSafeArmed = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, .itemID = 0x0018 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_WiFiStationSecType = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_WiFiStationSecType = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, .itemID = 0x0019 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_RegulatoryLocation = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_RegulatoryLocation = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, .itemID = 0x001a } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_CountryCode = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_CountryCode = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, .itemID = 0x001b } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_Breadcrumb = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_Breadcrumb = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, .itemID = 0x001c } }; +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_ActiveLocale = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, + .itemID = 0x001d } }; +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_HourFormat = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, + .itemID = 0x001e } }; +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_CalendarType = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, + .itemID = 0x001f } }; /* Internal for the KVS interface. */ const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_KVS_key = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, - .itemID = 0x001d } }; + .itemID = 0x0020 } }; const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_KVS_value = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, - .itemID = 0x001e } }; + .itemID = 0x0021 } }; /* Static local variables */ static NVINTF_nvFuncts_t sNvoctpFps = { 0 }; diff --git a/src/platform/cc13x2_26x2/CC13X2_26X2Config.h b/src/platform/cc13x2_26x2/CC13X2_26X2Config.h index 6e3a0f6ca64803..854a7692eaf212 100644 --- a/src/platform/cc13x2_26x2/CC13X2_26X2Config.h +++ b/src/platform/cc13x2_26x2/CC13X2_26X2Config.h @@ -65,7 +65,10 @@ class CC13X2_26X2Config static const Key kConfigKey_WiFiStationSecType; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; + static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; + static const Key kConfigKey_HourFormat; + static const Key kConfigKey_CalendarType; static const Key kConfigKey_KVS_key; // special key for KVS system, key storage static const Key kConfigKey_KVS_value; // special key for KVS system, value storage diff --git a/src/platform/fake/ConfigurationManagerImpl.h b/src/platform/fake/ConfigurationManagerImpl.h index a6121a720c9b71..fd9b571ee7bb9e 100644 --- a/src/platform/fake/ConfigurationManagerImpl.h +++ b/src/platform/fake/ConfigurationManagerImpl.h @@ -61,6 +61,7 @@ class ConfigurationManagerImpl : public ConfigurationManager CHIP_ERROR GetSetupDiscriminator(uint16_t & setupDiscriminator) override { return CHIP_ERROR_NOT_IMPLEMENTED; } CHIP_ERROR StoreSetupDiscriminator(uint16_t setupDiscriminator) override { return CHIP_ERROR_NOT_IMPLEMENTED; } CHIP_ERROR GetLifetimeCounter(uint16_t & lifetimeCounter) override { return CHIP_ERROR_NOT_IMPLEMENTED; } + CHIP_ERROR IncrementLifetimeCounter() override { return CHIP_ERROR_NOT_IMPLEMENTED; } CHIP_ERROR GetFailSafeArmed(bool & val) override { return CHIP_ERROR_NOT_IMPLEMENTED; } CHIP_ERROR SetFailSafeArmed(bool val) override { return CHIP_ERROR_NOT_IMPLEMENTED; } CHIP_ERROR GetBLEDeviceIdentificationInfo(Ble::ChipBLEDeviceIdentificationInfo & deviceIdInfo) override @@ -78,7 +79,9 @@ class ConfigurationManagerImpl : public ConfigurationManager CHIP_ERROR GetRegulatoryLocation(uint8_t & location) override { return CHIP_ERROR_NOT_IMPLEMENTED; } CHIP_ERROR StoreRegulatoryLocation(uint8_t location) override { return CHIP_ERROR_NOT_IMPLEMENTED; } CHIP_ERROR GetCountryCode(char * buf, size_t bufSize, size_t & codeLen) override { return CHIP_ERROR_NOT_IMPLEMENTED; } + CHIP_ERROR GetActiveLocale(char * buf, size_t bufSize, size_t & codeLen) override { return CHIP_ERROR_NOT_IMPLEMENTED; } CHIP_ERROR StoreCountryCode(const char * code, size_t codeLen) override { return CHIP_ERROR_NOT_IMPLEMENTED; } + CHIP_ERROR StoreActiveLocale(const char * code, size_t codeLen) override { return CHIP_ERROR_NOT_IMPLEMENTED; } CHIP_ERROR GetBreadcrumb(uint64_t & breadcrumb) override { return CHIP_ERROR_NOT_IMPLEMENTED; } CHIP_ERROR StoreBreadcrumb(uint64_t breadcrumb) override { return CHIP_ERROR_NOT_IMPLEMENTED; } CHIP_ERROR GetRebootCount(uint32_t & rebootCount) override { return CHIP_ERROR_NOT_IMPLEMENTED; } @@ -95,6 +98,10 @@ class ConfigurationManagerImpl : public ConfigurationManager CHIP_ERROR GetLocalConfigDisabled(bool & disabled) override { return CHIP_ERROR_NOT_IMPLEMENTED; } CHIP_ERROR GetReachable(bool & reachable) override { return CHIP_ERROR_NOT_IMPLEMENTED; } CHIP_ERROR GetUniqueId(char * buf, size_t bufSize) override { return CHIP_ERROR_NOT_IMPLEMENTED; } + CHIP_ERROR GetHourFormat(uint8_t & format) override { return CHIP_ERROR_NOT_IMPLEMENTED; }; + CHIP_ERROR StoreHourFormat(uint8_t format) override { return CHIP_ERROR_NOT_IMPLEMENTED; }; + CHIP_ERROR GetCalendarType(uint8_t & type) override { return CHIP_ERROR_NOT_IMPLEMENTED; }; + CHIP_ERROR StoreCalendarType(uint8_t type) override { return CHIP_ERROR_NOT_IMPLEMENTED; }; #if !defined(NDEBUG) CHIP_ERROR RunUnitTests(void) override { return CHIP_ERROR_NOT_IMPLEMENTED; } #endif diff --git a/src/platform/fake/PlatformManagerImpl.h b/src/platform/fake/PlatformManagerImpl.h index ab92669c4f3c73..b2a13ca32aa859 100644 --- a/src/platform/fake/PlatformManagerImpl.h +++ b/src/platform/fake/PlatformManagerImpl.h @@ -116,6 +116,11 @@ class PlatformManagerImpl final : public PlatformManager return CHIP_ERROR_NOT_IMPLEMENTED; } + CHIP_ERROR _GetSupportedLocales(AttributeList & supportedLocales) + { + return CHIP_ERROR_NOT_IMPLEMENTED; + } + void _LockChipStack() {} bool _TryLockChipStack() { return true; } void _UnlockChipStack() {} diff --git a/src/platform/mbed/MbedConfig.cpp b/src/platform/mbed/MbedConfig.cpp index ac5e8f43168b62..aab9e6916ca9ed 100644 --- a/src/platform/mbed/MbedConfig.cpp +++ b/src/platform/mbed/MbedConfig.cpp @@ -80,7 +80,10 @@ const MbedConfig::Key MbedConfig::kConfigKey_FailSafeArmed = { CONFIG_KEY(" const MbedConfig::Key MbedConfig::kConfigKey_WiFiStationSecType = { CONFIG_KEY("sta-sec-type") }; const MbedConfig::Key MbedConfig::kConfigKey_RegulatoryLocation = { CONFIG_KEY("regulatory-location") }; const MbedConfig::Key MbedConfig::kConfigKey_CountryCode = { CONFIG_KEY("country-code") }; +const MbedConfig::Key MbedConfig::kConfigKey_ActiveLocale = { CONFIG_KEY("active-locale") }; const MbedConfig::Key MbedConfig::kConfigKey_Breadcrumb = { CONFIG_KEY("breadcrumb") }; +const MbedConfig::Key MbedConfig::kConfigKey_HourFormat = { CONFIG_KEY("hour-format") }; +const MbedConfig::Key MbedConfig::kConfigKey_CalendarType = { CONFIG_KEY("calendar-type") }; CHIP_ERROR MbedConfig::ReadConfigValue(Key key, bool & val) { diff --git a/src/platform/mbed/MbedConfig.h b/src/platform/mbed/MbedConfig.h index aeb57463930cbf..09ce576d1760d0 100644 --- a/src/platform/mbed/MbedConfig.h +++ b/src/platform/mbed/MbedConfig.h @@ -71,7 +71,10 @@ class MbedConfig static const Key kConfigKey_SetupDiscriminator; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; + static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; + static const Key kConfigKey_HourFormat; + static const Key kConfigKey_CalendarType; // Config value accessors. static CHIP_ERROR ReadConfigValue(Key key, bool & val); diff --git a/src/platform/nrfconnect/BUILD.gn b/src/platform/nrfconnect/BUILD.gn index 0bf154e0ded158..30893e96fb4cf6 100644 --- a/src/platform/nrfconnect/BUILD.gn +++ b/src/platform/nrfconnect/BUILD.gn @@ -47,7 +47,7 @@ static_library("nrfconnect") { "SystemPlatformConfig.h", ] - deps = [] + deps = [ "${chip_root}/src/setup_payload:additional_data_payload" ] public_deps = [ "${chip_root}/src/platform:platform_base" ] diff --git a/src/platform/nxp/k32w/k32w0/K32W0Config.h b/src/platform/nxp/k32w/k32w0/K32W0Config.h index 7f1aeb4534902a..da73746d4d463c 100644 --- a/src/platform/nxp/k32w/k32w0/K32W0Config.h +++ b/src/platform/nxp/k32w/k32w0/K32W0Config.h @@ -66,7 +66,7 @@ class K32WConfig using Key = uint32_t; // Key definitions for well-known configuration values. - // Factory config keys + // Factory Config Keys static constexpr Key kConfigKey_SerialNum = K32WConfigKey(kPDMId_ChipFactory, 0x00); static constexpr Key kConfigKey_MfrDeviceId = K32WConfigKey(kPDMId_ChipFactory, 0x01); static constexpr Key kConfigKey_MfrDeviceCert = K32WConfigKey(kPDMId_ChipFactory, 0x02); @@ -76,6 +76,7 @@ class K32WConfig static constexpr Key kConfigKey_MfrDeviceICACerts = K32WConfigKey(kPDMId_ChipFactory, 0x06); static constexpr Key kConfigKey_HardwareVersion = K32WConfigKey(kPDMId_ChipFactory, 0x07); static constexpr Key kConfigKey_SetupDiscriminator = K32WConfigKey(kPDMId_ChipFactory, 0x08); + // CHIP Config Keys static constexpr Key kConfigKey_FabricId = K32WConfigKey(kPDMId_ChipConfig, 0x00); static constexpr Key kConfigKey_ServiceConfig = K32WConfigKey(kPDMId_ChipConfig, 0x01); @@ -87,12 +88,15 @@ class K32WConfig static constexpr Key kConfigKey_RegulatoryLocation = K32WConfigKey(kPDMId_ChipConfig, 0x07); static constexpr Key kConfigKey_CountryCode = K32WConfigKey(kPDMId_ChipConfig, 0x08); static constexpr Key kConfigKey_Breadcrumb = K32WConfigKey(kPDMId_ChipConfig, 0x09); + static constexpr Key kConfigKey_ActiveLocale = K32WConfigKey(kPDMId_ChipConfig, 0x0A); + static constexpr Key kConfigKey_HourFormat = K32WConfigKey(kPDMId_ChipConfig, 0x0B); + static constexpr Key kConfigKey_CalendarType = K32WConfigKey(kPDMId_ChipConfig, 0x0C); // CHIP Counter Keys - static constexpr Key kCounterKey_RebootCount = K32WConfigKey(kPDMId_ChipConfig, 0x0A); - static constexpr Key kCounterKey_UpTime = K32WConfigKey(kPDMId_ChipConfig, 0x0B); - static constexpr Key kCounterKey_TotalOperationalHours = K32WConfigKey(kPDMId_ChipConfig, 0x0C); - static constexpr Key kCounterKey_BootReason = K32WConfigKey(kPDMId_ChipConfig, 0x0D); + static constexpr Key kCounterKey_RebootCount = K32WConfigKey(kPDMId_ChipCounter, 0x00); + static constexpr Key kCounterKey_UpTime = K32WConfigKey(kPDMId_ChipCounter, 0x01); + static constexpr Key kCounterKey_TotalOperationalHours = K32WConfigKey(kPDMId_ChipCounter, 0x02); + static constexpr Key kCounterKey_BootReason = K32WConfigKey(kPDMId_ChipCounter, 0x03); // Set key id limits for each group. static constexpr Key kMinConfigKey_ChipFactory = K32WConfigKey(kPDMId_ChipFactory, 0x00); diff --git a/src/platform/qpg/qpgConfig.h b/src/platform/qpg/qpgConfig.h index 731b157e8e963f..9c5130537de218 100644 --- a/src/platform/qpg/qpgConfig.h +++ b/src/platform/qpg/qpgConfig.h @@ -85,9 +85,12 @@ class QPGConfig static constexpr Key kConfigKey_RegulatoryLocation = QorvoConfigKey(kFileId_ChipConfig, 0x09); static constexpr Key kConfigKey_CountryCode = QorvoConfigKey(kFileId_ChipConfig, 0x0A); static constexpr Key kConfigKey_Breadcrumb = QorvoConfigKey(kFileId_ChipConfig, 0x0B); + static constexpr Key kConfigKey_ActiveLocale = QorvoConfigKey(kFileId_ChipConfig, 0x0C); + static constexpr Key kConfigKey_HourFormat = QorvoConfigKey(kFileId_ChipConfig, 0x0D); + static constexpr Key kConfigKey_CalendarType = QorvoConfigKey(kFileId_ChipConfig, 0x0E); - static constexpr Key kConfigKey_GroupKeyBase = QorvoConfigKey(kFileId_ChipConfig, 0x0C); - static constexpr Key kConfigKey_GroupKeyMax = QorvoConfigKey(kFileId_ChipConfig, 0x1B); // Allows 16 Group Keys to be created. + static constexpr Key kConfigKey_GroupKeyBase = QorvoConfigKey(kFileId_ChipConfig, 0x0F); + static constexpr Key kConfigKey_GroupKeyMax = QorvoConfigKey(kFileId_ChipConfig, 0x1E); // Allows 16 Group Keys to be created. static constexpr Key kConfigKey_CounterKeyBase = QorvoConfigKey(kFileId_ChipCounter, 0x00); static constexpr Key kConfigKey_CounterKeyMax = diff --git a/src/platform/telink/BUILD.gn b/src/platform/telink/BUILD.gn index b4c5c22962ac3e..f439b27323b416 100644 --- a/src/platform/telink/BUILD.gn +++ b/src/platform/telink/BUILD.gn @@ -62,5 +62,8 @@ static_library("telink") { } } - public_deps += [ "${chip_root}/src/crypto" ] + public_deps += [ + "${chip_root}/src/crypto", + "${chip_root}/src/setup_payload:additional_data_payload", + ] } diff --git a/src/platform/tests/TestConfigurationMgr.cpp b/src/platform/tests/TestConfigurationMgr.cpp index 9e05f33b16d589..450e7a15f8bbcc 100644 --- a/src/platform/tests/TestConfigurationMgr.cpp +++ b/src/platform/tests/TestConfigurationMgr.cpp @@ -227,6 +227,52 @@ static void TestConfigurationMgr_GetPrimaryMACAddress(nlTestSuite * inSuite, voi } } +static void TestConfigurationMgr_ActiveLocale(nlTestSuite * inSuite, void * inContext) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + char buf[8]; + size_t activeLocaleLen = 0; + const char * activeLocale = "en-US"; + + err = ConfigurationMgr().StoreActiveLocale(activeLocale, strlen(activeLocale)); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + err = ConfigurationMgr().GetActiveLocale(buf, 8, activeLocaleLen); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + NL_TEST_ASSERT(inSuite, activeLocaleLen == strlen(activeLocale)); + NL_TEST_ASSERT(inSuite, strcmp(buf, activeLocale) == 0); +} + +static void TestConfigurationMgr_HourFormat(nlTestSuite * inSuite, void * inContext) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + uint8_t format = 0; + + err = ConfigurationMgr().StoreHourFormat(3); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + err = ConfigurationMgr().GetHourFormat(format); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + NL_TEST_ASSERT(inSuite, format == 3); +} + +static void TestConfigurationMgr_CalendarType(nlTestSuite * inSuite, void * inContext) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + uint8_t type = 0; + + err = ConfigurationMgr().StoreCalendarType(3); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + err = ConfigurationMgr().GetCalendarType(type); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + NL_TEST_ASSERT(inSuite, type == 3); +} + /** * Test Suite. It lists all the test functions. */ @@ -244,6 +290,9 @@ static const nlTest sTests[] = { NL_TEST_DEF("Test ConfigurationMgr::CountryCode", TestConfigurationMgr_CountryCode), NL_TEST_DEF("Test ConfigurationMgr::Breadcrumb", TestConfigurationMgr_Breadcrumb), NL_TEST_DEF("Test ConfigurationMgr::GetPrimaryMACAddress", TestConfigurationMgr_GetPrimaryMACAddress), + NL_TEST_DEF("Test ConfigurationMgr::ActiveLocale", TestConfigurationMgr_ActiveLocale), + NL_TEST_DEF("Test ConfigurationMgr::HourFormat", TestConfigurationMgr_HourFormat), + NL_TEST_DEF("Test ConfigurationMgr::CalendarType", TestConfigurationMgr_CalendarType), NL_TEST_SENTINEL() }; diff --git a/src/protocols/interaction_model/Constants.h b/src/protocols/interaction_model/Constants.h index b662b47324a876..5be5cb36a7df7f 100644 --- a/src/protocols/interaction_model/Constants.h +++ b/src/protocols/interaction_model/Constants.h @@ -66,7 +66,7 @@ enum class MsgType : uint8_t }; // This table comes from the IM's "Status Code Table" section from the Interaction Model spec. -enum class Status : uint16_t +enum class Status : uint8_t { Success = 0x0, Failure = 0x01, diff --git a/src/protocols/secure_channel/CASESession.cpp b/src/protocols/secure_channel/CASESession.cpp index a069263f371b50..23fc70aed7d565 100644 --- a/src/protocols/secure_channel/CASESession.cpp +++ b/src/protocols/secure_channel/CASESession.cpp @@ -1298,15 +1298,14 @@ CHIP_ERROR CASESession::RetrieveIPK(FabricId fabricId, MutableByteSpan & ipk) return CHIP_NO_ERROR; } -// TODO: Remove this and replace with system method to retrieve current time -CHIP_ERROR CASESession::SetEffectiveTime(void) +CHIP_ERROR CASESession::GetHardcodedTime() { using namespace ASN1; ASN1UniversalTime effectiveTime; - effectiveTime.Year = 2021; - effectiveTime.Month = 2; - effectiveTime.Day = 12; + effectiveTime.Year = 2022; + effectiveTime.Month = 1; + effectiveTime.Day = 1; effectiveTime.Hour = 10; effectiveTime.Minute = 10; effectiveTime.Second = 10; @@ -1314,6 +1313,26 @@ CHIP_ERROR CASESession::SetEffectiveTime(void) return ASN1ToChipEpochTime(effectiveTime, mValidContext.mEffectiveTime); } +CHIP_ERROR CASESession::SetEffectiveTime() +{ + System::Clock::Milliseconds64 currentTimeMS; + CHIP_ERROR err = System::SystemClock().GetClock_RealTimeMS(currentTimeMS); + if (err == CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE) + { + ChipLogError( + SecureChannel, + "The device does not support GetClock_RealTimeMS() API. This will eventually result in CASE session setup failures."); + // TODO: Remove use of hardcoded time during CASE setup + return GetHardcodedTime(); + } + ReturnErrorOnFailure(err); + + System::Clock::Seconds32 currentTime = std::chrono::duration_cast(currentTimeMS); + VerifyOrReturnError(UnixEpochToChipEpochTime(currentTime.count(), mValidContext.mEffectiveTime), CHIP_ERROR_INVALID_TIME); + + return CHIP_NO_ERROR; +} + void CASESession::OnSuccessStatusReport() { ChipLogProgress(SecureChannel, "Success status report received. Session was established"); diff --git a/src/protocols/secure_channel/CASESession.h b/src/protocols/secure_channel/CASESession.h index a780c298a6dd9a..ef1309790b5b48 100644 --- a/src/protocols/secure_channel/CASESession.h +++ b/src/protocols/secure_channel/CASESession.h @@ -226,8 +226,9 @@ class DLL_EXPORT CASESession : public Messaging::ExchangeDelegate, public Pairin */ void DiscardExchange(); - // TODO: Remove this and replace with system method to retrieve current time - CHIP_ERROR SetEffectiveTime(void); + CHIP_ERROR GetHardcodedTime(); + + CHIP_ERROR SetEffectiveTime(); CHIP_ERROR ValidateReceivedMessage(Messaging::ExchangeContext * ec, const PayloadHeader & payloadHeader, System::PacketBufferHandle & msg); diff --git a/src/setup_payload/BUILD.gn b/src/setup_payload/BUILD.gn index 2e6dcd2141a48c..0fb90417d81428 100644 --- a/src/setup_payload/BUILD.gn +++ b/src/setup_payload/BUILD.gn @@ -14,15 +14,26 @@ import("//build_overrides/chip.gni") -static_library("setup_payload") { - output_name = "libSetupPayload" - +source_set("additional_data_payload") { sources = [ "AdditionalDataPayload.h", "AdditionalDataPayloadGenerator.cpp", "AdditionalDataPayloadGenerator.h", "AdditionalDataPayloadParser.cpp", "AdditionalDataPayloadParser.h", + ] + + public_deps = [ + "${chip_root}/src/crypto", + "${chip_root}/src/lib/core", + "${chip_root}/src/lib/support", + ] +} + +static_library("setup_payload") { + output_name = "libSetupPayload" + + sources = [ "Base38.h", "Base38Decode.cpp", "Base38Decode.h", @@ -45,6 +56,7 @@ static_library("setup_payload") { cflags = [ "-Wconversion" ] public_deps = [ + ":additional_data_payload", "${chip_root}/src/crypto", "${chip_root}/src/lib/core", "${chip_root}/src/lib/support", diff --git a/src/system/BUILD.gn b/src/system/BUILD.gn index 874bc3cdc0171d..8a60c03dbb9b56 100644 --- a/src/system/BUILD.gn +++ b/src/system/BUILD.gn @@ -59,6 +59,7 @@ buildconfig_header("system_buildconfig") { "CHIP_WITH_NLFAULTINJECTION=${chip_with_nlfaultinjection}", "CHIP_SYSTEM_CONFIG_USE_DISPATCH=${chip_system_config_use_dispatch}", "CHIP_SYSTEM_CONFIG_USE_LWIP=${chip_system_config_use_lwip}", + "CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_UDP=${chip_system_config_use_open_thread_udp}", "CHIP_SYSTEM_CONFIG_USE_SOCKETS=${chip_system_config_use_sockets}", "CHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK=false", "CHIP_SYSTEM_CONFIG_POSIX_LOCKING=${chip_system_config_posix_locking}", diff --git a/src/system/SystemPacketBuffer.h b/src/system/SystemPacketBuffer.h index 031a397c422bba..4f877afb0bf048 100644 --- a/src/system/SystemPacketBuffer.h +++ b/src/system/SystemPacketBuffer.h @@ -847,6 +847,15 @@ namespace Inet { class UDPEndPointImplLwIP; } // namespace Inet +#if CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_UDP +// TODO : Temp Implementation issue : 13085 +// Still use LwIP buffer even if using OpenThread UDP implementation +// since decoupling of LwIP from OpenThread is still in progress +namespace Inet { +class UDPEndPointImplOT; +} // namespace Inet +#endif + namespace System { /** @@ -864,6 +873,12 @@ class LwIPPacketBufferView : public PacketBufferHandle */ static struct pbuf * UnsafeGetLwIPpbuf(const PacketBufferHandle & handle) { return PacketBufferHandle::GetLwIPpbuf(handle); } friend class Inet::UDPEndPointImplLwIP; +#if CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_UDP + // TODO : Temp Implementation issue : 13085 + // Still use LwIP buffer even if using OpenThread UDP implementation + // since decoupling of LwIP from OpenThread is still in progress + friend class Inet::UDPEndPointImplOT; +#endif }; } // namespace System diff --git a/src/system/system.gni b/src/system/system.gni index 12e371a7c29d1b..71fb601192f99d 100644 --- a/src/system/system.gni +++ b/src/system/system.gni @@ -31,6 +31,9 @@ declare_args() { # Enable metrics collection. chip_system_config_provide_statistics = true + + # Use OpenThread UDP stack directly + chip_system_config_use_open_thread_udp = false } declare_args() { diff --git a/src/transport/GroupSession.h b/src/transport/GroupSession.h index f0fd85a9b66a8e..41ee154ed91361 100644 --- a/src/transport/GroupSession.h +++ b/src/transport/GroupSession.h @@ -119,6 +119,13 @@ class GroupSessionTable } } + /** + * @brief Deletes an entry from the object pool + * + * @param entry + */ + void DeleteEntry(GroupSession * entry) { mEntries.ReleaseObject(entry); } + private: BitMapObjectPool mEntries; }; diff --git a/src/transport/SessionManager.cpp b/src/transport/SessionManager.cpp index fdd4622e0e36f4..5b2e088357fc25 100644 --- a/src/transport/SessionManager.cpp +++ b/src/transport/SessionManager.cpp @@ -540,12 +540,6 @@ void SessionManager::SecureGroupMessageDispatch(const PacketHeader & packetHeade return; // malformed packet } - Optional session = FindGroupSession(packetHeader.GetDestinationGroupId().Value()); - if (!session.HasValue()) - { - return; - } - if (msg.IsNull()) { ChipLogError(Inet, "Secure transport received Groupcast NULL packet, discarding"); @@ -603,7 +597,12 @@ void SessionManager::SecureGroupMessageDispatch(const PacketHeader & packetHeade if (mCB != nullptr) { + Optional session = CreateGroupSession(packetHeader.GetDestinationGroupId().Value()); + VerifyOrReturn(session.HasValue(), ChipLogError(Inet, "Error when creating group session handle.")); + mCB->OnMessageReceived(packetHeader, payloadHeader, session.Value(), peerAddress, isDuplicate, std::move(msg)); + + RemoveGroupSession(session.Value()->AsGroupSession()); } } diff --git a/src/transport/SessionManager.h b/src/transport/SessionManager.h index c2187ed11d7919..b7005854f6e64d 100644 --- a/src/transport/SessionManager.h +++ b/src/transport/SessionManager.h @@ -212,6 +212,7 @@ class DLL_EXPORT SessionManager : public TransportMgrDelegate // TODO: implements group sessions Optional CreateGroupSession(GroupId group) { return mGroupSessions.AllocEntry(group, kUndefinedFabricIndex); } Optional FindGroupSession(GroupId group) { return mGroupSessions.FindEntry(group, kUndefinedFabricIndex); } + void RemoveGroupSession(Transport::GroupSession * session) { mGroupSessions.DeleteEntry(session); } // TODO: this is a temporary solution for legacy tests which use nodeId to send packets // and tv-casting-app that uses the TV's node ID to find the associated secure session diff --git a/src/transport/raw/UDP.cpp b/src/transport/raw/UDP.cpp index d1d996fa6a2043..c27190ad7b1e6f 100644 --- a/src/transport/raw/UDP.cpp +++ b/src/transport/raw/UDP.cpp @@ -49,12 +49,14 @@ CHIP_ERROR UDP::Init(UdpListenParameters & params) err = params.GetEndPointManager()->NewEndPoint(&mUDPEndPoint); SuccessOrExit(err); + mUDPEndPoint->SetNativeParams(params.GetNativeParams()); + ChipLogDetail(Inet, "UDP::Init bind&listen port=%d", params.GetListenPort()); err = mUDPEndPoint->Bind(params.GetAddressType(), Inet::IPAddress::Any, params.GetListenPort(), params.GetInterfaceId()); SuccessOrExit(err); - err = mUDPEndPoint->Listen(OnUdpReceive, nullptr /*onReceiveError*/, this); + err = mUDPEndPoint->Listen(OnUdpReceive, OnUdpError, this); SuccessOrExit(err); mUDPEndpointType = params.GetAddressType(); @@ -125,6 +127,11 @@ void UDP::OnUdpReceive(Inet::UDPEndPoint * endPoint, System::PacketBufferHandle } } +void UDP::OnUdpError(Inet::UDPEndPoint * endPoint, CHIP_ERROR err, const Inet::IPPacketInfo * pktInfo) +{ + ChipLogError(Inet, "Failed to receive UDP message: %s", ErrorStr(err)); +} + CHIP_ERROR UDP::MulticastGroupJoinLeave(const Transport::PeerAddress & address, bool join) { char addressStr[Transport::PeerAddress::kMaxToStringSize]; diff --git a/src/transport/raw/UDP.h b/src/transport/raw/UDP.h index fcdc624eb06d81..25fb5f3ed71839 100644 --- a/src/transport/raw/UDP.h +++ b/src/transport/raw/UDP.h @@ -34,6 +34,10 @@ #include #include +#if CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_UDP +struct otInstance; +#endif // CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_UDP + namespace chip { namespace Transport { @@ -71,11 +75,23 @@ class UdpListenParameters return *this; } + /** + * Networking Stack Native parameter (optional) + */ + void * GetNativeParams() const { return mNativeParams; } + UdpListenParameters & SetNativeParams(void * params) + { + mNativeParams = params; + + return *this; + } + private: Inet::EndPointManager * mEndPointManager; ///< Associated endpoint factory Inet::IPAddressType mAddressType = Inet::IPAddressType::kIPv6; ///< type of listening socket uint16_t mListenPort = CHIP_PORT; ///< UDP listen port Inet::InterfaceId mInterfaceId = Inet::InterfaceId::Null(); ///< Interface to listen on + void * mNativeParams = nullptr; }; /** Implements a transport using UDP. */ @@ -133,6 +149,8 @@ class DLL_EXPORT UDP : public Base static void OnUdpReceive(Inet::UDPEndPoint * endPoint, System::PacketBufferHandle && buffer, const Inet::IPPacketInfo * pktInfo); + static void OnUdpError(Inet::UDPEndPoint * endPoint, CHIP_ERROR err, const Inet::IPPacketInfo * pktInfo); + Inet::UDPEndPoint * mUDPEndPoint = nullptr; ///< UDP socket used by the transport Inet::IPAddressType mUDPEndpointType = Inet::IPAddressType::kUnknown; ///< Socket listening type State mState = State::kNotReady; ///< State of the UDP transport diff --git a/src/transport/raw/tests/NetworkTestHelpers.cpp b/src/transport/raw/tests/NetworkTestHelpers.cpp index 02c08a7df72fe1..b29c33bc85de25 100644 --- a/src/transport/raw/tests/NetworkTestHelpers.cpp +++ b/src/transport/raw/tests/NetworkTestHelpers.cpp @@ -57,8 +57,8 @@ CHIP_ERROR IOContext::Shutdown() void IOContext::DriveIO() { - // Set the select timeout to 100ms - constexpr uint32_t kSleepTimeMilliseconds = 100; + // Set the select timeout to 10ms + constexpr uint32_t kSleepTimeMilliseconds = 10; ServiceEvents(kSleepTimeMilliseconds); } diff --git a/third_party/mbed-os/repo b/third_party/mbed-os/repo index 4cfbea43cabe86..149c5b12fa8a6c 160000 --- a/third_party/mbed-os/repo +++ b/third_party/mbed-os/repo @@ -1 +1 @@ -Subproject commit 4cfbea43cabe86bc3ed7a5287cd464be7a218938 +Subproject commit 149c5b12fa8a6c84d340361975cb992f08367b43 diff --git a/third_party/pigweed/repo b/third_party/pigweed/repo index 444f6d0df8a002..f30bce8bf2513e 160000 --- a/third_party/pigweed/repo +++ b/third_party/pigweed/repo @@ -1 +1 @@ -Subproject commit 444f6d0df8a002a7c577066dcb1eca939c0a6b13 +Subproject commit f30bce8bf2513e924f461da6f2e7d1f2620a89f3 diff --git a/third_party/qpg_sdk/repo b/third_party/qpg_sdk/repo index edb134291c9f0c..6bce6f11208c77 160000 --- a/third_party/qpg_sdk/repo +++ b/third_party/qpg_sdk/repo @@ -1 +1 @@ -Subproject commit edb134291c9f0cb661c2e95dcf643cd334dca810 +Subproject commit 6bce6f11208c77dfc6bb1b9256bf01248ff002ab diff --git a/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.cpp index 759d13c5028d26..ee7d4c3d655502 100644 --- a/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.cpp @@ -16,3 +16,132 @@ */ // THIS FILE IS GENERATED BY ZAP + +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace ::chip; +using namespace ::chip::app::DataModel; + +namespace { +[[maybe_unused]] constexpr uint16_t kByteSpanSizeLengthInBytes = 2; +} // namespace + +#define CHECK_STATUS_WITH_RETVAL(error, retval) \ + if (CHIP_NO_ERROR != error) \ + { \ + ChipLogError(Zcl, "CHECK_STATUS %s", ErrorStr(error)); \ + if (onFailureCallback != nullptr) \ + { \ + Callback::Callback * cb = \ + Callback::Callback::FromCancelable(onFailureCallback); \ + cb->mCall(cb->mContext, static_cast(EMBER_ZCL_STATUS_INVALID_VALUE)); \ + } \ + return retval; \ + } + +#define CHECK_STATUS(error) CHECK_STATUS_WITH_RETVAL(error, true) +#define CHECK_STATUS_VOID(error) CHECK_STATUS_WITH_RETVAL(error, ) + +#define CHECK_MESSAGE_LENGTH_WITH_RETVAL(value, retval) \ + if (!CanCastTo(value)) \ + { \ + ChipLogError(Zcl, "CHECK_MESSAGE_LENGTH expects a uint16_t value, got: %d", value); \ + if (onFailureCallback != nullptr) \ + { \ + Callback::Callback * cb = \ + Callback::Callback::FromCancelable(onFailureCallback); \ + cb->mCall(cb->mContext, static_cast(EMBER_ZCL_STATUS_INVALID_VALUE)); \ + } \ + return retval; \ + } \ + \ + if (messageLen < value) \ + { \ + ChipLogError(Zcl, "Unexpected response length: %d", messageLen); \ + if (onFailureCallback != nullptr) \ + { \ + Callback::Callback * cb = \ + Callback::Callback::FromCancelable(onFailureCallback); \ + cb->mCall(cb->mContext, static_cast(EMBER_ZCL_STATUS_INVALID_VALUE)); \ + } \ + return retval; \ + } \ + \ + messageLen = static_cast(messageLen - static_cast(value)); + +#define CHECK_MESSAGE_LENGTH(value) CHECK_MESSAGE_LENGTH_WITH_RETVAL(value, true) +#define CHECK_MESSAGE_LENGTH_VOID(value) CHECK_MESSAGE_LENGTH_WITH_RETVAL(value, ) + +#define GET_RESPONSE_CALLBACKS(name) \ + Callback::Cancelable * onSuccessCallback = nullptr; \ + Callback::Cancelable * onFailureCallback = nullptr; \ + NodeId sourceId = emberAfCurrentCommand()->SourceNodeId(); \ + uint8_t sequenceNumber = emberAfCurrentCommand()->seqNum; \ + CHIP_ERROR err = gCallbacks.GetResponseCallback(sourceId, sequenceNumber, &onSuccessCallback, &onFailureCallback); \ + \ + if (CHIP_NO_ERROR != err) \ + { \ + if (onSuccessCallback == nullptr) \ + { \ + ChipLogDetail(Zcl, "%s: Missing success callback", name); \ + } \ + \ + if (onFailureCallback == nullptr) \ + { \ + ChipLogDetail(Zcl, "%s: Missing failure callback", name); \ + } \ + \ + return true; \ + } + +#define GET_CLUSTER_RESPONSE_CALLBACKS(name) \ + Callback::Cancelable * onSuccessCallback = nullptr; \ + Callback::Cancelable * onFailureCallback = nullptr; \ + NodeId sourceIdentifier = reinterpret_cast(commandObj); \ + /* #6559: Currently, we only have one commands for the IMInvokeCommands and to a device, so the seqNum is always set to 0. */ \ + CHIP_ERROR err = gCallbacks.GetResponseCallback(sourceIdentifier, 0, &onSuccessCallback, &onFailureCallback); \ + \ + if (CHIP_NO_ERROR != err) \ + { \ + if (onSuccessCallback == nullptr) \ + { \ + ChipLogDetail(Zcl, "%s: Missing success callback", name); \ + } \ + \ + if (onFailureCallback == nullptr) \ + { \ + ChipLogDetail(Zcl, "%s: Missing failure callback", name); \ + } \ + \ + return true; \ + } + +// Singleton instance of the callbacks manager +app::CHIPDeviceCallbacksMgr & gCallbacks = app::CHIPDeviceCallbacksMgr::GetInstance(); + +bool emberAfOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback(EndpointId endpoint, app::CommandSender * commandObj, + uint8_t action, uint32_t delayedActionTime) +{ + ChipLogProgress(Zcl, "ApplyUpdateResponse:"); + ChipLogProgress(Zcl, " action: %" PRIu8 "", action); + ChipLogProgress(Zcl, " delayedActionTime: %" PRIu32 "", delayedActionTime); + + GET_CLUSTER_RESPONSE_CALLBACKS("OtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback"); + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, action, delayedActionTime); + return true; +} diff --git a/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.h index 302d36ce5d8076..506fde03a1e3d4 100644 --- a/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.h @@ -17,4 +17,25 @@ // THIS FILE IS GENERATED BY ZAP +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Note: The IMDefaultResponseCallback is a bridge to the old CallbackMgr before IM is landed, so it still accepts EmberAfStatus +// instead of IM status code. +// #6308 should handle IM error code on the application side, either modify this function or remove this. + +// Cluster Specific Response Callbacks +typedef void (*OtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback)(void * context, uint8_t action, + uint32_t delayedActionTime); + // List specific responses diff --git a/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.cpp b/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.cpp index 759d13c5028d26..610435b71adc00 100644 --- a/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.cpp @@ -16,3 +16,173 @@ */ // THIS FILE IS GENERATED BY ZAP + +#include "CHIPClusters.h" + +#include +#include + +namespace chip { + +using namespace app::Clusters; +using namespace System; +using namespace Encoding::LittleEndian; + +namespace Controller { + +// TODO(#4502): onCompletion is not used by IM for now. +// TODO(#4503): length should be passed to commands when byte string is in argument list. +// TODO(#4503): Commands should take group id as an argument. + +// OtaSoftwareUpdateProvider Cluster Commands +CHIP_ERROR OtaSoftwareUpdateProviderCluster::ApplyUpdateRequest(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan updateToken, uint32_t newVersion) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // updateToken: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), updateToken)); + // newVersion: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), newVersion)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + +CHIP_ERROR OtaSoftwareUpdateProviderCluster::NotifyUpdateApplied(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan updateToken, uint32_t softwareVersion) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // updateToken: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), updateToken)); + // softwareVersion: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), softwareVersion)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + +CHIP_ERROR OtaSoftwareUpdateProviderCluster::QueryImage(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::VendorId vendorId, + uint16_t productId, uint32_t softwareVersion, uint8_t protocolsSupported, + uint16_t hardwareVersion, chip::CharSpan location, bool requestorCanConsent, + chip::ByteSpan metadataForProvider) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + OtaSoftwareUpdateProvider::Commands::QueryImage::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // vendorId: vendorId + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), vendorId)); + // productId: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), productId)); + // softwareVersion: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), softwareVersion)); + // protocolsSupported: OTADownloadProtocol + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), protocolsSupported)); + // hardwareVersion: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), hardwareVersion)); + // location: charString + SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), location)); + // requestorCanConsent: boolean + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), requestorCanConsent)); + // metadataForProvider: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), metadataForProvider)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + +} // namespace Controller +} // namespace chip diff --git a/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.h b/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.h index 759d13c5028d26..908506defd13e0 100644 --- a/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.h @@ -16,3 +16,36 @@ */ // THIS FILE IS GENERATED BY ZAP + +// Prevent multiple inclusion +#pragma once + +#include +#include + +#include +#include +#include + +namespace chip { +namespace Controller { + +class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase +{ +public: + OtaSoftwareUpdateProviderCluster() : ClusterBase(app::Clusters::OtaSoftwareUpdateProvider::Id) {} + ~OtaSoftwareUpdateProviderCluster() {} + + // Cluster Commands + CHIP_ERROR ApplyUpdateRequest(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan updateToken, uint32_t newVersion); + CHIP_ERROR NotifyUpdateApplied(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan updateToken, uint32_t softwareVersion); + CHIP_ERROR QueryImage(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::VendorId vendorId, uint16_t productId, uint32_t softwareVersion, uint8_t protocolsSupported, + uint16_t hardwareVersion, chip::CharSpan location, bool requestorCanConsent, + chip::ByteSpan metadataForProvider); +}; + +} // namespace Controller +} // namespace chip diff --git a/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp index d38955ee000f25..0a671cc2520a9b 100644 --- a/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp @@ -1194,60 +1194,100 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP namespace OtaSoftwareUpdateProvider { -void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +void DispatchClientCommand(CommandSender * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) { // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. // Any error value TLVUnpackError means we have received an illegal value. // The following variables are used for all commands to save code size. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - bool wasHandled = false; + CHIP_ERROR TLVError = CHIP_NO_ERROR; + CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; + uint32_t validArgumentCount = 0; + uint32_t expectArgumentCount = 0; + uint32_t currentDecodeTagId = 0; + bool wasHandled = false; { switch (aCommandPath.mCommandId) { - case Commands::ApplyUpdateRequest::Id: { - Commands::ApplyUpdateRequest::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = - emberAfOtaSoftwareUpdateProviderClusterApplyUpdateRequestCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::NotifyUpdateApplied::Id: { - Commands::NotifyUpdateApplied::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = - emberAfOtaSoftwareUpdateProviderClusterNotifyUpdateAppliedCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::QueryImage::Id: { - Commands::QueryImage::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfOtaSoftwareUpdateProviderClusterQueryImageCallback(apCommandObj, aCommandPath, commandData); + case Commands::ApplyUpdateResponse::Id: { + expectArgumentCount = 2; + uint8_t action; + uint32_t delayedActionTime; + bool argExists[2]; + + memset(argExists, 0, sizeof argExists); + + while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) + { + // Since call to aDataTlv.Next() is CHIP_NO_ERROR, the read head always points to an element. + // Skip this element if it is not a ContextTag, not consider it as an error if other values are valid. + if (!TLV::IsContextTag(aDataTlv.GetTag())) + { + continue; + } + currentDecodeTagId = TLV::TagNumFromTag(aDataTlv.GetTag()); + if (currentDecodeTagId < 2) + { + if (argExists[currentDecodeTagId]) + { + ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); + TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; + break; + } + else + { + argExists[currentDecodeTagId] = true; + validArgumentCount++; + } + } + switch (currentDecodeTagId) + { + case 0: + TLVUnpackError = aDataTlv.Get(action); + break; + case 1: + TLVUnpackError = aDataTlv.Get(delayedActionTime); + break; + default: + // Unsupported tag, ignore it. + ChipLogProgress(Zcl, "Unknown TLV tag during processing."); + break; + } + if (CHIP_NO_ERROR != TLVUnpackError) + { + break; + } + } + + if (CHIP_END_OF_TLV == TLVError) + { + // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. + TLVError = CHIP_NO_ERROR; + } + + if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) + { + wasHandled = emberAfOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback( + aCommandPath.mEndpointId, apCommandObj, action, delayedActionTime); } break; } default: { - // Unrecognized command ID, error status will apply. - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, - ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); return; } } } - if (CHIP_NO_ERROR != TLVError || !wasHandled) + if (CHIP_NO_ERROR != TLVError || CHIP_NO_ERROR != TLVUnpackError || expectArgumentCount != validArgumentCount || !wasHandled) { - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); - ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + ChipLogProgress(Zcl, + "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT + ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32, + validArgumentCount, expectArgumentCount, TLVError.Format(), TLVUnpackError.Format(), currentDecodeTagId); + // A command with no arguments would never write currentDecodeTagId. If + // progress logging is also disabled, it would look unused. Silence that + // warning. + UNUSED_VAR(currentDecodeTagId); } } @@ -2029,9 +2069,6 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV: case Clusters::NetworkCommissioning::Id: Clusters::NetworkCommissioning::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; - case Clusters::OtaSoftwareUpdateProvider::Id: - Clusters::OtaSoftwareUpdateProvider::DispatchServerCommand(apCommandObj, aCommandPath, aReader); - break; case Clusters::OtaSoftwareUpdateRequestor::Id: Clusters::OtaSoftwareUpdateRequestor::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; @@ -2077,6 +2114,9 @@ void DispatchSingleClusterResponseCommand(const ConcreteCommandPath & aCommandPa SuccessOrExit(aReader.EnterContainer(dataTlvType)); switch (aCommandPath.mClusterId) { + case Clusters::OtaSoftwareUpdateProvider::Id: + Clusters::OtaSoftwareUpdateProvider::DispatchClientCommand(apCommandObj, aCommandPath, aReader); + break; default: ChipLogError(Zcl, "Unknown cluster " ChipLogFormatMEI, ChipLogValueMEI(aCommandPath.mClusterId)); break; diff --git a/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h index d940c9b06bfcad..269b9a65b20ac3 100644 --- a/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h @@ -54,12 +54,13 @@ MatterIlluminanceMeasurementPluginServerInitCallback(); \ MatterKeypadInputPluginServerInitCallback(); \ MatterLevelControlPluginServerInitCallback(); \ + MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterLowPowerPluginServerInitCallback(); \ MatterMediaInputPluginServerInitCallback(); \ MatterMediaPlaybackPluginServerInitCallback(); \ MatterModeSelectPluginServerInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ - MatterOtaSoftwareUpdateProviderPluginServerInitCallback(); \ + MatterOtaSoftwareUpdateProviderPluginClientInitCallback(); \ MatterOtaSoftwareUpdateRequestorPluginServerInitCallback(); \ MatterOccupancySensingPluginServerInitCallback(); \ MatterOnOffPluginServerInitCallback(); \ 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 e609c8bf2420a3..3d5bf0ef4e2b03 100644 --- a/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp @@ -125,6 +125,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_LEVEL_CONTROL_CLUSTER_ID: emberAfLevelControlClusterInitCallback(endpoint); break; + case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; case ZCL_LOW_POWER_CLUSTER_ID: emberAfLowPowerClusterInitCallback(endpoint); break; @@ -378,6 +381,11 @@ void __attribute__((weak)) emberAfLevelControlClusterInitCallback(EndpointId end // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfLowPowerClusterInitCallback(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 0b495aa2050eac..96832858422c60 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -35,12 +35,30 @@ /* 4 - ManufacturingDate, */ \ 16, '2', '0', '2', '1', '0', '6', '1', '4', '1', '2', '3', '4', '5', '6', 'Z', 'Z', \ \ + /* Endpoint: 0, Cluster: Localization Configuration (server), big-endian */ \ + \ + /* 21 - SupportedLocales, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 0, Cluster: General Commissioning (server), big-endian */ \ \ - /* 21 - Breadcrumb, */ \ + /* 275 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 29 - BasicCommissioningInfoList, */ \ + /* 283 - 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, \ @@ -56,263 +74,263 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 283 - FeatureMap, */ \ + /* 537 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x06, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 287 - Networks, */ \ + /* 541 - Networks, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 299 - LastConnectErrorValue, */ \ + /* 553 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 303 - FeatureMap, */ \ + /* 557 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), big-endian */ \ \ - /* 307 - UpTime, */ \ + /* 561 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 315 - TotalOperationalHours, */ \ + /* 569 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), big-endian */ \ \ - /* 319 - CurrentHeapFree, */ \ + /* 573 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 327 - CurrentHeapUsed, */ \ + /* 581 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 335 - CurrentHeapHighWatermark, */ \ + /* 589 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 343 - FeatureMap, */ \ + /* 597 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), big-endian */ \ \ - /* 347 - NetworkName, */ \ + /* 601 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 349 - ExtendedPanId, */ \ + /* 603 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 357 - OverrunCount, */ \ + /* 611 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 365 - PartitionId, */ \ + /* 619 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 369 - TxTotalCount, */ \ + /* 623 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 373 - TxUnicastCount, */ \ + /* 627 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 377 - TxBroadcastCount, */ \ + /* 631 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 381 - TxAckRequestedCount, */ \ + /* 635 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 385 - TxAckedCount, */ \ + /* 639 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 389 - TxNoAckRequestedCount, */ \ + /* 643 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 393 - TxDataCount, */ \ + /* 647 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 397 - TxDataPollCount, */ \ + /* 651 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 401 - TxBeaconCount, */ \ + /* 655 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 405 - TxBeaconRequestCount, */ \ + /* 659 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 409 - TxOtherCount, */ \ + /* 663 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 413 - TxRetryCount, */ \ + /* 667 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 417 - TxDirectMaxRetryExpiryCount, */ \ + /* 671 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 421 - TxIndirectMaxRetryExpiryCount, */ \ + /* 675 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 425 - TxErrCcaCount, */ \ + /* 679 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 429 - TxErrAbortCount, */ \ + /* 683 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 433 - TxErrBusyChannelCount, */ \ + /* 687 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 437 - RxTotalCount, */ \ + /* 691 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 441 - RxUnicastCount, */ \ + /* 695 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 445 - RxBroadcastCount, */ \ + /* 699 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 449 - RxDataCount, */ \ + /* 703 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 453 - RxDataPollCount, */ \ + /* 707 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 457 - RxBeaconCount, */ \ + /* 711 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 461 - RxBeaconRequestCount, */ \ + /* 715 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 465 - RxOtherCount, */ \ + /* 719 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 469 - RxAddressFilteredCount, */ \ + /* 723 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 473 - RxDestAddrFilteredCount, */ \ + /* 727 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 477 - RxDuplicatedCount, */ \ + /* 731 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 481 - RxErrNoFrameCount, */ \ + /* 735 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 485 - RxErrUnknownNeighborCount, */ \ + /* 739 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 489 - RxErrInvalidSrcAddrCount, */ \ + /* 743 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 493 - RxErrSecCount, */ \ + /* 747 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 497 - RxErrFcsCount, */ \ + /* 751 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 501 - RxErrOtherCount, */ \ + /* 755 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 505 - ActiveTimestamp, */ \ + /* 759 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 513 - PendingTimestamp, */ \ + /* 767 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 521 - delay, */ \ + /* 775 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 525 - ChannelMask, */ \ + /* 779 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 532 - FeatureMap, */ \ + /* 786 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0F, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), big-endian */ \ \ - /* 536 - BeaconLostCount, */ \ + /* 790 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 540 - BeaconRxCount, */ \ + /* 794 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 544 - PacketMulticastRxCount, */ \ + /* 798 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 548 - PacketMulticastTxCount, */ \ + /* 802 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 552 - PacketUnicastRxCount, */ \ + /* 806 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 556 - PacketUnicastTxCount, */ \ + /* 810 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 560 - CurrentMaxRate, */ \ + /* 814 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 568 - OverrunCount, */ \ + /* 822 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 576 - FeatureMap, */ \ + /* 830 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), big-endian */ \ \ - /* 580 - PacketRxCount, */ \ + /* 834 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 588 - PacketTxCount, */ \ + /* 842 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 596 - TxErrCount, */ \ + /* 850 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 604 - CollisionCount, */ \ + /* 858 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 612 - OverrunCount, */ \ + /* 866 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 620 - TimeSinceReset, */ \ + /* 874 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 628 - FeatureMap, */ \ + /* 882 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 1, Cluster: On/Off (server), big-endian */ \ \ - /* 632 - FeatureMap, */ \ + /* 886 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Power Source (server), big-endian */ \ \ - /* 636 - BatteryVoltage, */ \ + /* 890 - BatteryVoltage, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 640 - BatteryTimeRemaining, */ \ + /* 894 - BatteryTimeRemaining, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 644 - ActiveBatteryFaults, */ \ + /* 898 - ActiveBatteryFaults, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 652 - FeatureMap, */ \ + /* 906 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 656 - Networks, */ \ + /* 910 - Networks, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 668 - LastConnectErrorValue, */ \ + /* 922 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 672 - FeatureMap, */ \ + /* 926 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Switch (server), big-endian */ \ \ - /* 676 - FeatureMap, */ \ + /* 930 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Fixed Label (server), big-endian */ \ \ - /* 680 - label list, */ \ + /* 934 - 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, \ @@ -330,49 +348,49 @@ \ /* Endpoint: 1, Cluster: Mode Select (server), big-endian */ \ \ - /* 934 - Description, */ \ + /* 1188 - Description, */ \ 6, 'C', 'o', 'f', 'f', 'e', 'e', \ \ /* Endpoint: 1, Cluster: Door Lock (server), big-endian */ \ \ - /* 941 - Language, */ \ + /* 1195 - Language, */ \ 2, 'e', 'n', \ \ - /* 944 - AutoRelockTime, */ \ + /* 1198 - AutoRelockTime, */ \ 0x00, 0x00, 0x00, 0x60, \ \ /* Endpoint: 1, Cluster: Window Covering (server), big-endian */ \ \ - /* 948 - FeatureMap, */ \ + /* 1202 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server), big-endian */ \ \ - /* 952 - LifetimeRunningHours, */ \ + /* 1206 - LifetimeRunningHours, */ \ 0x00, 0x00, 0x00, \ \ - /* 955 - Power, */ \ + /* 1209 - Power, */ \ 0x00, 0x00, 0x00, \ \ - /* 958 - LifetimeEnergyConsumed, */ \ + /* 1212 - LifetimeEnergyConsumed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 962 - FeatureMap, */ \ + /* 1216 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Thermostat (server), big-endian */ \ \ - /* 966 - FeatureMap, */ \ + /* 1220 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0B, \ \ /* Endpoint: 1, Cluster: IAS Zone (server), big-endian */ \ \ - /* 970 - IAS CIE address, */ \ + /* 1224 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Channel (server), big-endian */ \ \ - /* 978 - channel list, */ \ + /* 1232 - 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, \ @@ -390,7 +408,7 @@ \ /* Endpoint: 1, Cluster: Target Navigator (server), big-endian */ \ \ - /* 1232 - target navigator list, */ \ + /* 1486 - 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, \ @@ -408,24 +426,24 @@ \ /* Endpoint: 1, Cluster: Media Playback (server), big-endian */ \ \ - /* 1486 - start time, */ \ + /* 1740 - start time, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, \ \ - /* 1494 - duration, */ \ + /* 1748 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1502 - playback speed, */ \ + /* 1756 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1506 - seek range end, */ \ + /* 1760 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1514 - seek range start, */ \ + /* 1768 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Media Input (server), big-endian */ \ \ - /* 1522 - media input list, */ \ + /* 1776 - 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, \ @@ -443,7 +461,7 @@ \ /* Endpoint: 1, Cluster: Content Launcher (server), big-endian */ \ \ - /* 1776 - accept header list, */ \ + /* 2030 - accept 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, \ @@ -459,12 +477,12 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2030 - supported streaming protocols, */ \ + /* 2284 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Audio Output (server), big-endian */ \ \ - /* 2034 - audio output list, */ \ + /* 2288 - 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, \ @@ -482,7 +500,7 @@ \ /* Endpoint: 1, Cluster: Application Launcher (server), big-endian */ \ \ - /* 2288 - application launcher list, */ \ + /* 2542 - 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, \ @@ -500,67 +518,67 @@ \ /* Endpoint: 1, Cluster: Application Basic (server), big-endian */ \ \ - /* 2542 - allowed vendor list, */ \ + /* 2796 - allowed vendor 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, \ \ /* Endpoint: 1, Cluster: Test Cluster (server), big-endian */ \ \ - /* 2574 - bitmap32, */ \ + /* 2828 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2578 - bitmap64, */ \ + /* 2832 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2586 - int24u, */ \ + /* 2840 - int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 2589 - int32u, */ \ + /* 2843 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2593 - int40u, */ \ + /* 2847 - int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2598 - int48u, */ \ + /* 2852 - int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2604 - int56u, */ \ + /* 2858 - int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2611 - int64u, */ \ + /* 2865 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2619 - int24s, */ \ + /* 2873 - int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 2622 - int32s, */ \ + /* 2876 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2626 - int40s, */ \ + /* 2880 - int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2631 - int48s, */ \ + /* 2885 - int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2637 - int56s, */ \ + /* 2891 - int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2644 - int64s, */ \ + /* 2898 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2652 - float_single, */ \ + /* 2906 - float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2656 - float_double, */ \ + /* 2910 - float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2664 - epoch_us, */ \ + /* 2918 - epoch_us, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2672 - epoch_s, */ \ + /* 2926 - epoch_s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2676 - list_long_octet_string, */ \ + /* 2930 - list_long_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -615,65 +633,65 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3676 - nullable_bitmap32, */ \ + /* 3930 - nullable_bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3680 - nullable_bitmap64, */ \ + /* 3934 - nullable_bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3688 - nullable_int24u, */ \ + /* 3942 - nullable_int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 3691 - nullable_int32u, */ \ + /* 3945 - nullable_int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3695 - nullable_int40u, */ \ + /* 3949 - nullable_int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3700 - nullable_int48u, */ \ + /* 3954 - nullable_int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3706 - nullable_int56u, */ \ + /* 3960 - nullable_int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3713 - nullable_int64u, */ \ + /* 3967 - nullable_int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3721 - nullable_int24s, */ \ + /* 3975 - nullable_int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 3724 - nullable_int32s, */ \ + /* 3978 - nullable_int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3728 - nullable_int40s, */ \ + /* 3982 - nullable_int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3733 - nullable_int48s, */ \ + /* 3987 - nullable_int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3739 - nullable_int56s, */ \ + /* 3993 - nullable_int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3746 - nullable_int64s, */ \ + /* 4000 - nullable_int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3754 - nullable_float_single, */ \ + /* 4008 - nullable_float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3758 - nullable_float_double, */ \ + /* 4012 - nullable_float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server), big-endian */ \ \ - /* 3766 - measurement type, */ \ + /* 4020 - measurement type, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3770 - total active power, */ \ + /* 4024 - total active power, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: On/Off (server), big-endian */ \ \ - /* 3774 - FeatureMap, */ \ + /* 4028 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } @@ -689,12 +707,30 @@ /* 4 - ManufacturingDate, */ \ 16, '2', '0', '2', '1', '0', '6', '1', '4', '1', '2', '3', '4', '5', '6', 'Z', 'Z', \ \ + /* Endpoint: 0, Cluster: Localization Configuration (server), little-endian */ \ + \ + /* 21 - SupportedLocales, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 0, Cluster: General Commissioning (server), little-endian */ \ \ - /* 21 - Breadcrumb, */ \ + /* 275 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 29 - BasicCommissioningInfoList, */ \ + /* 283 - 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, \ @@ -710,263 +746,263 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 283 - FeatureMap, */ \ + /* 537 - FeatureMap, */ \ 0x06, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 287 - Networks, */ \ + /* 541 - Networks, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 299 - LastConnectErrorValue, */ \ + /* 553 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 303 - FeatureMap, */ \ + /* 557 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), little-endian */ \ \ - /* 307 - UpTime, */ \ + /* 561 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 315 - TotalOperationalHours, */ \ + /* 569 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), little-endian */ \ \ - /* 319 - CurrentHeapFree, */ \ + /* 573 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 327 - CurrentHeapUsed, */ \ + /* 581 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 335 - CurrentHeapHighWatermark, */ \ + /* 589 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 343 - FeatureMap, */ \ + /* 597 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), little-endian */ \ \ - /* 347 - NetworkName, */ \ + /* 601 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 349 - ExtendedPanId, */ \ + /* 603 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 357 - OverrunCount, */ \ + /* 611 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 365 - PartitionId, */ \ + /* 619 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 369 - TxTotalCount, */ \ + /* 623 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 373 - TxUnicastCount, */ \ + /* 627 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 377 - TxBroadcastCount, */ \ + /* 631 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 381 - TxAckRequestedCount, */ \ + /* 635 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 385 - TxAckedCount, */ \ + /* 639 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 389 - TxNoAckRequestedCount, */ \ + /* 643 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 393 - TxDataCount, */ \ + /* 647 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 397 - TxDataPollCount, */ \ + /* 651 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 401 - TxBeaconCount, */ \ + /* 655 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 405 - TxBeaconRequestCount, */ \ + /* 659 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 409 - TxOtherCount, */ \ + /* 663 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 413 - TxRetryCount, */ \ + /* 667 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 417 - TxDirectMaxRetryExpiryCount, */ \ + /* 671 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 421 - TxIndirectMaxRetryExpiryCount, */ \ + /* 675 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 425 - TxErrCcaCount, */ \ + /* 679 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 429 - TxErrAbortCount, */ \ + /* 683 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 433 - TxErrBusyChannelCount, */ \ + /* 687 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 437 - RxTotalCount, */ \ + /* 691 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 441 - RxUnicastCount, */ \ + /* 695 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 445 - RxBroadcastCount, */ \ + /* 699 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 449 - RxDataCount, */ \ + /* 703 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 453 - RxDataPollCount, */ \ + /* 707 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 457 - RxBeaconCount, */ \ + /* 711 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 461 - RxBeaconRequestCount, */ \ + /* 715 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 465 - RxOtherCount, */ \ + /* 719 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 469 - RxAddressFilteredCount, */ \ + /* 723 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 473 - RxDestAddrFilteredCount, */ \ + /* 727 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 477 - RxDuplicatedCount, */ \ + /* 731 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 481 - RxErrNoFrameCount, */ \ + /* 735 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 485 - RxErrUnknownNeighborCount, */ \ + /* 739 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 489 - RxErrInvalidSrcAddrCount, */ \ + /* 743 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 493 - RxErrSecCount, */ \ + /* 747 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 497 - RxErrFcsCount, */ \ + /* 751 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 501 - RxErrOtherCount, */ \ + /* 755 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 505 - ActiveTimestamp, */ \ + /* 759 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 513 - PendingTimestamp, */ \ + /* 767 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 521 - delay, */ \ + /* 775 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 525 - ChannelMask, */ \ + /* 779 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 532 - FeatureMap, */ \ + /* 786 - FeatureMap, */ \ 0x0F, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), little-endian */ \ \ - /* 536 - BeaconLostCount, */ \ + /* 790 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 540 - BeaconRxCount, */ \ + /* 794 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 544 - PacketMulticastRxCount, */ \ + /* 798 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 548 - PacketMulticastTxCount, */ \ + /* 802 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 552 - PacketUnicastRxCount, */ \ + /* 806 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 556 - PacketUnicastTxCount, */ \ + /* 810 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 560 - CurrentMaxRate, */ \ + /* 814 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 568 - OverrunCount, */ \ + /* 822 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 576 - FeatureMap, */ \ + /* 830 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), little-endian */ \ \ - /* 580 - PacketRxCount, */ \ + /* 834 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 588 - PacketTxCount, */ \ + /* 842 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 596 - TxErrCount, */ \ + /* 850 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 604 - CollisionCount, */ \ + /* 858 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 612 - OverrunCount, */ \ + /* 866 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 620 - TimeSinceReset, */ \ + /* 874 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 628 - FeatureMap, */ \ + /* 882 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: On/Off (server), little-endian */ \ \ - /* 632 - FeatureMap, */ \ + /* 886 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Power Source (server), little-endian */ \ \ - /* 636 - BatteryVoltage, */ \ + /* 890 - BatteryVoltage, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 640 - BatteryTimeRemaining, */ \ + /* 894 - BatteryTimeRemaining, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 644 - ActiveBatteryFaults, */ \ + /* 898 - ActiveBatteryFaults, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 652 - FeatureMap, */ \ + /* 906 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 656 - Networks, */ \ + /* 910 - Networks, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 668 - LastConnectErrorValue, */ \ + /* 922 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 672 - FeatureMap, */ \ + /* 926 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Switch (server), little-endian */ \ \ - /* 676 - FeatureMap, */ \ + /* 930 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Fixed Label (server), little-endian */ \ \ - /* 680 - label list, */ \ + /* 934 - 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, \ @@ -984,49 +1020,49 @@ \ /* Endpoint: 1, Cluster: Mode Select (server), little-endian */ \ \ - /* 934 - Description, */ \ + /* 1188 - Description, */ \ 6, 'C', 'o', 'f', 'f', 'e', 'e', \ \ /* Endpoint: 1, Cluster: Door Lock (server), little-endian */ \ \ - /* 941 - Language, */ \ + /* 1195 - Language, */ \ 2, 'e', 'n', \ \ - /* 944 - AutoRelockTime, */ \ + /* 1198 - AutoRelockTime, */ \ 0x60, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Window Covering (server), little-endian */ \ \ - /* 948 - FeatureMap, */ \ + /* 1202 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server), little-endian */ \ \ - /* 952 - LifetimeRunningHours, */ \ + /* 1206 - LifetimeRunningHours, */ \ 0x00, 0x00, 0x00, \ \ - /* 955 - Power, */ \ + /* 1209 - Power, */ \ 0x00, 0x00, 0x00, \ \ - /* 958 - LifetimeEnergyConsumed, */ \ + /* 1212 - LifetimeEnergyConsumed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 962 - FeatureMap, */ \ + /* 1216 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Thermostat (server), little-endian */ \ \ - /* 966 - FeatureMap, */ \ + /* 1220 - FeatureMap, */ \ 0x0B, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: IAS Zone (server), little-endian */ \ \ - /* 970 - IAS CIE address, */ \ + /* 1224 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Channel (server), little-endian */ \ \ - /* 978 - channel list, */ \ + /* 1232 - 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, \ @@ -1044,7 +1080,7 @@ \ /* Endpoint: 1, Cluster: Target Navigator (server), little-endian */ \ \ - /* 1232 - target navigator list, */ \ + /* 1486 - 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, \ @@ -1062,24 +1098,24 @@ \ /* Endpoint: 1, Cluster: Media Playback (server), little-endian */ \ \ - /* 1486 - start time, */ \ + /* 1740 - start time, */ \ 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1494 - duration, */ \ + /* 1748 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1502 - playback speed, */ \ + /* 1756 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1506 - seek range end, */ \ + /* 1760 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1514 - seek range start, */ \ + /* 1768 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Media Input (server), little-endian */ \ \ - /* 1522 - media input list, */ \ + /* 1776 - 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, \ @@ -1097,7 +1133,7 @@ \ /* Endpoint: 1, Cluster: Content Launcher (server), little-endian */ \ \ - /* 1776 - accept header list, */ \ + /* 2030 - accept 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, \ @@ -1113,12 +1149,12 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2030 - supported streaming protocols, */ \ + /* 2284 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Audio Output (server), little-endian */ \ \ - /* 2034 - audio output list, */ \ + /* 2288 - 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, \ @@ -1136,7 +1172,7 @@ \ /* Endpoint: 1, Cluster: Application Launcher (server), little-endian */ \ \ - /* 2288 - application launcher list, */ \ + /* 2542 - 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, \ @@ -1154,67 +1190,67 @@ \ /* Endpoint: 1, Cluster: Application Basic (server), little-endian */ \ \ - /* 2542 - allowed vendor list, */ \ + /* 2796 - allowed vendor 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, \ \ /* Endpoint: 1, Cluster: Test Cluster (server), little-endian */ \ \ - /* 2574 - bitmap32, */ \ + /* 2828 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2578 - bitmap64, */ \ + /* 2832 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2586 - int24u, */ \ + /* 2840 - int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 2589 - int32u, */ \ + /* 2843 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2593 - int40u, */ \ + /* 2847 - int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2598 - int48u, */ \ + /* 2852 - int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2604 - int56u, */ \ + /* 2858 - int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2611 - int64u, */ \ + /* 2865 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2619 - int24s, */ \ + /* 2873 - int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 2622 - int32s, */ \ + /* 2876 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2626 - int40s, */ \ + /* 2880 - int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2631 - int48s, */ \ + /* 2885 - int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2637 - int56s, */ \ + /* 2891 - int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2644 - int64s, */ \ + /* 2898 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2652 - float_single, */ \ + /* 2906 - float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2656 - float_double, */ \ + /* 2910 - float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2664 - epoch_us, */ \ + /* 2918 - epoch_us, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2672 - epoch_s, */ \ + /* 2926 - epoch_s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2676 - list_long_octet_string, */ \ + /* 2930 - list_long_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1269,71 +1305,71 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3676 - nullable_bitmap32, */ \ + /* 3930 - nullable_bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3680 - nullable_bitmap64, */ \ + /* 3934 - nullable_bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3688 - nullable_int24u, */ \ + /* 3942 - nullable_int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 3691 - nullable_int32u, */ \ + /* 3945 - nullable_int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3695 - nullable_int40u, */ \ + /* 3949 - nullable_int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3700 - nullable_int48u, */ \ + /* 3954 - nullable_int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3706 - nullable_int56u, */ \ + /* 3960 - nullable_int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3713 - nullable_int64u, */ \ + /* 3967 - nullable_int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3721 - nullable_int24s, */ \ + /* 3975 - nullable_int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 3724 - nullable_int32s, */ \ + /* 3978 - nullable_int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3728 - nullable_int40s, */ \ + /* 3982 - nullable_int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3733 - nullable_int48s, */ \ + /* 3987 - nullable_int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3739 - nullable_int56s, */ \ + /* 3993 - nullable_int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3746 - nullable_int64s, */ \ + /* 4000 - nullable_int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3754 - nullable_float_single, */ \ + /* 4008 - nullable_float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3758 - nullable_float_double, */ \ + /* 4012 - nullable_float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server), little-endian */ \ \ - /* 3766 - measurement type, */ \ + /* 4020 - measurement type, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3770 - total active power, */ \ + /* 4024 - total active power, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: On/Off (server), little-endian */ \ \ - /* 3774 - FeatureMap, */ \ + /* 4028 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (144) +#define GENERATED_DEFAULTS_COUNT (145) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -1426,7 +1462,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 601 +#define GENERATED_ATTRIBUTE_COUNT 605 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1484,8 +1520,8 @@ { 0x0012, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* UniqueID */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ - /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + /* Endpoint: 0, Cluster: OTA Software Update Provider (client) */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -1495,35 +1531,39 @@ { 0x0003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x0002, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(21) }, /* SupportedLocales */ \ + \ /* 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) */ \ - { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(21) }, /* Breadcrumb */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(29) }, /* BasicCommissioningInfoList */ \ + { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(275) }, /* Breadcrumb */ \ + { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(283) }, /* 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(283) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(537) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(287) }, /* Networks */ \ + { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(541) }, /* Networks */ \ { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ { 0x0004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x0006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(299) }, /* LastConnectErrorValue */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(303) }, /* FeatureMap */ \ + { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(553) }, /* LastConnectErrorValue */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(557) }, /* 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(307) }, /* UpTime */ \ - { 0x0003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(315) }, /* TotalOperationalHours */ \ + { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(561) }, /* UpTime */ \ + { 0x0003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(569) }, /* 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 */ \ @@ -1532,23 +1572,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(319) }, /* CurrentHeapFree */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(327) }, /* CurrentHeapUsed */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(335) }, /* CurrentHeapHighWatermark */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(343) }, /* FeatureMap */ \ + { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(573) }, /* CurrentHeapFree */ \ + { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(581) }, /* CurrentHeapUsed */ \ + { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(589) }, /* CurrentHeapHighWatermark */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(597) }, /* 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(347) }, /* NetworkName */ \ + { 0x0002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(601) }, /* NetworkName */ \ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(349) }, /* ExtendedPanId */ \ + { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(603) }, /* ExtendedPanId */ \ { 0x0005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(357) }, /* OverrunCount */ \ + { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(611) }, /* 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(365) }, /* PartitionId */ \ + { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(619) }, /* 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 */ \ @@ -1561,50 +1601,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(369) }, /* TxTotalCount */ \ - { 0x0017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(373) }, /* TxUnicastCount */ \ - { 0x0018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(377) }, /* TxBroadcastCount */ \ - { 0x0019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(381) }, /* TxAckRequestedCount */ \ - { 0x001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(385) }, /* TxAckedCount */ \ - { 0x001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(389) }, /* TxNoAckRequestedCount */ \ - { 0x001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(393) }, /* TxDataCount */ \ - { 0x001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(397) }, /* TxDataPollCount */ \ - { 0x001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(401) }, /* TxBeaconCount */ \ - { 0x001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(405) }, /* TxBeaconRequestCount */ \ - { 0x0020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(409) }, /* TxOtherCount */ \ - { 0x0021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(413) }, /* TxRetryCount */ \ - { 0x0022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(417) }, /* TxDirectMaxRetryExpiryCount */ \ - { 0x0023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(421) }, /* TxIndirectMaxRetryExpiryCount */ \ - { 0x0024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(425) }, /* TxErrCcaCount */ \ - { 0x0025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(429) }, /* TxErrAbortCount */ \ - { 0x0026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(433) }, /* TxErrBusyChannelCount */ \ - { 0x0027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(437) }, /* RxTotalCount */ \ - { 0x0028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(441) }, /* RxUnicastCount */ \ - { 0x0029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(445) }, /* RxBroadcastCount */ \ - { 0x002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(449) }, /* RxDataCount */ \ - { 0x002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(453) }, /* RxDataPollCount */ \ - { 0x002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(457) }, /* RxBeaconCount */ \ - { 0x002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(461) }, /* RxBeaconRequestCount */ \ - { 0x002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(465) }, /* RxOtherCount */ \ - { 0x002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(469) }, /* RxAddressFilteredCount */ \ - { 0x0030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(473) }, /* RxDestAddrFilteredCount */ \ - { 0x0031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(477) }, /* RxDuplicatedCount */ \ - { 0x0032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(481) }, /* RxErrNoFrameCount */ \ - { 0x0033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(485) }, /* RxErrUnknownNeighborCount */ \ - { 0x0034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(489) }, /* RxErrInvalidSrcAddrCount */ \ - { 0x0035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(493) }, /* RxErrSecCount */ \ - { 0x0036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(497) }, /* RxErrFcsCount */ \ - { 0x0037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(501) }, /* RxErrOtherCount */ \ - { 0x0038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(505) }, /* ActiveTimestamp */ \ - { 0x0039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(513) }, /* PendingTimestamp */ \ - { 0x003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(521) }, /* delay */ \ + { 0x0016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(623) }, /* TxTotalCount */ \ + { 0x0017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(627) }, /* TxUnicastCount */ \ + { 0x0018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(631) }, /* TxBroadcastCount */ \ + { 0x0019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(635) }, /* TxAckRequestedCount */ \ + { 0x001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(639) }, /* TxAckedCount */ \ + { 0x001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(643) }, /* TxNoAckRequestedCount */ \ + { 0x001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(647) }, /* TxDataCount */ \ + { 0x001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(651) }, /* TxDataPollCount */ \ + { 0x001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(655) }, /* TxBeaconCount */ \ + { 0x001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(659) }, /* TxBeaconRequestCount */ \ + { 0x0020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(663) }, /* TxOtherCount */ \ + { 0x0021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(667) }, /* TxRetryCount */ \ + { 0x0022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(671) }, /* TxDirectMaxRetryExpiryCount */ \ + { 0x0023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(675) }, /* TxIndirectMaxRetryExpiryCount */ \ + { 0x0024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(679) }, /* TxErrCcaCount */ \ + { 0x0025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(683) }, /* TxErrAbortCount */ \ + { 0x0026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(687) }, /* TxErrBusyChannelCount */ \ + { 0x0027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(691) }, /* RxTotalCount */ \ + { 0x0028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(695) }, /* RxUnicastCount */ \ + { 0x0029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(699) }, /* RxBroadcastCount */ \ + { 0x002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(703) }, /* RxDataCount */ \ + { 0x002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(707) }, /* RxDataPollCount */ \ + { 0x002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(711) }, /* RxBeaconCount */ \ + { 0x002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(715) }, /* RxBeaconRequestCount */ \ + { 0x002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(719) }, /* RxOtherCount */ \ + { 0x002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(723) }, /* RxAddressFilteredCount */ \ + { 0x0030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(727) }, /* RxDestAddrFilteredCount */ \ + { 0x0031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(731) }, /* RxDuplicatedCount */ \ + { 0x0032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(735) }, /* RxErrNoFrameCount */ \ + { 0x0033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(739) }, /* RxErrUnknownNeighborCount */ \ + { 0x0034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(743) }, /* RxErrInvalidSrcAddrCount */ \ + { 0x0035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(747) }, /* RxErrSecCount */ \ + { 0x0036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(751) }, /* RxErrFcsCount */ \ + { 0x0037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(755) }, /* RxErrOtherCount */ \ + { 0x0038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(759) }, /* ActiveTimestamp */ \ + { 0x0039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(767) }, /* PendingTimestamp */ \ + { 0x003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(775) }, /* 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(525) }, /* ChannelMask */ \ + { 0x003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(779) }, /* 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(532) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(786) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ @@ -1613,28 +1653,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(536) }, /* BeaconLostCount */ \ - { 0x0006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(540) }, /* BeaconRxCount */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(544) }, /* PacketMulticastRxCount */ \ - { 0x0008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(548) }, /* PacketMulticastTxCount */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(552) }, /* PacketUnicastRxCount */ \ - { 0x000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(556) }, /* PacketUnicastTxCount */ \ - { 0x000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(560) }, /* CurrentMaxRate */ \ - { 0x000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(568) }, /* OverrunCount */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(576) }, /* FeatureMap */ \ + { 0x0005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(790) }, /* BeaconLostCount */ \ + { 0x0006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(794) }, /* BeaconRxCount */ \ + { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(798) }, /* PacketMulticastRxCount */ \ + { 0x0008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(802) }, /* PacketMulticastTxCount */ \ + { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(806) }, /* PacketUnicastRxCount */ \ + { 0x000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(810) }, /* PacketUnicastTxCount */ \ + { 0x000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(814) }, /* CurrentMaxRate */ \ + { 0x000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(822) }, /* OverrunCount */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(830) }, /* 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(580) }, /* PacketRxCount */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(588) }, /* PacketTxCount */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(596) }, /* TxErrCount */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(604) }, /* CollisionCount */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(612) }, /* OverrunCount */ \ + { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(834) }, /* PacketRxCount */ \ + { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(842) }, /* PacketTxCount */ \ + { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(850) }, /* TxErrCount */ \ + { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(858) }, /* CollisionCount */ \ + { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(866) }, /* OverrunCount */ \ { 0x0007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x0008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(620) }, /* TimeSinceReset */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(628) }, /* FeatureMap */ \ + { 0x0008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(874) }, /* TimeSinceReset */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(882) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ @@ -1701,7 +1741,7 @@ { 0x4001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OnTime */ \ { 0x4002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OffWaitTime */ \ { 0x4003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(632) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(886) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ @@ -1757,29 +1797,33 @@ { 0x0002, ZAP_TYPE(LONG_CHAR_STRING), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* setup url */ \ { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ + /* Endpoint: 1, Cluster: Localization Configuration (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* SupportedLocales */ \ + \ /* Endpoint: 1, Cluster: Power Source (server) */ \ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Status */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Order */ \ { 0x0002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_EMPTY_DEFAULT() }, /* Description */ \ - { 0x000B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(636) }, /* BatteryVoltage */ \ + { 0x000B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(890) }, /* BatteryVoltage */ \ { 0x000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryPercentRemaining */ \ - { 0x000D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(640) }, /* BatteryTimeRemaining */ \ + { 0x000D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(894) }, /* BatteryTimeRemaining */ \ { 0x000E, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeLevel */ \ - { 0x0012, ZAP_TYPE(ARRAY), 8, 0, ZAP_LONG_DEFAULTS_INDEX(644) }, /* ActiveBatteryFaults */ \ + { 0x0012, ZAP_TYPE(ARRAY), 8, 0, ZAP_LONG_DEFAULTS_INDEX(898) }, /* ActiveBatteryFaults */ \ { 0x001A, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeState */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(652) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(906) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Network Commissioning (server) */ \ { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(656) }, /* Networks */ \ + { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(910) }, /* Networks */ \ { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ { 0x0004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x0006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(668) }, /* LastConnectErrorValue */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(672) }, /* FeatureMap */ \ + { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(922) }, /* LastConnectErrorValue */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(926) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ @@ -1789,11 +1833,11 @@ { 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(676) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(930) }, /* 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(680) }, /* label list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(934) }, /* label list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: User Label (server) */ \ @@ -1810,7 +1854,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(934) }, /* Description */ \ + { 0x0004, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(1188) }, /* Description */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Door Lock (server) */ \ @@ -1823,8 +1867,8 @@ { 0x0017, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MaxPINCodeLength */ \ { 0x0018, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MinPINCodeLength */ \ { 0x001B, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* CredentialRulesSupport */ \ - { 0x0021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(941) }, /* Language */ \ - { 0x0023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(944) }, /* AutoRelockTime */ \ + { 0x0021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1195) }, /* Language */ \ + { 0x0023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1198) }, /* AutoRelockTime */ \ { 0x0024, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(5) }, /* SoundVolume */ \ { 0x0025, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -1863,10 +1907,10 @@ { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitTilt */ \ { 0x0013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitTilt */ \ { 0x0017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* Mode */ \ - { 0x001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* SafetyStatus */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(948) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* Mode */ \ + { 0x001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* SafetyStatus */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1202) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Barrier Control (server) */ \ { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* barrier moving state */ \ @@ -1895,17 +1939,17 @@ { 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(952) }, /* LifetimeRunningHours */ \ - { 0x0016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(955) }, /* Power */ \ + ZAP_LONG_DEFAULTS_INDEX(1206) }, /* LifetimeRunningHours */ \ + { 0x0016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(1209) }, /* Power */ \ { 0x0017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(958) }, /* LifetimeEnergyConsumed */ \ + ZAP_LONG_DEFAULTS_INDEX(1212) }, /* LifetimeEnergyConsumed */ \ { 0x0020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(10) }, /* OperationMode */ \ { 0x0021, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(11) }, /* ControlMode */ \ - { 0x0022, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* AlarmMask */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(962) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(11) }, /* ControlMode */ \ + { 0x0022, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* AlarmMask */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1216) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ { 0x0000, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* local temperature */ \ @@ -1930,12 +1974,12 @@ { 0x001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(17) }, /* control sequence of operation */ \ { 0x001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(18) }, /* system mode */ \ - { 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(966) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(18) }, /* system mode */ \ + { 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(1220) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ { 0x0000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -2052,37 +2096,37 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: IAS Zone (server) */ \ - { 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(970) }, /* 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 */ \ + { 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(1224) }, /* 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 */ \ \ /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { 0x0000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* wake on lan mac address */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Channel (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(978) }, /* channel list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1232) }, /* channel list */ \ + { 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(1232) }, /* target navigator list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1486) }, /* target navigator list */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current navigator target */ \ { 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(EPOCH_US), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1486) }, /* start time */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1494) }, /* duration */ \ - { 0x0004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1502) }, /* playback speed */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1506) }, /* seek range end */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1514) }, /* seek range start */ \ + { 0x0001, ZAP_TYPE(EPOCH_US), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1740) }, /* start time */ \ + { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1748) }, /* duration */ \ + { 0x0004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1756) }, /* playback speed */ \ + { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1760) }, /* seek range end */ \ + { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1768) }, /* 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(1522) }, /* media input list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1776) }, /* 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 */ \ \ @@ -2093,18 +2137,18 @@ { 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(1776) }, /* accept header list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2030) }, /* accept header list */ \ { 0x0001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(2030) }, /* supported streaming protocols */ \ + ZAP_LONG_DEFAULTS_INDEX(2284) }, /* supported streaming protocols */ \ { 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(2034) }, /* audio output list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2288) }, /* 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(2288) }, /* application launcher list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2542) }, /* application launcher list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Basic (server) */ \ @@ -2114,7 +2158,7 @@ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* product id */ \ { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ { 0x0006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ - { 0x0007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2542) }, /* allowed vendor list */ \ + { 0x0007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2796) }, /* allowed vendor list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Account Login (server) */ \ @@ -2124,28 +2168,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(2574) }, /* bitmap32 */ \ - { 0x0004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2578) }, /* bitmap64 */ \ + { 0x0003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2828) }, /* bitmap32 */ \ + { 0x0004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2832) }, /* 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(2586) }, /* int24u */ \ - { 0x0008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2589) }, /* int32u */ \ - { 0x0009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2593) }, /* int40u */ \ - { 0x000A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2598) }, /* int48u */ \ - { 0x000B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2604) }, /* int56u */ \ - { 0x000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2611) }, /* int64u */ \ + { 0x0007, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2840) }, /* int24u */ \ + { 0x0008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2843) }, /* int32u */ \ + { 0x0009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2847) }, /* int40u */ \ + { 0x000A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2852) }, /* int48u */ \ + { 0x000B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2858) }, /* int56u */ \ + { 0x000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2865) }, /* 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(2619) }, /* int24s */ \ - { 0x0010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2622) }, /* int32s */ \ - { 0x0011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2626) }, /* int40s */ \ - { 0x0012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2631) }, /* int48s */ \ - { 0x0013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2637) }, /* int56s */ \ - { 0x0014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2644) }, /* int64s */ \ + { 0x000F, ZAP_TYPE(INT24S), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2873) }, /* int24s */ \ + { 0x0010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2876) }, /* int32s */ \ + { 0x0011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2880) }, /* int40s */ \ + { 0x0012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2885) }, /* int48s */ \ + { 0x0013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2891) }, /* int56s */ \ + { 0x0014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2898) }, /* 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(2652) }, /* float_single */ \ - { 0x0018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2656) }, /* float_double */ \ + { 0x0017, ZAP_TYPE(SINGLE), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2906) }, /* float_single */ \ + { 0x0018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2910) }, /* 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 */ \ @@ -2158,8 +2202,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(2664) }, /* epoch_us */ \ - { 0x0021, ZAP_TYPE(EPOCH_S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2672) }, /* epoch_s */ \ + { 0x0020, ZAP_TYPE(EPOCH_US), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2918) }, /* epoch_us */ \ + { 0x0021, ZAP_TYPE(EPOCH_S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2926) }, /* 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_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* list_nullables_and_optionals_struct */ \ @@ -2174,7 +2218,7 @@ ZAP_MIN_MAX_DEFAULTS_INDEX(33) }, /* range_restricted_int16u */ \ { 0x0029, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(34) }, /* range_restricted_int16s */ \ - { 0x002A, ZAP_TYPE(ARRAY), 1000, 0, ZAP_LONG_DEFAULTS_INDEX(2676) }, /* list_long_octet_string */ \ + { 0x002A, ZAP_TYPE(ARRAY), 1000, 0, ZAP_LONG_DEFAULTS_INDEX(2930) }, /* list_long_octet_string */ \ { 0x0030, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(MUST_USE_TIMED_WRITE), \ ZAP_EMPTY_DEFAULT() }, /* timed_write_boolean */ \ { 0x8000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ @@ -2184,49 +2228,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(3676) }, /* nullable_bitmap32 */ \ + ZAP_LONG_DEFAULTS_INDEX(3930) }, /* nullable_bitmap32 */ \ { 0x8004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3680) }, /* nullable_bitmap64 */ \ + ZAP_LONG_DEFAULTS_INDEX(3934) }, /* 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(3688) }, /* nullable_int24u */ \ + ZAP_LONG_DEFAULTS_INDEX(3942) }, /* nullable_int24u */ \ { 0x8008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3691) }, /* nullable_int32u */ \ + ZAP_LONG_DEFAULTS_INDEX(3945) }, /* nullable_int32u */ \ { 0x8009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3695) }, /* nullable_int40u */ \ + ZAP_LONG_DEFAULTS_INDEX(3949) }, /* nullable_int40u */ \ { 0x800A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3700) }, /* nullable_int48u */ \ + ZAP_LONG_DEFAULTS_INDEX(3954) }, /* nullable_int48u */ \ { 0x800B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3706) }, /* nullable_int56u */ \ + ZAP_LONG_DEFAULTS_INDEX(3960) }, /* nullable_int56u */ \ { 0x800C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3713) }, /* nullable_int64u */ \ + ZAP_LONG_DEFAULTS_INDEX(3967) }, /* 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(3721) }, /* nullable_int24s */ \ + ZAP_LONG_DEFAULTS_INDEX(3975) }, /* nullable_int24s */ \ { 0x8010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3724) }, /* nullable_int32s */ \ + ZAP_LONG_DEFAULTS_INDEX(3978) }, /* nullable_int32s */ \ { 0x8011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3728) }, /* nullable_int40s */ \ + ZAP_LONG_DEFAULTS_INDEX(3982) }, /* nullable_int40s */ \ { 0x8012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3733) }, /* nullable_int48s */ \ + ZAP_LONG_DEFAULTS_INDEX(3987) }, /* nullable_int48s */ \ { 0x8013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3739) }, /* nullable_int56s */ \ + ZAP_LONG_DEFAULTS_INDEX(3993) }, /* nullable_int56s */ \ { 0x8014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3746) }, /* nullable_int64s */ \ + ZAP_LONG_DEFAULTS_INDEX(4000) }, /* 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(3754) }, /* nullable_float_single */ \ + ZAP_LONG_DEFAULTS_INDEX(4008) }, /* nullable_float_single */ \ { 0x8018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3758) }, /* nullable_float_double */ \ + ZAP_LONG_DEFAULTS_INDEX(4012) }, /* 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), \ @@ -2251,8 +2295,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(3766) }, /* measurement type */ \ - { 0x0304, ZAP_TYPE(INT32S), 4, 0, ZAP_LONG_DEFAULTS_INDEX(3770) }, /* total active power */ \ + { 0x0000, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4020) }, /* measurement type */ \ + { 0x0304, ZAP_TYPE(INT32S), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4024) }, /* 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 */ \ @@ -2274,7 +2318,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(3774) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4028) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ @@ -2342,7 +2386,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 73 +#define GENERATED_CLUSTER_COUNT 75 #define GENERATED_CLUSTERS \ { \ { 0x0003, \ @@ -2373,253 +2417,259 @@ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x0029, ZAP_ATTRIBUTE_INDEX(34), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ - }, /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ + 0x0029, ZAP_ATTRIBUTE_INDEX(34), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + }, /* Endpoint: 0, Cluster: OTA Software Update Provider (client) */ \ { \ 0x002A, ZAP_ATTRIBUTE_INDEX(35), 5, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { \ - 0x002E, ZAP_ATTRIBUTE_INDEX(40), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(40), 2, 290, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { \ + 0x002E, ZAP_ATTRIBUTE_INDEX(42), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Power Source Configuration (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(42), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0030, ZAP_ATTRIBUTE_INDEX(44), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(48), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(50), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(58), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(60), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(58), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(60), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(67), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(69), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(73), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(75), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(138), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(140), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(153), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(155), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(164), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(166), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(168), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(170), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x003F, ZAP_ATTRIBUTE_INDEX(174), 5, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003F, ZAP_ATTRIBUTE_INDEX(176), 5, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Group Key Management (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(179), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(181), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(181), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(183), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(183), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0405, ZAP_ATTRIBUTE_INDEX(185), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Relative Humidity Measurement (server) */ \ { 0x0003, \ - ZAP_ATTRIBUTE_INDEX(187), \ + ZAP_ATTRIBUTE_INDEX(189), \ 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(190), \ + ZAP_ATTRIBUTE_INDEX(192), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 1, Cluster: Groups (server) */ \ { 0x0005, \ - ZAP_ATTRIBUTE_INDEX(192), \ + ZAP_ATTRIBUTE_INDEX(194), \ 6, \ 8, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayScenesServer }, /* Endpoint: 1, Cluster: Scenes (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(198), \ + ZAP_ATTRIBUTE_INDEX(200), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { \ - 0x0007, ZAP_ATTRIBUTE_INDEX(205), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0007, ZAP_ATTRIBUTE_INDEX(207), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ { 0x0008, \ - ZAP_ATTRIBUTE_INDEX(208), \ + ZAP_ATTRIBUTE_INDEX(210), \ 15, \ 23, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x000F, ZAP_ATTRIBUTE_INDEX(223), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x000F, ZAP_ATTRIBUTE_INDEX(225), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(227), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(229), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x001E, ZAP_ATTRIBUTE_INDEX(232), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001E, ZAP_ATTRIBUTE_INDEX(234), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binding (server) */ \ { \ - 0x0025, ZAP_ATTRIBUTE_INDEX(233), 4, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0025, ZAP_ATTRIBUTE_INDEX(235), 4, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Actions (server) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(237), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(239), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 1, Cluster: Localization Configuration (server) */ \ + { \ + 0x002F, ZAP_ATTRIBUTE_INDEX(241), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Power Source (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(248), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(252), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Network Commissioning (server) */ \ { \ - 0x0039, ZAP_ATTRIBUTE_INDEX(258), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0039, ZAP_ATTRIBUTE_INDEX(262), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ { \ - 0x003B, ZAP_ATTRIBUTE_INDEX(259), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003B, ZAP_ATTRIBUTE_INDEX(263), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(264), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(268), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(266), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(270), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: User Label (server) */ \ { \ - 0x0045, ZAP_ATTRIBUTE_INDEX(268), 2, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0045, ZAP_ATTRIBUTE_INDEX(272), 2, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Boolean State (server) */ \ { \ - 0x0050, ZAP_ATTRIBUTE_INDEX(270), 6, 38, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0050, ZAP_ATTRIBUTE_INDEX(274), 6, 38, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Mode Select (server) */ \ { 0x0101, \ - ZAP_ATTRIBUTE_INDEX(276), \ + ZAP_ATTRIBUTE_INDEX(280), \ 19, \ 29, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayDoorLockServer }, /* Endpoint: 1, Cluster: Door Lock (server) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(295), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0102, ZAP_ATTRIBUTE_INDEX(299), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (server) */ \ { \ - 0x0103, ZAP_ATTRIBUTE_INDEX(315), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0103, ZAP_ATTRIBUTE_INDEX(319), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Barrier Control (server) */ \ { \ 0x0200, \ - ZAP_ATTRIBUTE_INDEX(320), \ + ZAP_ATTRIBUTE_INDEX(324), \ 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(346), \ + ZAP_ATTRIBUTE_INDEX(350), \ 19, \ 34, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayThermostatServer }, /* Endpoint: 1, Cluster: Thermostat (server) */ \ { \ 0x0204, \ - ZAP_ATTRIBUTE_INDEX(365), \ + ZAP_ATTRIBUTE_INDEX(369), \ 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(369), \ + ZAP_ATTRIBUTE_INDEX(373), \ 53, \ 341, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { \ - 0x0400, ZAP_ATTRIBUTE_INDEX(422), 6, 11, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0400, ZAP_ATTRIBUTE_INDEX(426), 6, 11, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Illuminance Measurement (server) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(428), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(432), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(433), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0403, ZAP_ATTRIBUTE_INDEX(437), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(437), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0404, ZAP_ATTRIBUTE_INDEX(441), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(442), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0405, ZAP_ATTRIBUTE_INDEX(446), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(447), \ + ZAP_ATTRIBUTE_INDEX(451), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOccupancySensingServer }, /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ { 0x0500, \ - ZAP_ATTRIBUTE_INDEX(451), \ + ZAP_ATTRIBUTE_INDEX(455), \ 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(457), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0503, ZAP_ATTRIBUTE_INDEX(461), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(459), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(463), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Channel (server) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(461), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(465), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(464), 7, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(468), 7, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (server) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(471), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(475), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Input (server) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(474), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0508, ZAP_ATTRIBUTE_INDEX(478), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Low Power (server) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(475), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(479), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(476), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(480), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(479), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(483), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (server) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(482), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(486), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(484), 8, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(488), 8, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(492), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(496), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Account Login (server) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(493), 78, 3285, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050F, ZAP_ATTRIBUTE_INDEX(497), 78, 3285, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (server) */ \ { \ - 0x0B04, ZAP_ATTRIBUTE_INDEX(571), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0B04, ZAP_ATTRIBUTE_INDEX(575), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ { 0x0004, \ - ZAP_ATTRIBUTE_INDEX(583), \ + ZAP_ATTRIBUTE_INDEX(587), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 2, Cluster: Groups (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(585), \ + ZAP_ATTRIBUTE_INDEX(589), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(592), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(596), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(597), \ + ZAP_ATTRIBUTE_INDEX(601), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2631,7 +2681,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 23, 1465 }, { ZAP_CLUSTER_INDEX(23), 46, 6170 }, { ZAP_CLUSTER_INDEX(69), 4, 21 }, \ + { ZAP_CLUSTER_INDEX(0), 24, 1755 }, { ZAP_CLUSTER_INDEX(24), 47, 6206 }, { ZAP_CLUSTER_INDEX(71), 4, 21 }, \ } // Largest attribute size is needed for various buffers @@ -2641,7 +2691,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (689) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (7656) +#define ATTRIBUTE_MAX_SIZE (7982) // 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 0484734aa48c82..1f00a31f29ed1b 100644 --- a/zzz_generated/all-clusters-app/zap-generated/gen_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/gen_config.h @@ -61,12 +61,13 @@ #define EMBER_AF_ILLUMINANCE_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_KEYPAD_INPUT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (2) #define EMBER_AF_LOW_POWER_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_MEDIA_INPUT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_MEDIA_PLAYBACK_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_MODE_SELECT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (2) -#define EMBER_AF_OTA_PROVIDER_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_OTA_PROVIDER_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_OTA_REQUESTOR_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OCCUPANCY_SENSING_CLUSTER_SERVER_ENDPOINT_COUNT (2) #define EMBER_AF_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT (2) @@ -263,6 +264,11 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 +// Use this macro to check if the server side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + // Use this macro to check if the server side of the Low Power cluster is included #define ZCL_USING_LOW_POWER_CLUSTER_SERVER #define EMBER_AF_PLUGIN_LOW_POWER_SERVER @@ -288,10 +294,9 @@ #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING_SERVER #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING -// Use this macro to check if the server side of the OTA Software Update Provider cluster is included -#define ZCL_USING_OTA_PROVIDER_CLUSTER_SERVER -#define EMBER_AF_PLUGIN_OTA_SOFTWARE_UPDATE_PROVIDER_SERVER -#define EMBER_AF_PLUGIN_OTA_SOFTWARE_UPDATE_PROVIDER +// Use this macro to check if the client side of the OTA Software Update Provider cluster is included +#define ZCL_USING_OTA_PROVIDER_CLUSTER_CLIENT +#define EMBER_AF_PLUGIN_OTA_SOFTWARE_UPDATE_PROVIDER_CLIENT // Use this macro to check if the server side of the OTA Software Update Requestor cluster is included #define ZCL_USING_OTA_REQUESTOR_CLUSTER_SERVER diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index 8e9200bfb34abb..f88d21cd6be73f 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -22,6 +22,53 @@ namespace chip { namespace app { namespace Clusters { + +namespace detail { +// Structs shared across multiple clusters. +namespace Structs { +namespace LabelStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLabel)), label)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kValue)), value)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + err = reader.EnterContainer(outer); + ReturnErrorOnFailure(err); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kLabel): + ReturnErrorOnFailure(DataModel::Decode(reader, label)); + break; + case to_underlying(Fields::kValue): + ReturnErrorOnFailure(DataModel::Decode(reader, value)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} + +} // namespace LabelStruct +} // namespace Structs +} // namespace detail + namespace PowerConfiguration { namespace Commands { @@ -10639,46 +10686,6 @@ namespace Events { } // namespace GroupKeyManagement namespace FixedLabel { namespace Structs { -namespace LabelStruct { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const -{ - TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLabel)), label)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kValue)), value)); - ReturnErrorOnFailure(writer.EndContainer(outer)); - return CHIP_NO_ERROR; -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVType outer; - VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); - err = reader.EnterContainer(outer); - ReturnErrorOnFailure(err); - while ((err = reader.Next()) == CHIP_NO_ERROR) - { - VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); - switch (TLV::TagNumFromTag(reader.GetTag())) - { - case to_underlying(Fields::kLabel): - ReturnErrorOnFailure(DataModel::Decode(reader, label)); - break; - case to_underlying(Fields::kValue): - ReturnErrorOnFailure(DataModel::Decode(reader, value)); - break; - default: - break; - } - } - - VerifyOrReturnError(err == CHIP_END_OF_TLV, err); - ReturnErrorOnFailure(reader.ExitContainer(outer)); - return CHIP_NO_ERROR; -} - -} // namespace LabelStruct } // namespace Structs namespace Commands { @@ -10715,46 +10722,6 @@ namespace Events { } // namespace FixedLabel namespace UserLabel { namespace Structs { -namespace LabelStruct { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const -{ - TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLabel)), label)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kValue)), value)); - ReturnErrorOnFailure(writer.EndContainer(outer)); - return CHIP_NO_ERROR; -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVType outer; - VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); - err = reader.EnterContainer(outer); - ReturnErrorOnFailure(err); - while ((err = reader.Next()) == CHIP_NO_ERROR) - { - VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); - switch (TLV::TagNumFromTag(reader.GetTag())) - { - case to_underlying(Fields::kLabel): - ReturnErrorOnFailure(DataModel::Decode(reader, label)); - break; - case to_underlying(Fields::kValue): - ReturnErrorOnFailure(DataModel::Decode(reader, value)); - break; - default: - break; - } - } - - VerifyOrReturnError(err == CHIP_END_OF_TLV, err); - ReturnErrorOnFailure(reader.ExitContainer(outer)); - return CHIP_NO_ERROR; -} - -} // namespace LabelStruct } // namespace Structs namespace Commands { 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 89f5b534549069..8064d67fa1195a 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 @@ -37,6 +37,32 @@ namespace chip { namespace app { namespace Clusters { +namespace detail { +// Structs shared across multiple clusters. +namespace Structs { +namespace LabelStruct { +enum class Fields +{ + kLabel = 1, + kValue = 2, +}; + +struct Type +{ +public: + chip::CharSpan label; + chip::CharSpan value; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; + +using DecodableType = Type; + +} // namespace LabelStruct +} // namespace Structs +} // namespace detail + namespace PowerConfiguration { namespace Attributes { @@ -15459,26 +15485,7 @@ struct TypeInfo namespace FixedLabel { namespace Structs { -namespace LabelStruct { -enum class Fields -{ - kLabel = 1, - kValue = 2, -}; - -struct Type -{ -public: - chip::CharSpan label; - chip::CharSpan value; - - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; - -using DecodableType = Type; - -} // namespace LabelStruct +namespace LabelStruct = Clusters::detail::Structs::LabelStruct; } // namespace Structs namespace Attributes { @@ -15552,26 +15559,7 @@ struct TypeInfo namespace UserLabel { namespace Structs { -namespace LabelStruct { -enum class Fields -{ - kLabel = 1, - kValue = 2, -}; - -struct Type -{ -public: - chip::CharSpan label; - chip::CharSpan value; - - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; - -using DecodableType = Type; - -} // namespace LabelStruct +namespace LabelStruct = Clusters::detail::Structs::LabelStruct; } // namespace Structs namespace Attributes { diff --git a/zzz_generated/bridge-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/bridge-app/zap-generated/PluginApplicationCallbacks.h index a396b014b04a5f..6433919a7732e5 100644 --- a/zzz_generated/bridge-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/bridge-app/zap-generated/PluginApplicationCallbacks.h @@ -31,6 +31,7 @@ MatterGeneralCommissioningPluginServerInitCallback(); \ MatterGeneralDiagnosticsPluginServerInitCallback(); \ MatterLevelControlPluginServerInitCallback(); \ + MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ MatterOnOffPluginServerInitCallback(); \ MatterOperationalCredentialsPluginServerInitCallback(); \ diff --git a/zzz_generated/bridge-app/zap-generated/callback-stub.cpp b/zzz_generated/bridge-app/zap-generated/callback-stub.cpp index d56d5611cc11df..db808e845ccbf2 100644 --- a/zzz_generated/bridge-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/bridge-app/zap-generated/callback-stub.cpp @@ -56,6 +56,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_LEVEL_CONTROL_CLUSTER_ID: emberAfLevelControlClusterInitCallback(endpoint); break; + case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: emberAfNetworkCommissioningClusterInitCallback(endpoint); break; @@ -131,6 +134,11 @@ void __attribute__((weak)) emberAfLevelControlClusterInitCallback(EndpointId end // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfNetworkCommissioningClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/bridge-app/zap-generated/endpoint_config.h b/zzz_generated/bridge-app/zap-generated/endpoint_config.h index 24894096c77bb7..6b91a3e0efab7c 100644 --- a/zzz_generated/bridge-app/zap-generated/endpoint_config.h +++ b/zzz_generated/bridge-app/zap-generated/endpoint_config.h @@ -604,7 +604,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 182 +#define GENERATED_ATTRIBUTE_COUNT 184 #define GENERATED_ATTRIBUTES \ { \ \ @@ -632,6 +632,10 @@ { 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: Localization Configuration (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + \ /* 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 */ \ @@ -858,7 +862,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 19 +#define GENERATED_CLUSTER_COUNT 20 #define GENERATED_CLUSTERS \ { \ { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ @@ -869,61 +873,64 @@ 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 \ + 0x002B, ZAP_ATTRIBUTE_INDEX(17), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { \ + 0x0030, ZAP_ATTRIBUTE_INDEX(19), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(23), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(25), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(33), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(35), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(33), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(35), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(42), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(44), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(48), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(50), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(113), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(115), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(128), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(130), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(139), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(141), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(143), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(145), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(149), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(151), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(151), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(153), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(153), \ + ZAP_ATTRIBUTE_INDEX(155), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x0008, \ - ZAP_ATTRIBUTE_INDEX(155), \ + ZAP_ATTRIBUTE_INDEX(157), \ 15, \ 23, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(170), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(172), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x003B, ZAP_ATTRIBUTE_INDEX(175), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003B, ZAP_ATTRIBUTE_INDEX(177), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(180), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(182), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ } @@ -932,7 +939,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 14, 995 }, { ZAP_CLUSTER_INDEX(14), 5, 291 }, \ + { ZAP_CLUSTER_INDEX(0), 15, 1031 }, { ZAP_CLUSTER_INDEX(15), 5, 291 }, \ } // Largest attribute size is needed for various buffers @@ -942,7 +949,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (246) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1286) +#define ATTRIBUTE_MAX_SIZE (1322) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/bridge-app/zap-generated/gen_config.h b/zzz_generated/bridge-app/zap-generated/gen_config.h index 9803e3fc719eb2..c996e9c9ea84ab 100644 --- a/zzz_generated/bridge-app/zap-generated/gen_config.h +++ b/zzz_generated/bridge-app/zap-generated/gen_config.h @@ -38,6 +38,7 @@ #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #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) @@ -98,6 +99,11 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 +// Use this macro to check if the server side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + // Use this macro to check if the server side of the Network Commissioning cluster is included #define ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING_SERVER diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 62e06a3fe67bf4..a206875590380e 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -39,6 +39,9 @@ // generated ones, so are placed here. namespace { +CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::detail::Structs::LabelStruct::DecodableType & value); + CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Scenes::Structs::SceneExtensionFieldSet::DecodableType & value); CHIP_ERROR LogValue(const char * label, size_t indent, @@ -94,10 +97,6 @@ CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::GroupKeyManagement::Structs::GroupKey::DecodableType & value); CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::GroupKeyManagement::Structs::GroupKeySet::DecodableType & value); -CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::FixedLabel::Structs::LabelStruct::DecodableType & value); -CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::UserLabel::Structs::LabelStruct::DecodableType & value); CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ModeSelect::Structs::ModeOptionStruct::DecodableType & value); CHIP_ERROR LogValue(const char * label, size_t indent, @@ -268,6 +267,30 @@ CHIP_ERROR LogValue(const char * label, size_t indent, const chip::Optional & // be logging. #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-function" +CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::detail::Structs::LabelStruct::DecodableType & value) +{ + ChipLogProgress(chipTool, "%s%s: {", IndentStr(indent).c_str(), label); + { + CHIP_ERROR err = LogValue("Label", indent + 1, value.label); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Label'", IndentStr(indent + 1).c_str()); + return err; + } + } + { + CHIP_ERROR err = LogValue("Value", indent + 1, value.value); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Value'", IndentStr(indent + 1).c_str()); + return err; + } + } + ChipLogProgress(chipTool, "%s}", IndentStr(indent).c_str()); + return CHIP_NO_ERROR; +} + CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Scenes::Structs::SceneExtensionFieldSet::DecodableType & value) { @@ -1552,52 +1575,6 @@ CHIP_ERROR LogValue(const char * label, size_t indent, ChipLogProgress(chipTool, "%s}", IndentStr(indent).c_str()); return CHIP_NO_ERROR; } -CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::FixedLabel::Structs::LabelStruct::DecodableType & value) -{ - ChipLogProgress(chipTool, "%s%s: {", IndentStr(indent).c_str(), label); - { - CHIP_ERROR err = LogValue("Label", indent + 1, value.label); - if (err != CHIP_NO_ERROR) - { - ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Label'", IndentStr(indent + 1).c_str()); - return err; - } - } - { - CHIP_ERROR err = LogValue("Value", indent + 1, value.value); - if (err != CHIP_NO_ERROR) - { - ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Value'", IndentStr(indent + 1).c_str()); - return err; - } - } - ChipLogProgress(chipTool, "%s}", IndentStr(indent).c_str()); - return CHIP_NO_ERROR; -} -CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::UserLabel::Structs::LabelStruct::DecodableType & value) -{ - ChipLogProgress(chipTool, "%s%s: {", IndentStr(indent).c_str(), label); - { - CHIP_ERROR err = LogValue("Label", indent + 1, value.label); - if (err != CHIP_NO_ERROR) - { - ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Label'", IndentStr(indent + 1).c_str()); - return err; - } - } - { - CHIP_ERROR err = LogValue("Value", indent + 1, value.value); - if (err != CHIP_NO_ERROR) - { - ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Value'", IndentStr(indent + 1).c_str()); - return err; - } - } - ChipLogProgress(chipTool, "%s}", IndentStr(indent).c_str()); - return CHIP_NO_ERROR; -} CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ModeSelect::Structs::ModeOptionStruct::DecodableType & value) { @@ -3320,6 +3297,20 @@ static void OnTestClusterTestAddArgumentsResponseSuccess( command->SetCommandExitStatus(err); }; +static void OnTestClusterTestEmitTestEventResponseSuccess( + void * context, const chip::app::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType & data) +{ + ChipLogProgress(Zcl, "Received TestEmitTestEventResponse:"); + CHIP_ERROR err = CHIP_NO_ERROR; + if (err == CHIP_NO_ERROR) + { + err = LogValue("value", 1, data.value); + } + + ModelCommand * command = static_cast(context); + command->SetCommandExitStatus(err); +}; + static void OnTestClusterTestEnumsResponseSuccess(void * context, const chip::app::Clusters::TestCluster::Commands::TestEnumsResponse::DecodableType & data) @@ -3487,6 +3478,7 @@ static void OnThermostatGetWeeklyScheduleResponseSuccess( | IlluminanceMeasurement | 0x0400 | | KeypadInput | 0x0509 | | LevelControl | 0x0008 | +| LocalizationConfiguration | 0x002B | | LowPower | 0x0508 | | MediaInput | 0x0507 | | MediaPlayback | 0x0506 | @@ -22533,6 +22525,102 @@ class ReportLevelControlClusterRevision : public ModelCommand bool mWait; }; +/*----------------------------------------------------------------------------*\ +| Cluster LocalizationConfiguration | 0x002B | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * ActiveLocale | 0x0001 | +| * SupportedLocales | 0x0002 | +\*----------------------------------------------------------------------------*/ + +/* + * Attribute ActiveLocale + */ +class ReadLocalizationConfigurationActiveLocale : public ModelCommand +{ +public: + ReadLocalizationConfigurationActiveLocale() : ModelCommand("read") + { + AddArgument("attr-name", "active-locale"); + ModelCommand::AddArguments(); + } + + ~ReadLocalizationConfigurationActiveLocale() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x002B) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::LocalizationConfigurationCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, chip::CharSpan value) + { + OnGeneralAttributeResponse(context, "LocalizationConfiguration.ActiveLocale response", value); + } +}; + +class WriteLocalizationConfigurationActiveLocale : public ModelCommand +{ +public: + WriteLocalizationConfigurationActiveLocale() : ModelCommand("write") + { + AddArgument("attr-name", "active-locale"); + AddArgument("attr-value", &mValue); + ModelCommand::AddArguments(); + } + + ~WriteLocalizationConfigurationActiveLocale() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x002B) command (0x01) on endpoint %" PRIu8, endpointId); + + chip::Controller::LocalizationConfigurationCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttribute( + mValue, this, OnDefaultSuccessResponse, OnDefaultFailure, mTimedInteractionTimeoutMs); + } + +private: + chip::CharSpan mValue; +}; + +/* + * Attribute SupportedLocales + */ +class ReadLocalizationConfigurationSupportedLocales : public ModelCommand +{ +public: + ReadLocalizationConfigurationSupportedLocales() : ModelCommand("read") + { + AddArgument("attr-name", "supported-locales"); + ModelCommand::AddArguments(); + } + + ~ReadLocalizationConfigurationSupportedLocales() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x002B) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::LocalizationConfigurationCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "LocalizationConfiguration.SupportedLocales response", value); + } +}; + /*----------------------------------------------------------------------------*\ | Cluster LowPower | 0x0508 | |------------------------------------------------------------------------------| @@ -33396,6 +33484,7 @@ class ReportTemperatureMeasurementClusterRevision : public ModelCommand | * SimpleStructEchoRequest | 0x11 | | * Test | 0x00 | | * TestAddArguments | 0x04 | +| * TestEmitTestEventRequest | 0x14 | | * TestEnumsRequest | 0x0E | | * TestListInt8UArgumentRequest | 0x0A | | * TestListInt8UReverseRequest | 0x0D | @@ -33563,6 +33652,32 @@ class TestClusterTestAddArguments : public ModelCommand chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type mRequest; }; +/* + * Command TestEmitTestEventRequest + */ +class TestClusterTestEmitTestEventRequest : public ModelCommand +{ +public: + TestClusterTestEmitTestEventRequest() : ModelCommand("test-emit-test-event-request") + { + AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1); + AddArgument("Arg2", 0, UINT8_MAX, reinterpret_cast *>(&mRequest.arg2)); + AddArgument("Arg3", 0, 1, &mRequest.arg3); + ModelCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x00000014) on endpoint %" PRIu8, endpointId); + + return chip::Controller::InvokeCommand(device, this, OnTestClusterTestEmitTestEventResponseSuccess, OnDefaultFailure, + endpointId, mRequest, mTimedInteractionTimeoutMs); + } + +private: + chip::app::Clusters::TestCluster::Commands::TestEmitTestEventRequest::Type mRequest; +}; + /* * Command TestEnumsRequest */ @@ -51893,6 +52008,18 @@ void registerClusterLevelControl(Commands & commands) commands.Register(clusterName, clusterCommands); } +void registerClusterLocalizationConfiguration(Commands & commands) +{ + const char * clusterName = "LocalizationConfiguration"; + + commands_list clusterCommands = { + make_unique(), // + make_unique(), // + make_unique(), // + }; + + commands.Register(clusterName, clusterCommands); +} void registerClusterLowPower(Commands & commands) { const char * clusterName = "LowPower"; @@ -52403,6 +52530,7 @@ void registerClusterTestCluster(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -53016,6 +53144,7 @@ void registerClusters(Commands & commands) registerClusterIlluminanceMeasurement(commands); registerClusterKeypadInput(commands); registerClusterLevelControl(commands); + registerClusterLocalizationConfiguration(commands); registerClusterLowPower(commands); registerClusterMediaInput(commands); registerClusterMediaPlayback(commands); diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index d2f112ac45f91b..42f249f4f27b9a 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -743,6 +743,7 @@ class Test_TC_BI_2_1 : public TestCommand void OnSuccessResponse_9(uint8_t statusFlags) { VerifyOrReturn(CheckConstraintType("statusFlags", "", "map8")); + VerifyOrReturn(CheckConstraintMinValue("statusFlags", statusFlags, 0)); VerifyOrReturn(CheckConstraintMaxValue("statusFlags", statusFlags, 15)); NextTest(); } @@ -830,35 +831,75 @@ class Test_TC_BI_2_2 : public TestCommand break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Reads PresentValue attribute from DUT\n"); - err = ShouldSkip("A_PRESENTVALUE") ? CHIP_NO_ERROR : TestReadsPresentValueAttributeFromDut_1(); + if (ShouldSkip("A_PRESENTVALUE")) + { + NextTest(); + return; + } + err = TestReadsPresentValueAttributeFromDut_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Reads OutOfService attribute from DUT\n"); - err = ShouldSkip("A_OUTOFSERVICE") ? CHIP_NO_ERROR : TestReadsOutOfServiceAttributeFromDut_2(); + if (ShouldSkip("A_OUTOFSERVICE")) + { + NextTest(); + return; + } + err = TestReadsOutOfServiceAttributeFromDut_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Reads StatusFlags attribute from DUT\n"); - err = ShouldSkip("A_STATUSFLAGS") ? CHIP_NO_ERROR : TestReadsStatusFlagsAttributeFromDut_3(); + if (ShouldSkip("A_STATUSFLAGS")) + { + NextTest(); + return; + } + err = TestReadsStatusFlagsAttributeFromDut_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Reads PresentValue attribute from DUT\n"); - err = ShouldSkip("A_PRESENTVALUE") ? CHIP_NO_ERROR : TestReadsPresentValueAttributeFromDut_4(); + if (ShouldSkip("A_PRESENTVALUE")) + { + NextTest(); + return; + } + err = TestReadsPresentValueAttributeFromDut_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Reads OutOfService attribute from DUT\n"); - err = ShouldSkip("A_OUTOFSERVICE") ? CHIP_NO_ERROR : TestReadsOutOfServiceAttributeFromDut_5(); + if (ShouldSkip("A_OUTOFSERVICE")) + { + NextTest(); + return; + } + err = TestReadsOutOfServiceAttributeFromDut_5(); break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Reads StatusFlags attribute from DUT\n"); - err = ShouldSkip("A_STATUSFLAGS") ? CHIP_NO_ERROR : TestReadsStatusFlagsAttributeFromDut_6(); + if (ShouldSkip("A_STATUSFLAGS")) + { + NextTest(); + return; + } + err = TestReadsStatusFlagsAttributeFromDut_6(); break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Reads StatusFlags attribute from DUT\n"); - err = ShouldSkip("A_STATUSFLAGS") ? CHIP_NO_ERROR : TestReadsStatusFlagsAttributeFromDut_7(); + if (ShouldSkip("A_STATUSFLAGS")) + { + NextTest(); + return; + } + err = TestReadsStatusFlagsAttributeFromDut_7(); break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Reads StatusFlags attribute from DUT\n"); - err = ShouldSkip("A_STATUSFLAGS") ? CHIP_NO_ERROR : TestReadsStatusFlagsAttributeFromDut_8(); + if (ShouldSkip("A_STATUSFLAGS")) + { + NextTest(); + return; + } + err = TestReadsStatusFlagsAttributeFromDut_8(); break; } @@ -1999,292 +2040,324 @@ class Test_TC_CC_2_1 : public TestCommand err = TestReadTheOptionalAttributeCompensationText_73(); break; case 74: - ChipLogProgress(chipTool, " ***** Test Step 74 : Read the mandatory attribute: NumberOfPrimaries\n"); - err = TestReadTheMandatoryAttributeNumberOfPrimaries_74(); + ChipLogProgress(chipTool, " ***** Test Step 74 : Write the default values to optional attribute: CompensationText\n"); + err = TestWriteTheDefaultValuesToOptionalAttributeCompensationText_74(); break; case 75: - ChipLogProgress(chipTool, " ***** Test Step 75 : Write the default mandatory attribute: NumberOfPrimaries\n"); - err = TestWriteTheDefaultMandatoryAttributeNumberOfPrimaries_75(); + ChipLogProgress(chipTool, " ***** Test Step 75 : Reads back optional attribute: CompensationText\n"); + err = TestReadsBackOptionalAttributeCompensationText_75(); break; case 76: - ChipLogProgress(chipTool, " ***** Test Step 76 : Read back the mandatory attribute: NumberOfPrimaries\n"); - err = TestReadBackTheMandatoryAttributeNumberOfPrimaries_76(); + ChipLogProgress(chipTool, " ***** Test Step 76 : Read the mandatory attribute: NumberOfPrimaries\n"); + err = TestReadTheMandatoryAttributeNumberOfPrimaries_76(); break; case 77: - ChipLogProgress(chipTool, " ***** Test Step 77 : Read the mandatory attribute: Primary1X\n"); - err = TestReadTheMandatoryAttributePrimary1X_77(); + ChipLogProgress(chipTool, " ***** Test Step 77 : Write the default mandatory attribute: NumberOfPrimaries\n"); + err = TestWriteTheDefaultMandatoryAttributeNumberOfPrimaries_77(); break; case 78: - ChipLogProgress(chipTool, " ***** Test Step 78 : Write the default mandatory attribute: Primary1X\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary1X_78(); + ChipLogProgress(chipTool, " ***** Test Step 78 : Read back the mandatory attribute: NumberOfPrimaries\n"); + err = TestReadBackTheMandatoryAttributeNumberOfPrimaries_78(); break; case 79: - ChipLogProgress(chipTool, " ***** Test Step 79 : Read back the mandatory attribute: Primary1X\n"); - err = TestReadBackTheMandatoryAttributePrimary1X_79(); + ChipLogProgress(chipTool, " ***** Test Step 79 : Read the mandatory attribute: Primary1X\n"); + err = TestReadTheMandatoryAttributePrimary1X_79(); break; case 80: - ChipLogProgress(chipTool, " ***** Test Step 80 : Read the mandatory attribute: Primary1Y\n"); - err = TestReadTheMandatoryAttributePrimary1Y_80(); + ChipLogProgress(chipTool, " ***** Test Step 80 : Write the default mandatory attribute: Primary1X\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary1X_80(); break; case 81: - ChipLogProgress(chipTool, " ***** Test Step 81 : Write the default mandatory attribute: Primary1Y\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary1Y_81(); + ChipLogProgress(chipTool, " ***** Test Step 81 : Read back the mandatory attribute: Primary1X\n"); + err = TestReadBackTheMandatoryAttributePrimary1X_81(); break; case 82: - ChipLogProgress(chipTool, " ***** Test Step 82 : Read back the mandatory attribute: Primary1Y\n"); - err = TestReadBackTheMandatoryAttributePrimary1Y_82(); + ChipLogProgress(chipTool, " ***** Test Step 82 : Read the mandatory attribute: Primary1Y\n"); + err = TestReadTheMandatoryAttributePrimary1Y_82(); break; case 83: - ChipLogProgress(chipTool, " ***** Test Step 83 : Read the mandatory attribute: Primary1Intensity\n"); - err = TestReadTheMandatoryAttributePrimary1Intensity_83(); + ChipLogProgress(chipTool, " ***** Test Step 83 : Write the default mandatory attribute: Primary1Y\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary1Y_83(); break; case 84: - ChipLogProgress(chipTool, " ***** Test Step 84 : Read the mandatory attribute: Primary2X\n"); - err = TestReadTheMandatoryAttributePrimary2X_84(); + ChipLogProgress(chipTool, " ***** Test Step 84 : Read back the mandatory attribute: Primary1Y\n"); + err = TestReadBackTheMandatoryAttributePrimary1Y_84(); break; case 85: - ChipLogProgress(chipTool, " ***** Test Step 85 : Write the default mandatory attribute: Primary2X\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary2X_85(); + ChipLogProgress(chipTool, " ***** Test Step 85 : Read the mandatory attribute: Primary1Intensity\n"); + err = TestReadTheMandatoryAttributePrimary1Intensity_85(); break; case 86: - ChipLogProgress(chipTool, " ***** Test Step 86 : Read back the mandatory attribute: Primary2X\n"); - err = TestReadBackTheMandatoryAttributePrimary2X_86(); + ChipLogProgress(chipTool, " ***** Test Step 86 : Read the mandatory attribute: Primary2X\n"); + err = TestReadTheMandatoryAttributePrimary2X_86(); break; case 87: - ChipLogProgress(chipTool, " ***** Test Step 87 : Read the mandatory attribute: Primary2Y\n"); - err = TestReadTheMandatoryAttributePrimary2Y_87(); + ChipLogProgress(chipTool, " ***** Test Step 87 : Write the default mandatory attribute: Primary2X\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary2X_87(); break; case 88: - ChipLogProgress(chipTool, " ***** Test Step 88 : Write the default mandatory attribute: Primary2Y\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary2Y_88(); + ChipLogProgress(chipTool, " ***** Test Step 88 : Read back the mandatory attribute: Primary2X\n"); + err = TestReadBackTheMandatoryAttributePrimary2X_88(); break; case 89: - ChipLogProgress(chipTool, " ***** Test Step 89 : Read back the mandatory attribute: Primary2Y\n"); - err = TestReadBackTheMandatoryAttributePrimary2Y_89(); + ChipLogProgress(chipTool, " ***** Test Step 89 : Read the mandatory attribute: Primary2Y\n"); + err = TestReadTheMandatoryAttributePrimary2Y_89(); break; case 90: - ChipLogProgress(chipTool, " ***** Test Step 90 : Validate constraints of attribute: Primary2Intensity\n"); - err = TestValidateConstraintsOfAttributePrimary2Intensity_90(); + ChipLogProgress(chipTool, " ***** Test Step 90 : Write the default mandatory attribute: Primary2Y\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary2Y_90(); break; case 91: - ChipLogProgress(chipTool, " ***** Test Step 91 : Read the mandatory attribute: Primary3X\n"); - err = TestReadTheMandatoryAttributePrimary3X_91(); + ChipLogProgress(chipTool, " ***** Test Step 91 : Read back the mandatory attribute: Primary2Y\n"); + err = TestReadBackTheMandatoryAttributePrimary2Y_91(); break; case 92: - ChipLogProgress(chipTool, " ***** Test Step 92 : Write the default mandatory attribute: Primary3X\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary3X_92(); + ChipLogProgress(chipTool, " ***** Test Step 92 : Validate constraints of attribute: Primary2Intensity\n"); + err = TestValidateConstraintsOfAttributePrimary2Intensity_92(); break; case 93: - ChipLogProgress(chipTool, " ***** Test Step 93 : Read back the mandatory attribute: Primary3X\n"); - err = TestReadBackTheMandatoryAttributePrimary3X_93(); + ChipLogProgress(chipTool, " ***** Test Step 93 : Read the mandatory attribute: Primary3X\n"); + err = TestReadTheMandatoryAttributePrimary3X_93(); break; case 94: - ChipLogProgress(chipTool, " ***** Test Step 94 : Read the mandatory attribute: Primary3Y\n"); - err = TestReadTheMandatoryAttributePrimary3Y_94(); + ChipLogProgress(chipTool, " ***** Test Step 94 : Write the default mandatory attribute: Primary3X\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary3X_94(); break; case 95: - ChipLogProgress(chipTool, " ***** Test Step 95 : Write the default mandatory attribute: Primary3Y\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary3Y_95(); + ChipLogProgress(chipTool, " ***** Test Step 95 : Read back the mandatory attribute: Primary3X\n"); + err = TestReadBackTheMandatoryAttributePrimary3X_95(); break; case 96: - ChipLogProgress(chipTool, " ***** Test Step 96 : Read back the mandatory attribute: Primary3Y\n"); - err = TestReadBackTheMandatoryAttributePrimary3Y_96(); + ChipLogProgress(chipTool, " ***** Test Step 96 : Read the mandatory attribute: Primary3Y\n"); + err = TestReadTheMandatoryAttributePrimary3Y_96(); break; case 97: - ChipLogProgress(chipTool, " ***** Test Step 97 : Read the mandatory attribute: Primary3Intensity\n"); - err = TestReadTheMandatoryAttributePrimary3Intensity_97(); + ChipLogProgress(chipTool, " ***** Test Step 97 : Write the default mandatory attribute: Primary3Y\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary3Y_97(); break; case 98: - ChipLogProgress(chipTool, " ***** Test Step 98 : Read the mandatory attribute: Primary4X\n"); - err = TestReadTheMandatoryAttributePrimary4X_98(); + ChipLogProgress(chipTool, " ***** Test Step 98 : Read back the mandatory attribute: Primary3Y\n"); + err = TestReadBackTheMandatoryAttributePrimary3Y_98(); break; case 99: - ChipLogProgress(chipTool, " ***** Test Step 99 : Write the default mandatory attribute: Primary4X\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary4X_99(); + ChipLogProgress(chipTool, " ***** Test Step 99 : Read the mandatory attribute: Primary3Intensity\n"); + err = TestReadTheMandatoryAttributePrimary3Intensity_99(); break; case 100: - ChipLogProgress(chipTool, " ***** Test Step 100 : Read back the mandatory attribute: Primary4X\n"); - err = TestReadBackTheMandatoryAttributePrimary4X_100(); + ChipLogProgress(chipTool, " ***** Test Step 100 : Read the mandatory attribute: Primary4X\n"); + err = TestReadTheMandatoryAttributePrimary4X_100(); break; case 101: - ChipLogProgress(chipTool, " ***** Test Step 101 : Read the mandatory attribute: Primary4Y\n"); - err = TestReadTheMandatoryAttributePrimary4Y_101(); + ChipLogProgress(chipTool, " ***** Test Step 101 : Write the default mandatory attribute: Primary4X\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary4X_101(); break; case 102: - ChipLogProgress(chipTool, " ***** Test Step 102 : Write the default mandatory attribute: Primary4Y\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary4Y_102(); + ChipLogProgress(chipTool, " ***** Test Step 102 : Read back the mandatory attribute: Primary4X\n"); + err = TestReadBackTheMandatoryAttributePrimary4X_102(); break; case 103: - ChipLogProgress(chipTool, " ***** Test Step 103 : Read back the mandatory attribute: Primary4Y\n"); - err = TestReadBackTheMandatoryAttributePrimary4Y_103(); + ChipLogProgress(chipTool, " ***** Test Step 103 : Read the mandatory attribute: Primary4Y\n"); + err = TestReadTheMandatoryAttributePrimary4Y_103(); break; case 104: - ChipLogProgress(chipTool, " ***** Test Step 104 : Read the mandatory attribute: Primary4Intensity\n"); - err = TestReadTheMandatoryAttributePrimary4Intensity_104(); + ChipLogProgress(chipTool, " ***** Test Step 104 : Write the default mandatory attribute: Primary4Y\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary4Y_104(); break; case 105: - ChipLogProgress(chipTool, " ***** Test Step 105 : Read the mandatory attribute: Primary5X\n"); - err = TestReadTheMandatoryAttributePrimary5X_105(); + ChipLogProgress(chipTool, " ***** Test Step 105 : Read back the mandatory attribute: Primary4Y\n"); + err = TestReadBackTheMandatoryAttributePrimary4Y_105(); break; case 106: - ChipLogProgress(chipTool, " ***** Test Step 106 : Write the default mandatory attribute: Primary5X\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary5X_106(); + ChipLogProgress(chipTool, " ***** Test Step 106 : Read the mandatory attribute: Primary4Intensity\n"); + err = TestReadTheMandatoryAttributePrimary4Intensity_106(); break; case 107: - ChipLogProgress(chipTool, " ***** Test Step 107 : Read back the mandatory attribute: Primary5X\n"); - err = TestReadBackTheMandatoryAttributePrimary5X_107(); + ChipLogProgress(chipTool, " ***** Test Step 107 : Read the mandatory attribute: Primary5X\n"); + err = TestReadTheMandatoryAttributePrimary5X_107(); break; case 108: - ChipLogProgress(chipTool, " ***** Test Step 108 : Read the mandatory attribute: Primary5Y\n"); - err = TestReadTheMandatoryAttributePrimary5Y_108(); + ChipLogProgress(chipTool, " ***** Test Step 108 : Write the default mandatory attribute: Primary5X\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary5X_108(); break; case 109: - ChipLogProgress(chipTool, " ***** Test Step 109 : Write the default mandatory attribute: Primary5Y\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary5Y_109(); + ChipLogProgress(chipTool, " ***** Test Step 109 : Read back the mandatory attribute: Primary5X\n"); + err = TestReadBackTheMandatoryAttributePrimary5X_109(); break; case 110: - ChipLogProgress(chipTool, " ***** Test Step 110 : Read back the mandatory attribute: Primary5Y\n"); - err = TestReadBackTheMandatoryAttributePrimary5Y_110(); + ChipLogProgress(chipTool, " ***** Test Step 110 : Read the mandatory attribute: Primary5Y\n"); + err = TestReadTheMandatoryAttributePrimary5Y_110(); break; case 111: - ChipLogProgress(chipTool, " ***** Test Step 111 : Read the mandatory attribute: Primary5Intensity\n"); - err = TestReadTheMandatoryAttributePrimary5Intensity_111(); + ChipLogProgress(chipTool, " ***** Test Step 111 : Write the default mandatory attribute: Primary5Y\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary5Y_111(); break; case 112: - ChipLogProgress(chipTool, " ***** Test Step 112 : Read the mandatory attribute: Primary6X\n"); - err = TestReadTheMandatoryAttributePrimary6X_112(); + ChipLogProgress(chipTool, " ***** Test Step 112 : Read back the mandatory attribute: Primary5Y\n"); + err = TestReadBackTheMandatoryAttributePrimary5Y_112(); break; case 113: - ChipLogProgress(chipTool, " ***** Test Step 113 : Write the default mandatory attribute: Primary6X\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary6X_113(); + ChipLogProgress(chipTool, " ***** Test Step 113 : Read the mandatory attribute: Primary5Intensity\n"); + err = TestReadTheMandatoryAttributePrimary5Intensity_113(); break; case 114: - ChipLogProgress(chipTool, " ***** Test Step 114 : Read back the mandatory attribute: Primary6X\n"); - err = TestReadBackTheMandatoryAttributePrimary6X_114(); + ChipLogProgress(chipTool, " ***** Test Step 114 : Read the mandatory attribute: Primary6X\n"); + err = TestReadTheMandatoryAttributePrimary6X_114(); break; case 115: - ChipLogProgress(chipTool, " ***** Test Step 115 : Read the mandatory attribute: Primary6Y\n"); - err = TestReadTheMandatoryAttributePrimary6Y_115(); + ChipLogProgress(chipTool, " ***** Test Step 115 : Write the default mandatory attribute: Primary6X\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary6X_115(); break; case 116: - ChipLogProgress(chipTool, " ***** Test Step 116 : Write the default mandatory attribute: Primary6Y\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary6Y_116(); + ChipLogProgress(chipTool, " ***** Test Step 116 : Read back the mandatory attribute: Primary6X\n"); + err = TestReadBackTheMandatoryAttributePrimary6X_116(); break; case 117: - ChipLogProgress(chipTool, " ***** Test Step 117 : Read back the mandatory attribute: Primary6Y\n"); - err = TestReadBackTheMandatoryAttributePrimary6Y_117(); + ChipLogProgress(chipTool, " ***** Test Step 117 : Read the mandatory attribute: Primary6Y\n"); + err = TestReadTheMandatoryAttributePrimary6Y_117(); break; case 118: - ChipLogProgress(chipTool, " ***** Test Step 118 : Read the mandatory attribute: Primary6Intensity\n"); - err = TestReadTheMandatoryAttributePrimary6Intensity_118(); + ChipLogProgress(chipTool, " ***** Test Step 118 : Write the default mandatory attribute: Primary6Y\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary6Y_118(); break; case 119: - ChipLogProgress(chipTool, " ***** Test Step 119 : Read the optional attribute: WhitePointX\n"); - err = TestReadTheOptionalAttributeWhitePointX_119(); + ChipLogProgress(chipTool, " ***** Test Step 119 : Read back the mandatory attribute: Primary6Y\n"); + err = TestReadBackTheMandatoryAttributePrimary6Y_119(); break; case 120: - ChipLogProgress(chipTool, " ***** Test Step 120 : Write the default optional attribute: WhitePointX\n"); - err = TestWriteTheDefaultOptionalAttributeWhitePointX_120(); + ChipLogProgress(chipTool, " ***** Test Step 120 : Read the mandatory attribute: Primary6Intensity\n"); + err = TestReadTheMandatoryAttributePrimary6Intensity_120(); break; case 121: - ChipLogProgress(chipTool, " ***** Test Step 121 : Read back the optional attribute: WhitePointX\n"); - err = TestReadBackTheOptionalAttributeWhitePointX_121(); + ChipLogProgress(chipTool, " ***** Test Step 121 : Read the optional attribute: WhitePointX\n"); + err = TestReadTheOptionalAttributeWhitePointX_121(); break; case 122: - ChipLogProgress(chipTool, " ***** Test Step 122 : Read the optional attribute: WhitePointY\n"); - err = TestReadTheOptionalAttributeWhitePointY_122(); + ChipLogProgress(chipTool, " ***** Test Step 122 : Write the default optional attribute: WhitePointX\n"); + err = TestWriteTheDefaultOptionalAttributeWhitePointX_122(); break; case 123: - ChipLogProgress(chipTool, " ***** Test Step 123 : Write the default optional attribute: WhitePointY\n"); - err = TestWriteTheDefaultOptionalAttributeWhitePointY_123(); + ChipLogProgress(chipTool, " ***** Test Step 123 : Read back the optional attribute: WhitePointX\n"); + err = TestReadBackTheOptionalAttributeWhitePointX_123(); break; case 124: - ChipLogProgress(chipTool, " ***** Test Step 124 : Read back the optional attribute: WhitePointY\n"); - err = TestReadBackTheOptionalAttributeWhitePointY_124(); + ChipLogProgress(chipTool, " ***** Test Step 124 : Read the optional attribute: WhitePointY\n"); + err = TestReadTheOptionalAttributeWhitePointY_124(); break; case 125: - ChipLogProgress(chipTool, " ***** Test Step 125 : Read the optional attribute: ColorPointRX\n"); - err = TestReadTheOptionalAttributeColorPointRX_125(); + ChipLogProgress(chipTool, " ***** Test Step 125 : Write the default optional attribute: WhitePointY\n"); + err = TestWriteTheDefaultOptionalAttributeWhitePointY_125(); break; case 126: - ChipLogProgress(chipTool, " ***** Test Step 126 : Write the default optional attribute: ColorPointRX\n"); - err = TestWriteTheDefaultOptionalAttributeColorPointRX_126(); + ChipLogProgress(chipTool, " ***** Test Step 126 : Read back the optional attribute: WhitePointY\n"); + err = TestReadBackTheOptionalAttributeWhitePointY_126(); break; case 127: - ChipLogProgress(chipTool, " ***** Test Step 127 : Read back the optional attribute: ColorPointRX\n"); - err = TestReadBackTheOptionalAttributeColorPointRX_127(); + ChipLogProgress(chipTool, " ***** Test Step 127 : Read the optional attribute: ColorPointRX\n"); + err = TestReadTheOptionalAttributeColorPointRX_127(); break; case 128: - ChipLogProgress(chipTool, " ***** Test Step 128 : Read the optional attribute: ColorPointRY\n"); - err = TestReadTheOptionalAttributeColorPointRY_128(); + ChipLogProgress(chipTool, " ***** Test Step 128 : Write the default optional attribute: ColorPointRX\n"); + err = TestWriteTheDefaultOptionalAttributeColorPointRX_128(); break; case 129: - ChipLogProgress(chipTool, " ***** Test Step 129 : Write the default optional attribute: ColorPointRY\n"); - err = TestWriteTheDefaultOptionalAttributeColorPointRY_129(); + ChipLogProgress(chipTool, " ***** Test Step 129 : Read back the optional attribute: ColorPointRX\n"); + err = TestReadBackTheOptionalAttributeColorPointRX_129(); break; case 130: - ChipLogProgress(chipTool, " ***** Test Step 130 : Read back the optional attribute: ColorPointRY\n"); - err = TestReadBackTheOptionalAttributeColorPointRY_130(); + ChipLogProgress(chipTool, " ***** Test Step 130 : Read the optional attribute: ColorPointRY\n"); + err = TestReadTheOptionalAttributeColorPointRY_130(); break; case 131: - ChipLogProgress(chipTool, " ***** Test Step 131 : Read the optional attribute: ColorPointRIntensity\n"); - err = TestReadTheOptionalAttributeColorPointRIntensity_131(); + ChipLogProgress(chipTool, " ***** Test Step 131 : Write the default optional attribute: ColorPointRY\n"); + err = TestWriteTheDefaultOptionalAttributeColorPointRY_131(); break; case 132: - ChipLogProgress(chipTool, " ***** Test Step 132 : Read the optional attribute: ColorPointGX\n"); - err = TestReadTheOptionalAttributeColorPointGX_132(); + ChipLogProgress(chipTool, " ***** Test Step 132 : Read back the optional attribute: ColorPointRY\n"); + err = TestReadBackTheOptionalAttributeColorPointRY_132(); break; case 133: - ChipLogProgress(chipTool, " ***** Test Step 133 : Write the default optional attribute: ColorPointGX\n"); - err = TestWriteTheDefaultOptionalAttributeColorPointGX_133(); + ChipLogProgress(chipTool, " ***** Test Step 133 : Read the optional attribute: ColorPointRIntensity\n"); + err = TestReadTheOptionalAttributeColorPointRIntensity_133(); break; case 134: - ChipLogProgress(chipTool, " ***** Test Step 134 : Read back the optional attribute: ColorPointGX\n"); - err = TestReadBackTheOptionalAttributeColorPointGX_134(); + ChipLogProgress(chipTool, " ***** Test Step 134 : Write the default optional attribute: ColorPointRIntensity\n"); + err = TestWriteTheDefaultOptionalAttributeColorPointRIntensity_134(); break; case 135: - ChipLogProgress(chipTool, " ***** Test Step 135 : Read the optional attribute: ColorPointGY\n"); - err = TestReadTheOptionalAttributeColorPointGY_135(); + ChipLogProgress(chipTool, " ***** Test Step 135 : Read back the optional attribute: ColorPointRIntensity\n"); + err = TestReadBackTheOptionalAttributeColorPointRIntensity_135(); break; case 136: - ChipLogProgress(chipTool, " ***** Test Step 136 : Write the default optional attribute: ColorPointGY\n"); - err = TestWriteTheDefaultOptionalAttributeColorPointGY_136(); + ChipLogProgress(chipTool, " ***** Test Step 136 : Read the optional attribute: ColorPointGX\n"); + err = TestReadTheOptionalAttributeColorPointGX_136(); break; case 137: - ChipLogProgress(chipTool, " ***** Test Step 137 : Read back the optional attribute: ColorPointGY\n"); - err = TestReadBackTheOptionalAttributeColorPointGY_137(); + ChipLogProgress(chipTool, " ***** Test Step 137 : Write the default optional attribute: ColorPointGX\n"); + err = TestWriteTheDefaultOptionalAttributeColorPointGX_137(); break; case 138: - ChipLogProgress(chipTool, " ***** Test Step 138 : Read the optional attribute: ColorPointGIntensity\n"); - err = TestReadTheOptionalAttributeColorPointGIntensity_138(); + ChipLogProgress(chipTool, " ***** Test Step 138 : Read back the optional attribute: ColorPointGX\n"); + err = TestReadBackTheOptionalAttributeColorPointGX_138(); break; case 139: - ChipLogProgress(chipTool, " ***** Test Step 139 : Read the optional attribute: ColorPointBX\n"); - err = TestReadTheOptionalAttributeColorPointBX_139(); + ChipLogProgress(chipTool, " ***** Test Step 139 : Read the optional attribute: ColorPointGY\n"); + err = TestReadTheOptionalAttributeColorPointGY_139(); break; case 140: - ChipLogProgress(chipTool, " ***** Test Step 140 : Write the default optional attribute: ColorPointBX\n"); - err = TestWriteTheDefaultOptionalAttributeColorPointBX_140(); + ChipLogProgress(chipTool, " ***** Test Step 140 : Write the default optional attribute: ColorPointGY\n"); + err = TestWriteTheDefaultOptionalAttributeColorPointGY_140(); break; case 141: - ChipLogProgress(chipTool, " ***** Test Step 141 : Read back the optional attribute: ColorPointBX\n"); - err = TestReadBackTheOptionalAttributeColorPointBX_141(); + ChipLogProgress(chipTool, " ***** Test Step 141 : Read back the optional attribute: ColorPointGY\n"); + err = TestReadBackTheOptionalAttributeColorPointGY_141(); break; case 142: - ChipLogProgress(chipTool, " ***** Test Step 142 : Read the optional attribute: ColorPointBY\n"); - err = TestReadTheOptionalAttributeColorPointBY_142(); + ChipLogProgress(chipTool, " ***** Test Step 142 : Read the optional attribute: ColorPointGIntensity\n"); + err = TestReadTheOptionalAttributeColorPointGIntensity_142(); break; case 143: - ChipLogProgress(chipTool, " ***** Test Step 143 : Write the default optional attribute: ColorPointBY\n"); - err = TestWriteTheDefaultOptionalAttributeColorPointBY_143(); + ChipLogProgress(chipTool, " ***** Test Step 143 : Write the default optional attribute: ColorPointGIntensity\n"); + err = TestWriteTheDefaultOptionalAttributeColorPointGIntensity_143(); break; case 144: - ChipLogProgress(chipTool, " ***** Test Step 144 : Read back the optional attribute: ColorPointBY\n"); - err = TestReadBackTheOptionalAttributeColorPointBY_144(); + ChipLogProgress(chipTool, " ***** Test Step 144 : Read back the optional attribute: ColorPointGIntensity\n"); + err = TestReadBackTheOptionalAttributeColorPointGIntensity_144(); break; case 145: - ChipLogProgress(chipTool, " ***** Test Step 145 : Read the optional attribute: ColorPointBIntensity\n"); - err = TestReadTheOptionalAttributeColorPointBIntensity_145(); + ChipLogProgress(chipTool, " ***** Test Step 145 : Read the optional attribute: ColorPointBX\n"); + err = TestReadTheOptionalAttributeColorPointBX_145(); + break; + case 146: + ChipLogProgress(chipTool, " ***** Test Step 146 : Write the default optional attribute: ColorPointBX\n"); + err = TestWriteTheDefaultOptionalAttributeColorPointBX_146(); + break; + case 147: + ChipLogProgress(chipTool, " ***** Test Step 147 : Read back the optional attribute: ColorPointBX\n"); + err = TestReadBackTheOptionalAttributeColorPointBX_147(); + break; + case 148: + ChipLogProgress(chipTool, " ***** Test Step 148 : Read the optional attribute: ColorPointBY\n"); + err = TestReadTheOptionalAttributeColorPointBY_148(); + break; + case 149: + ChipLogProgress(chipTool, " ***** Test Step 149 : Write the default optional attribute: ColorPointBY\n"); + err = TestWriteTheDefaultOptionalAttributeColorPointBY_149(); + break; + case 150: + ChipLogProgress(chipTool, " ***** Test Step 150 : Read back the optional attribute: ColorPointBY\n"); + err = TestReadBackTheOptionalAttributeColorPointBY_150(); + break; + case 151: + ChipLogProgress(chipTool, " ***** Test Step 151 : Read the optional attribute: ColorPointBIntensity\n"); + err = TestReadTheOptionalAttributeColorPointBIntensity_151(); + break; + case 152: + ChipLogProgress(chipTool, " ***** Test Step 152 : Write the default optional attribute: ColorPointBIntensity\n"); + err = TestWriteTheDefaultOptionalAttributeColorPointBIntensity_152(); + break; + case 153: + ChipLogProgress(chipTool, " ***** Test Step 153 : Read back the optional attribute: ColorPointBIntensity\n"); + err = TestReadBackTheOptionalAttributeColorPointBIntensity_153(); break; } @@ -2297,7 +2370,7 @@ class Test_TC_CC_2_1 : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 146; + const uint16_t mTestCount = 154; chip::Optional mCluster; chip::Optional mEndpoint; @@ -2983,17 +3056,17 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_74(status); } - static void OnSuccessCallback_74(void * context, uint8_t numberOfPrimaries) - { - (static_cast(context))->OnSuccessResponse_74(numberOfPrimaries); - } + static void OnSuccessCallback_74(void * context) { (static_cast(context))->OnSuccessResponse_74(); } static void OnFailureCallback_75(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_75(status); } - static void OnSuccessCallback_75(void * context) { (static_cast(context))->OnSuccessResponse_75(); } + static void OnSuccessCallback_75(void * context, chip::CharSpan compensationText) + { + (static_cast(context))->OnSuccessResponse_75(compensationText); + } static void OnFailureCallback_76(void * context, EmberAfStatus status) { @@ -3010,17 +3083,17 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_77(status); } - static void OnSuccessCallback_77(void * context, uint16_t primary1X) - { - (static_cast(context))->OnSuccessResponse_77(primary1X); - } + static void OnSuccessCallback_77(void * context) { (static_cast(context))->OnSuccessResponse_77(); } static void OnFailureCallback_78(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_78(status); } - static void OnSuccessCallback_78(void * context) { (static_cast(context))->OnSuccessResponse_78(); } + static void OnSuccessCallback_78(void * context, uint8_t numberOfPrimaries) + { + (static_cast(context))->OnSuccessResponse_78(numberOfPrimaries); + } static void OnFailureCallback_79(void * context, EmberAfStatus status) { @@ -3037,17 +3110,17 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_80(status); } - static void OnSuccessCallback_80(void * context, uint16_t primary1Y) - { - (static_cast(context))->OnSuccessResponse_80(primary1Y); - } + static void OnSuccessCallback_80(void * context) { (static_cast(context))->OnSuccessResponse_80(); } static void OnFailureCallback_81(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_81(status); } - static void OnSuccessCallback_81(void * context) { (static_cast(context))->OnSuccessResponse_81(); } + static void OnSuccessCallback_81(void * context, uint16_t primary1X) + { + (static_cast(context))->OnSuccessResponse_81(primary1X); + } static void OnFailureCallback_82(void * context, EmberAfStatus status) { @@ -3064,19 +3137,16 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_83(status); } - static void OnSuccessCallback_83(void * context, uint8_t primary1Intensity) - { - (static_cast(context))->OnSuccessResponse_83(primary1Intensity); - } + static void OnSuccessCallback_83(void * context) { (static_cast(context))->OnSuccessResponse_83(); } static void OnFailureCallback_84(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_84(status); } - static void OnSuccessCallback_84(void * context, uint16_t primary2X) + static void OnSuccessCallback_84(void * context, uint16_t primary1Y) { - (static_cast(context))->OnSuccessResponse_84(primary2X); + (static_cast(context))->OnSuccessResponse_84(primary1Y); } static void OnFailureCallback_85(void * context, EmberAfStatus status) @@ -3084,7 +3154,10 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_85(status); } - static void OnSuccessCallback_85(void * context) { (static_cast(context))->OnSuccessResponse_85(); } + static void OnSuccessCallback_85(void * context, uint8_t primary1Intensity) + { + (static_cast(context))->OnSuccessResponse_85(primary1Intensity); + } static void OnFailureCallback_86(void * context, EmberAfStatus status) { @@ -3101,17 +3174,17 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_87(status); } - static void OnSuccessCallback_87(void * context, uint16_t primary2Y) - { - (static_cast(context))->OnSuccessResponse_87(primary2Y); - } + static void OnSuccessCallback_87(void * context) { (static_cast(context))->OnSuccessResponse_87(); } static void OnFailureCallback_88(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_88(status); } - static void OnSuccessCallback_88(void * context) { (static_cast(context))->OnSuccessResponse_88(); } + static void OnSuccessCallback_88(void * context, uint16_t primary2X) + { + (static_cast(context))->OnSuccessResponse_88(primary2X); + } static void OnFailureCallback_89(void * context, EmberAfStatus status) { @@ -3128,19 +3201,16 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_90(status); } - static void OnSuccessCallback_90(void * context, uint8_t primary2Intensity) - { - (static_cast(context))->OnSuccessResponse_90(primary2Intensity); - } + static void OnSuccessCallback_90(void * context) { (static_cast(context))->OnSuccessResponse_90(); } static void OnFailureCallback_91(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_91(status); } - static void OnSuccessCallback_91(void * context, uint16_t primary3X) + static void OnSuccessCallback_91(void * context, uint16_t primary2Y) { - (static_cast(context))->OnSuccessResponse_91(primary3X); + (static_cast(context))->OnSuccessResponse_91(primary2Y); } static void OnFailureCallback_92(void * context, EmberAfStatus status) @@ -3148,7 +3218,10 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_92(status); } - static void OnSuccessCallback_92(void * context) { (static_cast(context))->OnSuccessResponse_92(); } + static void OnSuccessCallback_92(void * context, uint8_t primary2Intensity) + { + (static_cast(context))->OnSuccessResponse_92(primary2Intensity); + } static void OnFailureCallback_93(void * context, EmberAfStatus status) { @@ -3165,17 +3238,17 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_94(status); } - static void OnSuccessCallback_94(void * context, uint16_t primary3Y) - { - (static_cast(context))->OnSuccessResponse_94(primary3Y); - } + static void OnSuccessCallback_94(void * context) { (static_cast(context))->OnSuccessResponse_94(); } static void OnFailureCallback_95(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_95(status); } - static void OnSuccessCallback_95(void * context) { (static_cast(context))->OnSuccessResponse_95(); } + static void OnSuccessCallback_95(void * context, uint16_t primary3X) + { + (static_cast(context))->OnSuccessResponse_95(primary3X); + } static void OnFailureCallback_96(void * context, EmberAfStatus status) { @@ -3192,19 +3265,16 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_97(status); } - static void OnSuccessCallback_97(void * context, uint8_t primary3Intensity) - { - (static_cast(context))->OnSuccessResponse_97(primary3Intensity); - } + static void OnSuccessCallback_97(void * context) { (static_cast(context))->OnSuccessResponse_97(); } static void OnFailureCallback_98(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_98(status); } - static void OnSuccessCallback_98(void * context, uint16_t primary4X) + static void OnSuccessCallback_98(void * context, uint16_t primary3Y) { - (static_cast(context))->OnSuccessResponse_98(primary4X); + (static_cast(context))->OnSuccessResponse_98(primary3Y); } static void OnFailureCallback_99(void * context, EmberAfStatus status) @@ -3212,7 +3282,10 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_99(status); } - static void OnSuccessCallback_99(void * context) { (static_cast(context))->OnSuccessResponse_99(); } + static void OnSuccessCallback_99(void * context, uint8_t primary3Intensity) + { + (static_cast(context))->OnSuccessResponse_99(primary3Intensity); + } static void OnFailureCallback_100(void * context, EmberAfStatus status) { @@ -3229,17 +3302,17 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_101(status); } - static void OnSuccessCallback_101(void * context, uint16_t primary4Y) - { - (static_cast(context))->OnSuccessResponse_101(primary4Y); - } + static void OnSuccessCallback_101(void * context) { (static_cast(context))->OnSuccessResponse_101(); } static void OnFailureCallback_102(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_102(status); } - static void OnSuccessCallback_102(void * context) { (static_cast(context))->OnSuccessResponse_102(); } + static void OnSuccessCallback_102(void * context, uint16_t primary4X) + { + (static_cast(context))->OnSuccessResponse_102(primary4X); + } static void OnFailureCallback_103(void * context, EmberAfStatus status) { @@ -3256,19 +3329,16 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_104(status); } - static void OnSuccessCallback_104(void * context, uint8_t primary4Intensity) - { - (static_cast(context))->OnSuccessResponse_104(primary4Intensity); - } + static void OnSuccessCallback_104(void * context) { (static_cast(context))->OnSuccessResponse_104(); } static void OnFailureCallback_105(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_105(status); } - static void OnSuccessCallback_105(void * context, uint16_t primary5X) + static void OnSuccessCallback_105(void * context, uint16_t primary4Y) { - (static_cast(context))->OnSuccessResponse_105(primary5X); + (static_cast(context))->OnSuccessResponse_105(primary4Y); } static void OnFailureCallback_106(void * context, EmberAfStatus status) @@ -3276,7 +3346,10 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_106(status); } - static void OnSuccessCallback_106(void * context) { (static_cast(context))->OnSuccessResponse_106(); } + static void OnSuccessCallback_106(void * context, uint8_t primary4Intensity) + { + (static_cast(context))->OnSuccessResponse_106(primary4Intensity); + } static void OnFailureCallback_107(void * context, EmberAfStatus status) { @@ -3293,17 +3366,17 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_108(status); } - static void OnSuccessCallback_108(void * context, uint16_t primary5Y) - { - (static_cast(context))->OnSuccessResponse_108(primary5Y); - } + static void OnSuccessCallback_108(void * context) { (static_cast(context))->OnSuccessResponse_108(); } static void OnFailureCallback_109(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_109(status); } - static void OnSuccessCallback_109(void * context) { (static_cast(context))->OnSuccessResponse_109(); } + static void OnSuccessCallback_109(void * context, uint16_t primary5X) + { + (static_cast(context))->OnSuccessResponse_109(primary5X); + } static void OnFailureCallback_110(void * context, EmberAfStatus status) { @@ -3320,19 +3393,16 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_111(status); } - static void OnSuccessCallback_111(void * context, uint8_t primary5Intensity) - { - (static_cast(context))->OnSuccessResponse_111(primary5Intensity); - } + static void OnSuccessCallback_111(void * context) { (static_cast(context))->OnSuccessResponse_111(); } static void OnFailureCallback_112(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_112(status); } - static void OnSuccessCallback_112(void * context, uint16_t primary6X) + static void OnSuccessCallback_112(void * context, uint16_t primary5Y) { - (static_cast(context))->OnSuccessResponse_112(primary6X); + (static_cast(context))->OnSuccessResponse_112(primary5Y); } static void OnFailureCallback_113(void * context, EmberAfStatus status) @@ -3340,7 +3410,10 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_113(status); } - static void OnSuccessCallback_113(void * context) { (static_cast(context))->OnSuccessResponse_113(); } + static void OnSuccessCallback_113(void * context, uint8_t primary5Intensity) + { + (static_cast(context))->OnSuccessResponse_113(primary5Intensity); + } static void OnFailureCallback_114(void * context, EmberAfStatus status) { @@ -3357,17 +3430,17 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_115(status); } - static void OnSuccessCallback_115(void * context, uint16_t primary6Y) - { - (static_cast(context))->OnSuccessResponse_115(primary6Y); - } + static void OnSuccessCallback_115(void * context) { (static_cast(context))->OnSuccessResponse_115(); } static void OnFailureCallback_116(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_116(status); } - static void OnSuccessCallback_116(void * context) { (static_cast(context))->OnSuccessResponse_116(); } + static void OnSuccessCallback_116(void * context, uint16_t primary6X) + { + (static_cast(context))->OnSuccessResponse_116(primary6X); + } static void OnFailureCallback_117(void * context, EmberAfStatus status) { @@ -3384,19 +3457,16 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_118(status); } - static void OnSuccessCallback_118(void * context, uint8_t primary6Intensity) - { - (static_cast(context))->OnSuccessResponse_118(primary6Intensity); - } + static void OnSuccessCallback_118(void * context) { (static_cast(context))->OnSuccessResponse_118(); } static void OnFailureCallback_119(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_119(status); } - static void OnSuccessCallback_119(void * context, uint16_t whitePointX) + static void OnSuccessCallback_119(void * context, uint16_t primary6Y) { - (static_cast(context))->OnSuccessResponse_119(whitePointX); + (static_cast(context))->OnSuccessResponse_119(primary6Y); } static void OnFailureCallback_120(void * context, EmberAfStatus status) @@ -3404,7 +3474,10 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_120(status); } - static void OnSuccessCallback_120(void * context) { (static_cast(context))->OnSuccessResponse_120(); } + static void OnSuccessCallback_120(void * context, uint8_t primary6Intensity) + { + (static_cast(context))->OnSuccessResponse_120(primary6Intensity); + } static void OnFailureCallback_121(void * context, EmberAfStatus status) { @@ -3421,17 +3494,17 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_122(status); } - static void OnSuccessCallback_122(void * context, uint16_t whitePointY) - { - (static_cast(context))->OnSuccessResponse_122(whitePointY); - } + static void OnSuccessCallback_122(void * context) { (static_cast(context))->OnSuccessResponse_122(); } static void OnFailureCallback_123(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_123(status); } - static void OnSuccessCallback_123(void * context) { (static_cast(context))->OnSuccessResponse_123(); } + static void OnSuccessCallback_123(void * context, uint16_t whitePointX) + { + (static_cast(context))->OnSuccessResponse_123(whitePointX); + } static void OnFailureCallback_124(void * context, EmberAfStatus status) { @@ -3448,17 +3521,17 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_125(status); } - static void OnSuccessCallback_125(void * context, uint16_t colorPointRX) - { - (static_cast(context))->OnSuccessResponse_125(colorPointRX); - } + static void OnSuccessCallback_125(void * context) { (static_cast(context))->OnSuccessResponse_125(); } static void OnFailureCallback_126(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_126(status); } - static void OnSuccessCallback_126(void * context) { (static_cast(context))->OnSuccessResponse_126(); } + static void OnSuccessCallback_126(void * context, uint16_t whitePointY) + { + (static_cast(context))->OnSuccessResponse_126(whitePointY); + } static void OnFailureCallback_127(void * context, EmberAfStatus status) { @@ -3475,17 +3548,17 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_128(status); } - static void OnSuccessCallback_128(void * context, uint16_t colorPointRY) - { - (static_cast(context))->OnSuccessResponse_128(colorPointRY); - } + static void OnSuccessCallback_128(void * context) { (static_cast(context))->OnSuccessResponse_128(); } static void OnFailureCallback_129(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_129(status); } - static void OnSuccessCallback_129(void * context) { (static_cast(context))->OnSuccessResponse_129(); } + static void OnSuccessCallback_129(void * context, uint16_t colorPointRX) + { + (static_cast(context))->OnSuccessResponse_129(colorPointRX); + } static void OnFailureCallback_130(void * context, EmberAfStatus status) { @@ -3502,19 +3575,16 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_131(status); } - static void OnSuccessCallback_131(void * context, uint8_t colorPointRIntensity) - { - (static_cast(context))->OnSuccessResponse_131(colorPointRIntensity); - } + static void OnSuccessCallback_131(void * context) { (static_cast(context))->OnSuccessResponse_131(); } static void OnFailureCallback_132(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_132(status); } - static void OnSuccessCallback_132(void * context, uint16_t colorPointGX) + static void OnSuccessCallback_132(void * context, uint16_t colorPointRY) { - (static_cast(context))->OnSuccessResponse_132(colorPointGX); + (static_cast(context))->OnSuccessResponse_132(colorPointRY); } static void OnFailureCallback_133(void * context, EmberAfStatus status) @@ -3522,26 +3592,26 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_133(status); } - static void OnSuccessCallback_133(void * context) { (static_cast(context))->OnSuccessResponse_133(); } + static void OnSuccessCallback_133(void * context, uint8_t colorPointRIntensity) + { + (static_cast(context))->OnSuccessResponse_133(colorPointRIntensity); + } static void OnFailureCallback_134(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_134(status); } - static void OnSuccessCallback_134(void * context, uint16_t colorPointGX) - { - (static_cast(context))->OnSuccessResponse_134(colorPointGX); - } + static void OnSuccessCallback_134(void * context) { (static_cast(context))->OnSuccessResponse_134(); } static void OnFailureCallback_135(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_135(status); } - static void OnSuccessCallback_135(void * context, uint16_t colorPointGY) + static void OnSuccessCallback_135(void * context, uint8_t colorPointRIntensity) { - (static_cast(context))->OnSuccessResponse_135(colorPointGY); + (static_cast(context))->OnSuccessResponse_135(colorPointRIntensity); } static void OnFailureCallback_136(void * context, EmberAfStatus status) @@ -3549,26 +3619,26 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_136(status); } - static void OnSuccessCallback_136(void * context) { (static_cast(context))->OnSuccessResponse_136(); } + static void OnSuccessCallback_136(void * context, uint16_t colorPointGX) + { + (static_cast(context))->OnSuccessResponse_136(colorPointGX); + } static void OnFailureCallback_137(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_137(status); } - static void OnSuccessCallback_137(void * context, uint16_t colorPointGY) - { - (static_cast(context))->OnSuccessResponse_137(colorPointGY); - } + static void OnSuccessCallback_137(void * context) { (static_cast(context))->OnSuccessResponse_137(); } static void OnFailureCallback_138(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_138(status); } - static void OnSuccessCallback_138(void * context, uint8_t colorPointGIntensity) + static void OnSuccessCallback_138(void * context, uint16_t colorPointGX) { - (static_cast(context))->OnSuccessResponse_138(colorPointGIntensity); + (static_cast(context))->OnSuccessResponse_138(colorPointGX); } static void OnFailureCallback_139(void * context, EmberAfStatus status) @@ -3576,9 +3646,9 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_139(status); } - static void OnSuccessCallback_139(void * context, uint16_t colorPointBX) + static void OnSuccessCallback_139(void * context, uint16_t colorPointGY) { - (static_cast(context))->OnSuccessResponse_139(colorPointBX); + (static_cast(context))->OnSuccessResponse_139(colorPointGY); } static void OnFailureCallback_140(void * context, EmberAfStatus status) @@ -3593,9 +3663,9 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_141(status); } - static void OnSuccessCallback_141(void * context, uint16_t colorPointBX) + static void OnSuccessCallback_141(void * context, uint16_t colorPointGY) { - (static_cast(context))->OnSuccessResponse_141(colorPointBX); + (static_cast(context))->OnSuccessResponse_141(colorPointGY); } static void OnFailureCallback_142(void * context, EmberAfStatus status) @@ -3603,9 +3673,9 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_142(status); } - static void OnSuccessCallback_142(void * context, uint16_t colorPointBY) + static void OnSuccessCallback_142(void * context, uint8_t colorPointGIntensity) { - (static_cast(context))->OnSuccessResponse_142(colorPointBY); + (static_cast(context))->OnSuccessResponse_142(colorPointGIntensity); } static void OnFailureCallback_143(void * context, EmberAfStatus status) @@ -3620,9 +3690,9 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_144(status); } - static void OnSuccessCallback_144(void * context, uint16_t colorPointBY) + static void OnSuccessCallback_144(void * context, uint8_t colorPointGIntensity) { - (static_cast(context))->OnSuccessResponse_144(colorPointBY); + (static_cast(context))->OnSuccessResponse_144(colorPointGIntensity); } static void OnFailureCallback_145(void * context, EmberAfStatus status) @@ -3630,9 +3700,80 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_145(status); } - static void OnSuccessCallback_145(void * context, uint8_t colorPointBIntensity) + static void OnSuccessCallback_145(void * context, uint16_t colorPointBX) + { + (static_cast(context))->OnSuccessResponse_145(colorPointBX); + } + + static void OnFailureCallback_146(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_146(status); + } + + static void OnSuccessCallback_146(void * context) { (static_cast(context))->OnSuccessResponse_146(); } + + static void OnFailureCallback_147(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_147(status); + } + + static void OnSuccessCallback_147(void * context, uint16_t colorPointBX) + { + (static_cast(context))->OnSuccessResponse_147(colorPointBX); + } + + static void OnFailureCallback_148(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_148(status); + } + + static void OnSuccessCallback_148(void * context, uint16_t colorPointBY) { - (static_cast(context))->OnSuccessResponse_145(colorPointBIntensity); + (static_cast(context))->OnSuccessResponse_148(colorPointBY); + } + + static void OnFailureCallback_149(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_149(status); + } + + static void OnSuccessCallback_149(void * context) { (static_cast(context))->OnSuccessResponse_149(); } + + static void OnFailureCallback_150(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_150(status); + } + + static void OnSuccessCallback_150(void * context, uint16_t colorPointBY) + { + (static_cast(context))->OnSuccessResponse_150(colorPointBY); + } + + static void OnFailureCallback_151(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_151(status); + } + + static void OnSuccessCallback_151(void * context, uint8_t colorPointBIntensity) + { + (static_cast(context))->OnSuccessResponse_151(colorPointBIntensity); + } + + static void OnFailureCallback_152(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_152(status); + } + + static void OnSuccessCallback_152(void * context) { (static_cast(context))->OnSuccessResponse_152(); } + + static void OnFailureCallback_153(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_153(status); + } + + static void OnSuccessCallback_153(void * context, uint8_t colorPointBIntensity) + { + (static_cast(context))->OnSuccessResponse_153(colorPointBIntensity); } // @@ -3681,6 +3822,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_2(uint8_t currentHue) { VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintMinValue("currentHue", currentHue, 0)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", currentHue, 254)); NextTest(); } @@ -3763,6 +3905,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_6(uint8_t currentSaturation) { VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", currentSaturation, 0)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", currentSaturation, 254)); NextTest(); } @@ -3845,6 +3988,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_10(uint16_t currentX) { VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("currentX", currentX, 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentX", currentX, 65279U)); NextTest(); } @@ -3927,6 +4071,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_14(uint16_t currentY) { VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("currentY", currentY, 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentY", currentY, 65279U)); NextTest(); } @@ -3989,6 +4134,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_17(uint16_t colorTemperature) { VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("colorTemperature", colorTemperature, 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", colorTemperature, 65279U)); NextTest(); } @@ -4009,6 +4155,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_18(uint8_t colorMode) { VerifyOrReturn(CheckConstraintType("colorMode", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("colorMode", colorMode, 0)); VerifyOrReturn(CheckConstraintMaxValue("colorMode", colorMode, 2)); NextTest(); } @@ -4639,6 +4786,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_49(uint16_t colorCapabilities) { VerifyOrReturn(CheckConstraintType("colorCapabilities", "", "map16")); + VerifyOrReturn(CheckConstraintMinValue("colorCapabilities", colorCapabilities, 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorCapabilities", colorCapabilities, 65279U)); NextTest(); } @@ -4721,6 +4869,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_53(uint16_t colorTempPhysicalMin) { VerifyOrReturn(CheckConstraintType("colorTempPhysicalMin", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMin", colorTempPhysicalMin, 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMin", colorTempPhysicalMin, 65279U)); NextTest(); } @@ -4803,6 +4952,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_57(uint16_t colorTempPhysicalMax) { VerifyOrReturn(CheckConstraintType("colorTempPhysicalMax", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMax", colorTempPhysicalMax, 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMax", colorTempPhysicalMax, 65279U)); NextTest(); } @@ -4939,6 +5089,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_63(uint16_t startUpColorTemperatureMireds) { VerifyOrReturn(CheckConstraintType("startUpColorTemperatureMireds", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("startUpColorTemperatureMireds", startUpColorTemperatureMireds, 0U)); VerifyOrReturn(CheckConstraintMaxValue("startUpColorTemperatureMireds", startUpColorTemperatureMireds, 65279U)); NextTest(); } @@ -5031,6 +5182,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_67(uint16_t remainingTime) { VerifyOrReturn(CheckConstraintType("remainingTime", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("remainingTime", remainingTime, 0U)); VerifyOrReturn(CheckConstraintMaxValue("remainingTime", remainingTime, 254U)); NextTest(); } @@ -5099,6 +5251,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_70(uint8_t driftCompensation) { VerifyOrReturn(CheckConstraintType("driftCompensation", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("driftCompensation", driftCompensation, 0)); VerifyOrReturn(CheckConstraintMaxValue("driftCompensation", driftCompensation, 4)); NextTest(); } @@ -5171,27 +5324,73 @@ class Test_TC_CC_2_1 : public TestCommand NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributeNumberOfPrimaries_74() + CHIP_ERROR TestWriteTheDefaultValuesToOptionalAttributeCompensationText_74() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::ColorControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::CharSpan compensationTextArgument; + compensationTextArgument = chip::Span("garbage: not in length on purpose", 0); + + ReturnErrorOnFailure(cluster.WriteAttribute( + compensationTextArgument, this, OnSuccessCallback_74, OnFailureCallback_74)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_74(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + } + + void OnSuccessResponse_74() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadsBackOptionalAttributeCompensationText_75() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::ColorControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_75, OnFailureCallback_75)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_75(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_75(chip::CharSpan compensationText) + { + VerifyOrReturn(CheckValueAsString("compensationText", compensationText, chip::CharSpan("", 0))); + + NextTest(); + } + + CHIP_ERROR TestReadTheMandatoryAttributeNumberOfPrimaries_76() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_74, OnFailureCallback_74)); + this, OnSuccessCallback_76, OnFailureCallback_76)); return CHIP_NO_ERROR; } - void OnFailureResponse_74(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_76(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_74(uint8_t numberOfPrimaries) + void OnSuccessResponse_76(uint8_t numberOfPrimaries) { VerifyOrReturn(CheckConstraintType("numberOfPrimaries", "", "uint8")); + VerifyOrReturn(CheckConstraintMinValue("numberOfPrimaries", numberOfPrimaries, 0)); VerifyOrReturn(CheckConstraintMaxValue("numberOfPrimaries", numberOfPrimaries, 6)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributeNumberOfPrimaries_75() + CHIP_ERROR TestWriteTheDefaultMandatoryAttributeNumberOfPrimaries_77() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -5201,59 +5400,60 @@ class Test_TC_CC_2_1 : public TestCommand numberOfPrimariesArgument = 0; ReturnErrorOnFailure(cluster.WriteAttribute( - numberOfPrimariesArgument, this, OnSuccessCallback_75, OnFailureCallback_75)); + numberOfPrimariesArgument, this, OnSuccessCallback_77, OnFailureCallback_77)); return CHIP_NO_ERROR; } - void OnFailureResponse_75(EmberAfStatus status) + void OnFailureResponse_77(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_75() { ThrowSuccessResponse(); } + void OnSuccessResponse_77() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadBackTheMandatoryAttributeNumberOfPrimaries_76() + CHIP_ERROR TestReadBackTheMandatoryAttributeNumberOfPrimaries_78() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_76, OnFailureCallback_76)); + this, OnSuccessCallback_78, OnFailureCallback_78)); return CHIP_NO_ERROR; } - void OnFailureResponse_76(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_78(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_76(uint8_t numberOfPrimaries) + void OnSuccessResponse_78(uint8_t numberOfPrimaries) { VerifyOrReturn(CheckValue("numberOfPrimaries", numberOfPrimaries, 0)); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary1X_77() + CHIP_ERROR TestReadTheMandatoryAttributePrimary1X_79() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_77, OnFailureCallback_77)); + this, OnSuccessCallback_79, OnFailureCallback_79)); return CHIP_NO_ERROR; } - void OnFailureResponse_77(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_79(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_77(uint16_t primary1X) + void OnSuccessResponse_79(uint16_t primary1X) { VerifyOrReturn(CheckConstraintType("primary1X", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary1X", primary1X, 0U)); VerifyOrReturn(CheckConstraintMaxValue("primary1X", primary1X, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary1X_78() + CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary1X_80() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -5263,59 +5463,60 @@ class Test_TC_CC_2_1 : public TestCommand primary1XArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - primary1XArgument, this, OnSuccessCallback_78, OnFailureCallback_78)); + primary1XArgument, this, OnSuccessCallback_80, OnFailureCallback_80)); return CHIP_NO_ERROR; } - void OnFailureResponse_78(EmberAfStatus status) + void OnFailureResponse_80(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_78() { ThrowSuccessResponse(); } + void OnSuccessResponse_80() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary1X_79() + CHIP_ERROR TestReadBackTheMandatoryAttributePrimary1X_81() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_79, OnFailureCallback_79)); + this, OnSuccessCallback_81, OnFailureCallback_81)); return CHIP_NO_ERROR; } - void OnFailureResponse_79(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_81(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_79(uint16_t primary1X) + void OnSuccessResponse_81(uint16_t primary1X) { VerifyOrReturn(CheckValue("primary1X", primary1X, 0U)); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary1Y_80() + CHIP_ERROR TestReadTheMandatoryAttributePrimary1Y_82() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_80, OnFailureCallback_80)); + this, OnSuccessCallback_82, OnFailureCallback_82)); return CHIP_NO_ERROR; } - void OnFailureResponse_80(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_82(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_80(uint16_t primary1Y) + void OnSuccessResponse_82(uint16_t primary1Y) { VerifyOrReturn(CheckConstraintType("primary1Y", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary1Y", primary1Y, 0U)); VerifyOrReturn(CheckConstraintMaxValue("primary1Y", primary1Y, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary1Y_81() + CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary1Y_83() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -5325,78 +5526,79 @@ class Test_TC_CC_2_1 : public TestCommand primary1YArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - primary1YArgument, this, OnSuccessCallback_81, OnFailureCallback_81)); + primary1YArgument, this, OnSuccessCallback_83, OnFailureCallback_83)); return CHIP_NO_ERROR; } - void OnFailureResponse_81(EmberAfStatus status) + void OnFailureResponse_83(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_81() { ThrowSuccessResponse(); } + void OnSuccessResponse_83() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary1Y_82() + CHIP_ERROR TestReadBackTheMandatoryAttributePrimary1Y_84() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_82, OnFailureCallback_82)); + this, OnSuccessCallback_84, OnFailureCallback_84)); return CHIP_NO_ERROR; } - void OnFailureResponse_82(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_84(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_82(uint16_t primary1Y) + void OnSuccessResponse_84(uint16_t primary1Y) { VerifyOrReturn(CheckValue("primary1Y", primary1Y, 0U)); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary1Intensity_83() + CHIP_ERROR TestReadTheMandatoryAttributePrimary1Intensity_85() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_83, OnFailureCallback_83)); + this, OnSuccessCallback_85, OnFailureCallback_85)); return CHIP_NO_ERROR; } - void OnFailureResponse_83(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_85(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_83(uint8_t primary1Intensity) + void OnSuccessResponse_85(uint8_t primary1Intensity) { VerifyOrReturn(CheckConstraintType("primary1Intensity", "", "uint8")); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary2X_84() + CHIP_ERROR TestReadTheMandatoryAttributePrimary2X_86() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_84, OnFailureCallback_84)); + this, OnSuccessCallback_86, OnFailureCallback_86)); return CHIP_NO_ERROR; } - void OnFailureResponse_84(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_86(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_84(uint16_t primary2X) + void OnSuccessResponse_86(uint16_t primary2X) { VerifyOrReturn(CheckConstraintType("primary2X", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary2X", primary2X, 0U)); VerifyOrReturn(CheckConstraintMaxValue("primary2X", primary2X, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary2X_85() + CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary2X_87() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -5406,59 +5608,60 @@ class Test_TC_CC_2_1 : public TestCommand primary2XArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - primary2XArgument, this, OnSuccessCallback_85, OnFailureCallback_85)); + primary2XArgument, this, OnSuccessCallback_87, OnFailureCallback_87)); return CHIP_NO_ERROR; } - void OnFailureResponse_85(EmberAfStatus status) + void OnFailureResponse_87(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_85() { ThrowSuccessResponse(); } + void OnSuccessResponse_87() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary2X_86() + CHIP_ERROR TestReadBackTheMandatoryAttributePrimary2X_88() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_86, OnFailureCallback_86)); + this, OnSuccessCallback_88, OnFailureCallback_88)); return CHIP_NO_ERROR; } - void OnFailureResponse_86(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_88(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_86(uint16_t primary2X) + void OnSuccessResponse_88(uint16_t primary2X) { VerifyOrReturn(CheckValue("primary2X", primary2X, 0U)); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary2Y_87() + CHIP_ERROR TestReadTheMandatoryAttributePrimary2Y_89() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_87, OnFailureCallback_87)); + this, OnSuccessCallback_89, OnFailureCallback_89)); return CHIP_NO_ERROR; } - void OnFailureResponse_87(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_89(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_87(uint16_t primary2Y) + void OnSuccessResponse_89(uint16_t primary2Y) { VerifyOrReturn(CheckConstraintType("primary2Y", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary2Y", primary2Y, 0U)); VerifyOrReturn(CheckConstraintMaxValue("primary2Y", primary2Y, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary2Y_88() + CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary2Y_90() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -5468,78 +5671,79 @@ class Test_TC_CC_2_1 : public TestCommand primary2YArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - primary2YArgument, this, OnSuccessCallback_88, OnFailureCallback_88)); + primary2YArgument, this, OnSuccessCallback_90, OnFailureCallback_90)); return CHIP_NO_ERROR; } - void OnFailureResponse_88(EmberAfStatus status) + void OnFailureResponse_90(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_88() { ThrowSuccessResponse(); } + void OnSuccessResponse_90() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary2Y_89() + CHIP_ERROR TestReadBackTheMandatoryAttributePrimary2Y_91() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_89, OnFailureCallback_89)); + this, OnSuccessCallback_91, OnFailureCallback_91)); return CHIP_NO_ERROR; } - void OnFailureResponse_89(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_91(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_89(uint16_t primary2Y) + void OnSuccessResponse_91(uint16_t primary2Y) { VerifyOrReturn(CheckValue("primary2Y", primary2Y, 0U)); NextTest(); } - CHIP_ERROR TestValidateConstraintsOfAttributePrimary2Intensity_90() + CHIP_ERROR TestValidateConstraintsOfAttributePrimary2Intensity_92() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_90, OnFailureCallback_90)); + this, OnSuccessCallback_92, OnFailureCallback_92)); return CHIP_NO_ERROR; } - void OnFailureResponse_90(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_92(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_90(uint8_t primary2Intensity) + void OnSuccessResponse_92(uint8_t primary2Intensity) { VerifyOrReturn(CheckConstraintType("primary2Intensity", "", "uint8")); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary3X_91() + CHIP_ERROR TestReadTheMandatoryAttributePrimary3X_93() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_91, OnFailureCallback_91)); + this, OnSuccessCallback_93, OnFailureCallback_93)); return CHIP_NO_ERROR; } - void OnFailureResponse_91(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_93(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_91(uint16_t primary3X) + void OnSuccessResponse_93(uint16_t primary3X) { VerifyOrReturn(CheckConstraintType("primary3X", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary3X", primary3X, 0U)); VerifyOrReturn(CheckConstraintMaxValue("primary3X", primary3X, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary3X_92() + CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary3X_94() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -5549,59 +5753,60 @@ class Test_TC_CC_2_1 : public TestCommand primary3XArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - primary3XArgument, this, OnSuccessCallback_92, OnFailureCallback_92)); + primary3XArgument, this, OnSuccessCallback_94, OnFailureCallback_94)); return CHIP_NO_ERROR; } - void OnFailureResponse_92(EmberAfStatus status) + void OnFailureResponse_94(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_92() { ThrowSuccessResponse(); } + void OnSuccessResponse_94() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary3X_93() + CHIP_ERROR TestReadBackTheMandatoryAttributePrimary3X_95() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_93, OnFailureCallback_93)); + this, OnSuccessCallback_95, OnFailureCallback_95)); return CHIP_NO_ERROR; } - void OnFailureResponse_93(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_95(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_93(uint16_t primary3X) + void OnSuccessResponse_95(uint16_t primary3X) { VerifyOrReturn(CheckValue("primary3X", primary3X, 0U)); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary3Y_94() + CHIP_ERROR TestReadTheMandatoryAttributePrimary3Y_96() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_94, OnFailureCallback_94)); + this, OnSuccessCallback_96, OnFailureCallback_96)); return CHIP_NO_ERROR; } - void OnFailureResponse_94(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_96(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_94(uint16_t primary3Y) + void OnSuccessResponse_96(uint16_t primary3Y) { VerifyOrReturn(CheckConstraintType("primary3Y", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary3Y", primary3Y, 0U)); VerifyOrReturn(CheckConstraintMaxValue("primary3Y", primary3Y, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary3Y_95() + CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary3Y_97() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -5611,78 +5816,79 @@ class Test_TC_CC_2_1 : public TestCommand primary3YArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - primary3YArgument, this, OnSuccessCallback_95, OnFailureCallback_95)); + primary3YArgument, this, OnSuccessCallback_97, OnFailureCallback_97)); return CHIP_NO_ERROR; } - void OnFailureResponse_95(EmberAfStatus status) + void OnFailureResponse_97(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_95() { ThrowSuccessResponse(); } + void OnSuccessResponse_97() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary3Y_96() + CHIP_ERROR TestReadBackTheMandatoryAttributePrimary3Y_98() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_96, OnFailureCallback_96)); + this, OnSuccessCallback_98, OnFailureCallback_98)); return CHIP_NO_ERROR; } - void OnFailureResponse_96(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_98(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_96(uint16_t primary3Y) + void OnSuccessResponse_98(uint16_t primary3Y) { VerifyOrReturn(CheckValue("primary3Y", primary3Y, 0U)); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary3Intensity_97() + CHIP_ERROR TestReadTheMandatoryAttributePrimary3Intensity_99() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_97, OnFailureCallback_97)); + this, OnSuccessCallback_99, OnFailureCallback_99)); return CHIP_NO_ERROR; } - void OnFailureResponse_97(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_99(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_97(uint8_t primary3Intensity) + void OnSuccessResponse_99(uint8_t primary3Intensity) { VerifyOrReturn(CheckConstraintType("primary3Intensity", "", "uint8")); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary4X_98() + CHIP_ERROR TestReadTheMandatoryAttributePrimary4X_100() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_98, OnFailureCallback_98)); + this, OnSuccessCallback_100, OnFailureCallback_100)); return CHIP_NO_ERROR; } - void OnFailureResponse_98(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_100(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_98(uint16_t primary4X) + void OnSuccessResponse_100(uint16_t primary4X) { VerifyOrReturn(CheckConstraintType("primary4X", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary4X", primary4X, 0U)); VerifyOrReturn(CheckConstraintMaxValue("primary4X", primary4X, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary4X_99() + CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary4X_101() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -5692,59 +5898,60 @@ class Test_TC_CC_2_1 : public TestCommand primary4XArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - primary4XArgument, this, OnSuccessCallback_99, OnFailureCallback_99)); + primary4XArgument, this, OnSuccessCallback_101, OnFailureCallback_101)); return CHIP_NO_ERROR; } - void OnFailureResponse_99(EmberAfStatus status) + void OnFailureResponse_101(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_99() { ThrowSuccessResponse(); } + void OnSuccessResponse_101() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary4X_100() + CHIP_ERROR TestReadBackTheMandatoryAttributePrimary4X_102() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_100, OnFailureCallback_100)); + this, OnSuccessCallback_102, OnFailureCallback_102)); return CHIP_NO_ERROR; } - void OnFailureResponse_100(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_102(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_100(uint16_t primary4X) + void OnSuccessResponse_102(uint16_t primary4X) { VerifyOrReturn(CheckValue("primary4X", primary4X, 0U)); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary4Y_101() + CHIP_ERROR TestReadTheMandatoryAttributePrimary4Y_103() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_101, OnFailureCallback_101)); + this, OnSuccessCallback_103, OnFailureCallback_103)); return CHIP_NO_ERROR; } - void OnFailureResponse_101(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_103(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_101(uint16_t primary4Y) + void OnSuccessResponse_103(uint16_t primary4Y) { VerifyOrReturn(CheckConstraintType("primary4Y", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary4Y", primary4Y, 0U)); VerifyOrReturn(CheckConstraintMaxValue("primary4Y", primary4Y, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary4Y_102() + CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary4Y_104() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -5754,78 +5961,79 @@ class Test_TC_CC_2_1 : public TestCommand primary4YArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - primary4YArgument, this, OnSuccessCallback_102, OnFailureCallback_102)); + primary4YArgument, this, OnSuccessCallback_104, OnFailureCallback_104)); return CHIP_NO_ERROR; } - void OnFailureResponse_102(EmberAfStatus status) + void OnFailureResponse_104(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_102() { ThrowSuccessResponse(); } + void OnSuccessResponse_104() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary4Y_103() + CHIP_ERROR TestReadBackTheMandatoryAttributePrimary4Y_105() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_103, OnFailureCallback_103)); + this, OnSuccessCallback_105, OnFailureCallback_105)); return CHIP_NO_ERROR; } - void OnFailureResponse_103(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_105(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_103(uint16_t primary4Y) + void OnSuccessResponse_105(uint16_t primary4Y) { VerifyOrReturn(CheckValue("primary4Y", primary4Y, 0U)); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary4Intensity_104() + CHIP_ERROR TestReadTheMandatoryAttributePrimary4Intensity_106() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_104, OnFailureCallback_104)); + this, OnSuccessCallback_106, OnFailureCallback_106)); return CHIP_NO_ERROR; } - void OnFailureResponse_104(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_106(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_104(uint8_t primary4Intensity) + void OnSuccessResponse_106(uint8_t primary4Intensity) { VerifyOrReturn(CheckConstraintType("primary4Intensity", "", "uint8")); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary5X_105() + CHIP_ERROR TestReadTheMandatoryAttributePrimary5X_107() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_105, OnFailureCallback_105)); + this, OnSuccessCallback_107, OnFailureCallback_107)); return CHIP_NO_ERROR; } - void OnFailureResponse_105(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_107(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_105(uint16_t primary5X) + void OnSuccessResponse_107(uint16_t primary5X) { VerifyOrReturn(CheckConstraintType("primary5X", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary5X", primary5X, 0U)); VerifyOrReturn(CheckConstraintMaxValue("primary5X", primary5X, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary5X_106() + CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary5X_108() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -5835,59 +6043,60 @@ class Test_TC_CC_2_1 : public TestCommand primary5XArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - primary5XArgument, this, OnSuccessCallback_106, OnFailureCallback_106)); + primary5XArgument, this, OnSuccessCallback_108, OnFailureCallback_108)); return CHIP_NO_ERROR; } - void OnFailureResponse_106(EmberAfStatus status) + void OnFailureResponse_108(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_106() { ThrowSuccessResponse(); } + void OnSuccessResponse_108() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary5X_107() + CHIP_ERROR TestReadBackTheMandatoryAttributePrimary5X_109() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_107, OnFailureCallback_107)); + this, OnSuccessCallback_109, OnFailureCallback_109)); return CHIP_NO_ERROR; } - void OnFailureResponse_107(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_109(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_107(uint16_t primary5X) + void OnSuccessResponse_109(uint16_t primary5X) { VerifyOrReturn(CheckValue("primary5X", primary5X, 0U)); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary5Y_108() + CHIP_ERROR TestReadTheMandatoryAttributePrimary5Y_110() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_108, OnFailureCallback_108)); + this, OnSuccessCallback_110, OnFailureCallback_110)); return CHIP_NO_ERROR; } - void OnFailureResponse_108(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_110(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_108(uint16_t primary5Y) + void OnSuccessResponse_110(uint16_t primary5Y) { VerifyOrReturn(CheckConstraintType("primary5Y", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary5Y", primary5Y, 0U)); VerifyOrReturn(CheckConstraintMaxValue("primary5Y", primary5Y, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary5Y_109() + CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary5Y_111() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -5897,78 +6106,79 @@ class Test_TC_CC_2_1 : public TestCommand primary5YArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - primary5YArgument, this, OnSuccessCallback_109, OnFailureCallback_109)); + primary5YArgument, this, OnSuccessCallback_111, OnFailureCallback_111)); return CHIP_NO_ERROR; } - void OnFailureResponse_109(EmberAfStatus status) + void OnFailureResponse_111(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_109() { ThrowSuccessResponse(); } + void OnSuccessResponse_111() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary5Y_110() + CHIP_ERROR TestReadBackTheMandatoryAttributePrimary5Y_112() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_110, OnFailureCallback_110)); + this, OnSuccessCallback_112, OnFailureCallback_112)); return CHIP_NO_ERROR; } - void OnFailureResponse_110(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_112(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_110(uint16_t primary5Y) + void OnSuccessResponse_112(uint16_t primary5Y) { VerifyOrReturn(CheckValue("primary5Y", primary5Y, 0U)); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary5Intensity_111() + CHIP_ERROR TestReadTheMandatoryAttributePrimary5Intensity_113() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_111, OnFailureCallback_111)); + this, OnSuccessCallback_113, OnFailureCallback_113)); return CHIP_NO_ERROR; } - void OnFailureResponse_111(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_113(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_111(uint8_t primary5Intensity) + void OnSuccessResponse_113(uint8_t primary5Intensity) { VerifyOrReturn(CheckConstraintType("primary5Intensity", "", "uint8")); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary6X_112() + CHIP_ERROR TestReadTheMandatoryAttributePrimary6X_114() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_112, OnFailureCallback_112)); + this, OnSuccessCallback_114, OnFailureCallback_114)); return CHIP_NO_ERROR; } - void OnFailureResponse_112(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_114(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_112(uint16_t primary6X) + void OnSuccessResponse_114(uint16_t primary6X) { VerifyOrReturn(CheckConstraintType("primary6X", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary6X", primary6X, 0U)); VerifyOrReturn(CheckConstraintMaxValue("primary6X", primary6X, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary6X_113() + CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary6X_115() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -5978,59 +6188,60 @@ class Test_TC_CC_2_1 : public TestCommand primary6XArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - primary6XArgument, this, OnSuccessCallback_113, OnFailureCallback_113)); + primary6XArgument, this, OnSuccessCallback_115, OnFailureCallback_115)); return CHIP_NO_ERROR; } - void OnFailureResponse_113(EmberAfStatus status) + void OnFailureResponse_115(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_113() { ThrowSuccessResponse(); } + void OnSuccessResponse_115() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary6X_114() + CHIP_ERROR TestReadBackTheMandatoryAttributePrimary6X_116() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_114, OnFailureCallback_114)); + this, OnSuccessCallback_116, OnFailureCallback_116)); return CHIP_NO_ERROR; } - void OnFailureResponse_114(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_116(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_114(uint16_t primary6X) + void OnSuccessResponse_116(uint16_t primary6X) { VerifyOrReturn(CheckValue("primary6X", primary6X, 0U)); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary6Y_115() + CHIP_ERROR TestReadTheMandatoryAttributePrimary6Y_117() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_115, OnFailureCallback_115)); + this, OnSuccessCallback_117, OnFailureCallback_117)); return CHIP_NO_ERROR; } - void OnFailureResponse_115(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_117(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_115(uint16_t primary6Y) + void OnSuccessResponse_117(uint16_t primary6Y) { VerifyOrReturn(CheckConstraintType("primary6Y", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary6Y", primary6Y, 0U)); VerifyOrReturn(CheckConstraintMaxValue("primary6Y", primary6Y, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary6Y_116() + CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary6Y_118() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -6040,81 +6251,82 @@ class Test_TC_CC_2_1 : public TestCommand primary6YArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - primary6YArgument, this, OnSuccessCallback_116, OnFailureCallback_116)); + primary6YArgument, this, OnSuccessCallback_118, OnFailureCallback_118)); return CHIP_NO_ERROR; } - void OnFailureResponse_116(EmberAfStatus status) + void OnFailureResponse_118(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_116() { ThrowSuccessResponse(); } + void OnSuccessResponse_118() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary6Y_117() + CHIP_ERROR TestReadBackTheMandatoryAttributePrimary6Y_119() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_117, OnFailureCallback_117)); + this, OnSuccessCallback_119, OnFailureCallback_119)); return CHIP_NO_ERROR; } - void OnFailureResponse_117(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_119(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_117(uint16_t primary6Y) + void OnSuccessResponse_119(uint16_t primary6Y) { VerifyOrReturn(CheckValue("primary6Y", primary6Y, 0U)); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary6Intensity_118() + CHIP_ERROR TestReadTheMandatoryAttributePrimary6Intensity_120() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_118, OnFailureCallback_118)); + this, OnSuccessCallback_120, OnFailureCallback_120)); return CHIP_NO_ERROR; } - void OnFailureResponse_118(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_120(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_118(uint8_t primary6Intensity) + void OnSuccessResponse_120(uint8_t primary6Intensity) { VerifyOrReturn(CheckConstraintType("primary6Intensity", "", "uint8")); NextTest(); } - CHIP_ERROR TestReadTheOptionalAttributeWhitePointX_119() + CHIP_ERROR TestReadTheOptionalAttributeWhitePointX_121() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_119, OnFailureCallback_119)); + this, OnSuccessCallback_121, OnFailureCallback_121)); return CHIP_NO_ERROR; } - void OnFailureResponse_119(EmberAfStatus status) + void OnFailureResponse_121(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_119(uint16_t whitePointX) + void OnSuccessResponse_121(uint16_t whitePointX) { VerifyOrReturn(CheckConstraintType("whitePointX", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("whitePointX", whitePointX, 0U)); VerifyOrReturn(CheckConstraintMaxValue("whitePointX", whitePointX, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultOptionalAttributeWhitePointX_120() + CHIP_ERROR TestWriteTheDefaultOptionalAttributeWhitePointX_122() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -6124,64 +6336,65 @@ class Test_TC_CC_2_1 : public TestCommand whitePointXArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - whitePointXArgument, this, OnSuccessCallback_120, OnFailureCallback_120)); + whitePointXArgument, this, OnSuccessCallback_122, OnFailureCallback_122)); return CHIP_NO_ERROR; } - void OnFailureResponse_120(EmberAfStatus status) + void OnFailureResponse_122(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_120() { NextTest(); } + void OnSuccessResponse_122() { NextTest(); } - CHIP_ERROR TestReadBackTheOptionalAttributeWhitePointX_121() + CHIP_ERROR TestReadBackTheOptionalAttributeWhitePointX_123() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_121, OnFailureCallback_121)); + this, OnSuccessCallback_123, OnFailureCallback_123)); return CHIP_NO_ERROR; } - void OnFailureResponse_121(EmberAfStatus status) + void OnFailureResponse_123(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_121(uint16_t whitePointX) + void OnSuccessResponse_123(uint16_t whitePointX) { VerifyOrReturn(CheckValue("whitePointX", whitePointX, 0U)); NextTest(); } - CHIP_ERROR TestReadTheOptionalAttributeWhitePointY_122() + CHIP_ERROR TestReadTheOptionalAttributeWhitePointY_124() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_122, OnFailureCallback_122)); + this, OnSuccessCallback_124, OnFailureCallback_124)); return CHIP_NO_ERROR; } - void OnFailureResponse_122(EmberAfStatus status) + void OnFailureResponse_124(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_122(uint16_t whitePointY) + void OnSuccessResponse_124(uint16_t whitePointY) { VerifyOrReturn(CheckConstraintType("whitePointY", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("whitePointY", whitePointY, 0U)); VerifyOrReturn(CheckConstraintMaxValue("whitePointY", whitePointY, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultOptionalAttributeWhitePointY_123() + CHIP_ERROR TestWriteTheDefaultOptionalAttributeWhitePointY_125() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -6191,64 +6404,65 @@ class Test_TC_CC_2_1 : public TestCommand whitePointYArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - whitePointYArgument, this, OnSuccessCallback_123, OnFailureCallback_123)); + whitePointYArgument, this, OnSuccessCallback_125, OnFailureCallback_125)); return CHIP_NO_ERROR; } - void OnFailureResponse_123(EmberAfStatus status) + void OnFailureResponse_125(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_123() { NextTest(); } + void OnSuccessResponse_125() { NextTest(); } - CHIP_ERROR TestReadBackTheOptionalAttributeWhitePointY_124() + CHIP_ERROR TestReadBackTheOptionalAttributeWhitePointY_126() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_124, OnFailureCallback_124)); + this, OnSuccessCallback_126, OnFailureCallback_126)); return CHIP_NO_ERROR; } - void OnFailureResponse_124(EmberAfStatus status) + void OnFailureResponse_126(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_124(uint16_t whitePointY) + void OnSuccessResponse_126(uint16_t whitePointY) { VerifyOrReturn(CheckValue("whitePointY", whitePointY, 0U)); NextTest(); } - CHIP_ERROR TestReadTheOptionalAttributeColorPointRX_125() + CHIP_ERROR TestReadTheOptionalAttributeColorPointRX_127() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_125, OnFailureCallback_125)); + this, OnSuccessCallback_127, OnFailureCallback_127)); return CHIP_NO_ERROR; } - void OnFailureResponse_125(EmberAfStatus status) + void OnFailureResponse_127(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_125(uint16_t colorPointRX) + void OnSuccessResponse_127(uint16_t colorPointRX) { VerifyOrReturn(CheckConstraintType("colorPointRX", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("colorPointRX", colorPointRX, 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorPointRX", colorPointRX, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointRX_126() + CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointRX_128() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -6258,64 +6472,65 @@ class Test_TC_CC_2_1 : public TestCommand colorPointRXArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - colorPointRXArgument, this, OnSuccessCallback_126, OnFailureCallback_126)); + colorPointRXArgument, this, OnSuccessCallback_128, OnFailureCallback_128)); return CHIP_NO_ERROR; } - void OnFailureResponse_126(EmberAfStatus status) + void OnFailureResponse_128(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_126() { NextTest(); } + void OnSuccessResponse_128() { NextTest(); } - CHIP_ERROR TestReadBackTheOptionalAttributeColorPointRX_127() + CHIP_ERROR TestReadBackTheOptionalAttributeColorPointRX_129() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_127, OnFailureCallback_127)); + this, OnSuccessCallback_129, OnFailureCallback_129)); return CHIP_NO_ERROR; } - void OnFailureResponse_127(EmberAfStatus status) + void OnFailureResponse_129(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_127(uint16_t colorPointRX) + void OnSuccessResponse_129(uint16_t colorPointRX) { VerifyOrReturn(CheckValue("colorPointRX", colorPointRX, 0U)); NextTest(); } - CHIP_ERROR TestReadTheOptionalAttributeColorPointRY_128() + CHIP_ERROR TestReadTheOptionalAttributeColorPointRY_130() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_128, OnFailureCallback_128)); + this, OnSuccessCallback_130, OnFailureCallback_130)); return CHIP_NO_ERROR; } - void OnFailureResponse_128(EmberAfStatus status) + void OnFailureResponse_130(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_128(uint16_t colorPointRY) + void OnSuccessResponse_130(uint16_t colorPointRY) { VerifyOrReturn(CheckConstraintType("colorPointRY", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("colorPointRY", colorPointRY, 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorPointRY", colorPointRY, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointRY_129() + CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointRY_131() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -6325,86 +6540,131 @@ class Test_TC_CC_2_1 : public TestCommand colorPointRYArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - colorPointRYArgument, this, OnSuccessCallback_129, OnFailureCallback_129)); + colorPointRYArgument, this, OnSuccessCallback_131, OnFailureCallback_131)); return CHIP_NO_ERROR; } - void OnFailureResponse_129(EmberAfStatus status) + void OnFailureResponse_131(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_129() { NextTest(); } + void OnSuccessResponse_131() { NextTest(); } - CHIP_ERROR TestReadBackTheOptionalAttributeColorPointRY_130() + CHIP_ERROR TestReadBackTheOptionalAttributeColorPointRY_132() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_130, OnFailureCallback_130)); + this, OnSuccessCallback_132, OnFailureCallback_132)); return CHIP_NO_ERROR; } - void OnFailureResponse_130(EmberAfStatus status) + void OnFailureResponse_132(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_130(uint16_t colorPointRY) + void OnSuccessResponse_132(uint16_t colorPointRY) { VerifyOrReturn(CheckValue("colorPointRY", colorPointRY, 0U)); NextTest(); } - CHIP_ERROR TestReadTheOptionalAttributeColorPointRIntensity_131() + CHIP_ERROR TestReadTheOptionalAttributeColorPointRIntensity_133() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_131, OnFailureCallback_131)); + this, OnSuccessCallback_133, OnFailureCallback_133)); return CHIP_NO_ERROR; } - void OnFailureResponse_131(EmberAfStatus status) + void OnFailureResponse_133(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_131(uint8_t colorPointRIntensity) + void OnSuccessResponse_133(uint8_t colorPointRIntensity) { VerifyOrReturn(CheckConstraintType("colorPointRIntensity", "", "uint8")); NextTest(); } - CHIP_ERROR TestReadTheOptionalAttributeColorPointGX_132() + CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointRIntensity_134() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::ColorControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + uint8_t colorPointRIntensityArgument; + colorPointRIntensityArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + colorPointRIntensityArgument, this, OnSuccessCallback_134, OnFailureCallback_134)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_134(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_134() { NextTest(); } + + CHIP_ERROR TestReadBackTheOptionalAttributeColorPointRIntensity_135() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::ColorControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_135, OnFailureCallback_135)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_135(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_135(uint8_t colorPointRIntensity) + { + VerifyOrReturn(CheckValue("colorPointRIntensity", colorPointRIntensity, 0)); + + NextTest(); + } + + CHIP_ERROR TestReadTheOptionalAttributeColorPointGX_136() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_132, OnFailureCallback_132)); + this, OnSuccessCallback_136, OnFailureCallback_136)); return CHIP_NO_ERROR; } - void OnFailureResponse_132(EmberAfStatus status) + void OnFailureResponse_136(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_132(uint16_t colorPointGX) + void OnSuccessResponse_136(uint16_t colorPointGX) { VerifyOrReturn(CheckConstraintType("colorPointGX", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("colorPointGX", colorPointGX, 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorPointGX", colorPointGX, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointGX_133() + CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointGX_137() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -6414,64 +6674,65 @@ class Test_TC_CC_2_1 : public TestCommand colorPointGXArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - colorPointGXArgument, this, OnSuccessCallback_133, OnFailureCallback_133)); + colorPointGXArgument, this, OnSuccessCallback_137, OnFailureCallback_137)); return CHIP_NO_ERROR; } - void OnFailureResponse_133(EmberAfStatus status) + void OnFailureResponse_137(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_133() { NextTest(); } + void OnSuccessResponse_137() { NextTest(); } - CHIP_ERROR TestReadBackTheOptionalAttributeColorPointGX_134() + CHIP_ERROR TestReadBackTheOptionalAttributeColorPointGX_138() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_134, OnFailureCallback_134)); + this, OnSuccessCallback_138, OnFailureCallback_138)); return CHIP_NO_ERROR; } - void OnFailureResponse_134(EmberAfStatus status) + void OnFailureResponse_138(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_134(uint16_t colorPointGX) + void OnSuccessResponse_138(uint16_t colorPointGX) { VerifyOrReturn(CheckValue("colorPointGX", colorPointGX, 0U)); NextTest(); } - CHIP_ERROR TestReadTheOptionalAttributeColorPointGY_135() + CHIP_ERROR TestReadTheOptionalAttributeColorPointGY_139() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_135, OnFailureCallback_135)); + this, OnSuccessCallback_139, OnFailureCallback_139)); return CHIP_NO_ERROR; } - void OnFailureResponse_135(EmberAfStatus status) + void OnFailureResponse_139(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_135(uint16_t colorPointGY) + void OnSuccessResponse_139(uint16_t colorPointGY) { VerifyOrReturn(CheckConstraintType("colorPointGY", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("colorPointGY", colorPointGY, 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorPointGY", colorPointGY, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointGY_136() + CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointGY_140() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -6481,86 +6742,131 @@ class Test_TC_CC_2_1 : public TestCommand colorPointGYArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - colorPointGYArgument, this, OnSuccessCallback_136, OnFailureCallback_136)); + colorPointGYArgument, this, OnSuccessCallback_140, OnFailureCallback_140)); return CHIP_NO_ERROR; } - void OnFailureResponse_136(EmberAfStatus status) + void OnFailureResponse_140(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_136() { NextTest(); } + void OnSuccessResponse_140() { NextTest(); } - CHIP_ERROR TestReadBackTheOptionalAttributeColorPointGY_137() + CHIP_ERROR TestReadBackTheOptionalAttributeColorPointGY_141() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_137, OnFailureCallback_137)); + this, OnSuccessCallback_141, OnFailureCallback_141)); return CHIP_NO_ERROR; } - void OnFailureResponse_137(EmberAfStatus status) + void OnFailureResponse_141(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_137(uint16_t colorPointGY) + void OnSuccessResponse_141(uint16_t colorPointGY) { VerifyOrReturn(CheckValue("colorPointGY", colorPointGY, 0U)); NextTest(); } - CHIP_ERROR TestReadTheOptionalAttributeColorPointGIntensity_138() + CHIP_ERROR TestReadTheOptionalAttributeColorPointGIntensity_142() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_138, OnFailureCallback_138)); + this, OnSuccessCallback_142, OnFailureCallback_142)); return CHIP_NO_ERROR; } - void OnFailureResponse_138(EmberAfStatus status) + void OnFailureResponse_142(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_138(uint8_t colorPointGIntensity) + void OnSuccessResponse_142(uint8_t colorPointGIntensity) { VerifyOrReturn(CheckConstraintType("colorPointGIntensity", "", "uint8")); NextTest(); } - CHIP_ERROR TestReadTheOptionalAttributeColorPointBX_139() + CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointGIntensity_143() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::ColorControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + uint8_t colorPointGIntensityArgument; + colorPointGIntensityArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + colorPointGIntensityArgument, this, OnSuccessCallback_143, OnFailureCallback_143)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_143(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_143() { NextTest(); } + + CHIP_ERROR TestReadBackTheOptionalAttributeColorPointGIntensity_144() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::ColorControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_144, OnFailureCallback_144)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_144(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_144(uint8_t colorPointGIntensity) + { + VerifyOrReturn(CheckValue("colorPointGIntensity", colorPointGIntensity, 0)); + + NextTest(); + } + + CHIP_ERROR TestReadTheOptionalAttributeColorPointBX_145() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_139, OnFailureCallback_139)); + this, OnSuccessCallback_145, OnFailureCallback_145)); return CHIP_NO_ERROR; } - void OnFailureResponse_139(EmberAfStatus status) + void OnFailureResponse_145(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_139(uint16_t colorPointBX) + void OnSuccessResponse_145(uint16_t colorPointBX) { VerifyOrReturn(CheckConstraintType("colorPointBX", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("colorPointBX", colorPointBX, 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorPointBX", colorPointBX, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointBX_140() + CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointBX_146() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -6570,64 +6876,65 @@ class Test_TC_CC_2_1 : public TestCommand colorPointBXArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - colorPointBXArgument, this, OnSuccessCallback_140, OnFailureCallback_140)); + colorPointBXArgument, this, OnSuccessCallback_146, OnFailureCallback_146)); return CHIP_NO_ERROR; } - void OnFailureResponse_140(EmberAfStatus status) + void OnFailureResponse_146(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_140() { NextTest(); } + void OnSuccessResponse_146() { NextTest(); } - CHIP_ERROR TestReadBackTheOptionalAttributeColorPointBX_141() + CHIP_ERROR TestReadBackTheOptionalAttributeColorPointBX_147() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_141, OnFailureCallback_141)); + this, OnSuccessCallback_147, OnFailureCallback_147)); return CHIP_NO_ERROR; } - void OnFailureResponse_141(EmberAfStatus status) + void OnFailureResponse_147(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_141(uint16_t colorPointBX) + void OnSuccessResponse_147(uint16_t colorPointBX) { VerifyOrReturn(CheckValue("colorPointBX", colorPointBX, 0U)); NextTest(); } - CHIP_ERROR TestReadTheOptionalAttributeColorPointBY_142() + CHIP_ERROR TestReadTheOptionalAttributeColorPointBY_148() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_142, OnFailureCallback_142)); + this, OnSuccessCallback_148, OnFailureCallback_148)); return CHIP_NO_ERROR; } - void OnFailureResponse_142(EmberAfStatus status) + void OnFailureResponse_148(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_142(uint16_t colorPointBY) + void OnSuccessResponse_148(uint16_t colorPointBY) { VerifyOrReturn(CheckConstraintType("colorPointBY", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("colorPointBY", colorPointBY, 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorPointBY", colorPointBY, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointBY_143() + CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointBY_149() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -6637,61 +6944,105 @@ class Test_TC_CC_2_1 : public TestCommand colorPointBYArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - colorPointBYArgument, this, OnSuccessCallback_143, OnFailureCallback_143)); + colorPointBYArgument, this, OnSuccessCallback_149, OnFailureCallback_149)); return CHIP_NO_ERROR; } - void OnFailureResponse_143(EmberAfStatus status) + void OnFailureResponse_149(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_143() { NextTest(); } + void OnSuccessResponse_149() { NextTest(); } - CHIP_ERROR TestReadBackTheOptionalAttributeColorPointBY_144() + CHIP_ERROR TestReadBackTheOptionalAttributeColorPointBY_150() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_144, OnFailureCallback_144)); + this, OnSuccessCallback_150, OnFailureCallback_150)); return CHIP_NO_ERROR; } - void OnFailureResponse_144(EmberAfStatus status) + void OnFailureResponse_150(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_144(uint16_t colorPointBY) + void OnSuccessResponse_150(uint16_t colorPointBY) { VerifyOrReturn(CheckValue("colorPointBY", colorPointBY, 0U)); NextTest(); } - CHIP_ERROR TestReadTheOptionalAttributeColorPointBIntensity_145() + CHIP_ERROR TestReadTheOptionalAttributeColorPointBIntensity_151() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_145, OnFailureCallback_145)); + this, OnSuccessCallback_151, OnFailureCallback_151)); return CHIP_NO_ERROR; } - void OnFailureResponse_145(EmberAfStatus status) + void OnFailureResponse_151(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_145(uint8_t colorPointBIntensity) + void OnSuccessResponse_151(uint8_t colorPointBIntensity) { VerifyOrReturn(CheckConstraintType("colorPointBIntensity", "", "uint8")); NextTest(); } + + CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointBIntensity_152() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::ColorControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + uint8_t colorPointBIntensityArgument; + colorPointBIntensityArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + colorPointBIntensityArgument, this, OnSuccessCallback_152, OnFailureCallback_152)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_152(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_152() { NextTest(); } + + CHIP_ERROR TestReadBackTheOptionalAttributeColorPointBIntensity_153() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::ColorControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_153, OnFailureCallback_153)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_153(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_153(uint8_t colorPointBIntensity) + { + VerifyOrReturn(CheckValue("colorPointBIntensity", colorPointBIntensity, 0)); + + NextTest(); + } }; class Test_TC_CC_3_1 : public TestCommand @@ -11755,80 +12106,174 @@ class Test_TC_CC_9_1 : public TestCommand break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_3(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Read ColorLoopActive attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPACTIVE") ? CHIP_NO_ERROR : TestReadColorLoopActiveAttributeFromDut_4(); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_5(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_5(); break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Read ColorLoopDirection attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPDIRECTION") ? CHIP_NO_ERROR : TestReadColorLoopDirectionAttributeFromDut_6(); + if (ShouldSkip("A_COLORLOOPDIRECTION")) + { + NextTest(); + return; + } + err = TestReadColorLoopDirectionAttributeFromDut_6(); break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_7(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_7(); break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Read ColorLoopTime attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPTIME") ? CHIP_NO_ERROR : TestReadColorLoopTimeAttributeFromDut_8(); + if (ShouldSkip("A_COLORLOOPTIME")) + { + NextTest(); + return; + } + err = TestReadColorLoopTimeAttributeFromDut_8(); break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_9(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_9(); break; case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : Read ColorLoopStartEnhancedHue attribute from DUT\n"); - err = - ShouldSkip("A_COLORLOOPSTARTENHANCEDHUE") ? CHIP_NO_ERROR : TestReadColorLoopStartEnhancedHueAttributeFromDut_10(); + if (ShouldSkip("A_COLORLOOPSTARTENHANCEDHUE")) + { + NextTest(); + return; + } + err = TestReadColorLoopStartEnhancedHueAttributeFromDut_10(); break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_11(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_11(); break; case 12: ChipLogProgress(chipTool, " ***** Test Step 12 : Read ColorLoopActive attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPACTIVE") ? CHIP_NO_ERROR : TestReadColorLoopActiveAttributeFromDut_12(); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_12(); break; case 13: ChipLogProgress(chipTool, " ***** Test Step 13 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_13(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_13(); break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Read ColorLoopActive attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPACTIVE") ? CHIP_NO_ERROR : TestReadColorLoopActiveAttributeFromDut_14(); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_14(); break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_15(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_15(); break; case 16: ChipLogProgress(chipTool, " ***** Test Step 16 : Read ColorLoopDirection attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPDIRECTION") ? CHIP_NO_ERROR : TestReadColorLoopDirectionAttributeFromDut_16(); + if (ShouldSkip("A_COLORLOOPDIRECTION")) + { + NextTest(); + return; + } + err = TestReadColorLoopDirectionAttributeFromDut_16(); break; case 17: ChipLogProgress(chipTool, " ***** Test Step 17 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_17(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_17(); break; case 18: ChipLogProgress(chipTool, " ***** Test Step 18 : Read ColorLoopActive attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPACTIVE") ? CHIP_NO_ERROR : TestReadColorLoopActiveAttributeFromDut_18(); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_18(); break; case 19: ChipLogProgress(chipTool, " ***** Test Step 19 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_19(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_19(); break; case 20: ChipLogProgress(chipTool, " ***** Test Step 20 : Read ColorLoopActive attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPACTIVE") ? CHIP_NO_ERROR : TestReadColorLoopActiveAttributeFromDut_20(); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_20(); break; case 21: ChipLogProgress(chipTool, " ***** Test Step 21 : Enhanced Move To Hue command 10\n"); - err = ShouldSkip("CR_ENHANCEDMOVETOHUE") ? CHIP_NO_ERROR : TestEnhancedMoveToHueCommand10_21(); + if (ShouldSkip("CR_ENHANCEDMOVETOHUE")) + { + NextTest(); + return; + } + err = TestEnhancedMoveToHueCommand10_21(); break; case 22: ChipLogProgress(chipTool, " ***** Test Step 22 : Wait 2000ms\n"); @@ -11836,55 +12281,120 @@ class Test_TC_CC_9_1 : public TestCommand break; case 23: ChipLogProgress(chipTool, " ***** Test Step 23 : Read EnhancedCurrentHue attribute from DUT\n"); - err = ShouldSkip("A_ENHANCEDCURRENTHUE") ? CHIP_NO_ERROR : TestReadEnhancedCurrentHueAttributeFromDut_23(); + if (ShouldSkip("A_ENHANCEDCURRENTHUE")) + { + NextTest(); + return; + } + err = TestReadEnhancedCurrentHueAttributeFromDut_23(); break; case 24: ChipLogProgress(chipTool, " ***** Test Step 24 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_24(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_24(); break; case 25: ChipLogProgress(chipTool, " ***** Test Step 25 : Read ColorLoopDirection attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPDIRECTION") ? CHIP_NO_ERROR : TestReadColorLoopDirectionAttributeFromDut_25(); + if (ShouldSkip("A_COLORLOOPDIRECTION")) + { + NextTest(); + return; + } + err = TestReadColorLoopDirectionAttributeFromDut_25(); break; case 26: ChipLogProgress(chipTool, " ***** Test Step 26 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_26(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_26(); break; case 27: ChipLogProgress(chipTool, " ***** Test Step 27 : Read ColorLoopActive attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPACTIVE") ? CHIP_NO_ERROR : TestReadColorLoopActiveAttributeFromDut_27(); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_27(); break; case 28: ChipLogProgress(chipTool, " ***** Test Step 28 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_28(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_28(); break; case 29: ChipLogProgress(chipTool, " ***** Test Step 29 : Read ColorLoopActive attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPACTIVE") ? CHIP_NO_ERROR : TestReadColorLoopActiveAttributeFromDut_29(); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_29(); break; case 30: ChipLogProgress(chipTool, " ***** Test Step 30 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_30(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_30(); break; case 31: ChipLogProgress(chipTool, " ***** Test Step 31 : Read ColorLoopDirection attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPDIRECTION") ? CHIP_NO_ERROR : TestReadColorLoopDirectionAttributeFromDut_31(); + if (ShouldSkip("A_COLORLOOPDIRECTION")) + { + NextTest(); + return; + } + err = TestReadColorLoopDirectionAttributeFromDut_31(); break; case 32: ChipLogProgress(chipTool, " ***** Test Step 32 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_32(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_32(); break; case 33: ChipLogProgress(chipTool, " ***** Test Step 33 : Read ColorLoopActive attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPACTIVE") ? CHIP_NO_ERROR : TestReadColorLoopActiveAttributeFromDut_33(); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_33(); break; case 34: ChipLogProgress(chipTool, " ***** Test Step 34 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_34(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_34(); break; case 35: ChipLogProgress(chipTool, " ***** Test Step 35 : Read ColorLoopActive attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPACTIVE") ? CHIP_NO_ERROR : TestReadColorLoopActiveAttributeFromDut_35(); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_35(); break; case 36: ChipLogProgress(chipTool, " ***** Test Step 36 : Turn Off light for color control tests\n"); @@ -13006,47 +13516,102 @@ class Test_TC_CC_9_2 : public TestCommand break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_3(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Read ColorLoopActive attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPACTIVE") ? CHIP_NO_ERROR : TestReadColorLoopActiveAttributeFromDut_4(); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Read ColorLoopDirection attribute from DUT.\n"); - err = ShouldSkip("A_COLORLOOPDIRECTION") ? CHIP_NO_ERROR : TestReadColorLoopDirectionAttributeFromDut_5(); + if (ShouldSkip("A_COLORLOOPDIRECTION")) + { + NextTest(); + return; + } + err = TestReadColorLoopDirectionAttributeFromDut_5(); break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Read ColorLoopTime attribute from DUT.\n"); - err = ShouldSkip("A_COLORLOOPTIME") ? CHIP_NO_ERROR : TestReadColorLoopTimeAttributeFromDut_6(); + if (ShouldSkip("A_COLORLOOPTIME")) + { + NextTest(); + return; + } + err = TestReadColorLoopTimeAttributeFromDut_6(); break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Read ColorLoopStartEnhancedHue attribute from DUT.\n"); - err = ShouldSkip("A_COLORLOOPSTARTENHANCEDHUE") ? CHIP_NO_ERROR : TestReadColorLoopStartEnhancedHueAttributeFromDut_7(); + if (ShouldSkip("A_COLORLOOPSTARTENHANCEDHUE")) + { + NextTest(); + return; + } + err = TestReadColorLoopStartEnhancedHueAttributeFromDut_7(); break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Color Loop Set Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestColorLoopSetCommandSetAllAttributes_8(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestColorLoopSetCommandSetAllAttributes_8(); break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Read ColorLoopActive attribute from DUT.\n"); - err = ShouldSkip("A_COLORLOOPACTIVE") ? CHIP_NO_ERROR : TestReadColorLoopActiveAttributeFromDut_9(); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_9(); break; case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : Color Loop Set Command - Start Color Loop\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestColorLoopSetCommandStartColorLoop_10(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestColorLoopSetCommandStartColorLoop_10(); break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : Read ColorLoopDirection attribute from DUT.\n"); - err = ShouldSkip("A_COLORLOOPDIRECTION") ? CHIP_NO_ERROR : TestReadColorLoopDirectionAttributeFromDut_11(); + if (ShouldSkip("A_COLORLOOPDIRECTION")) + { + NextTest(); + return; + } + err = TestReadColorLoopDirectionAttributeFromDut_11(); break; case 12: ChipLogProgress(chipTool, " ***** Test Step 12 : Color Loop Set Command - Start Color Loop\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestColorLoopSetCommandStartColorLoop_12(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestColorLoopSetCommandStartColorLoop_12(); break; case 13: ChipLogProgress(chipTool, " ***** Test Step 13 : Read ColorLoopActive attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPACTIVE") ? CHIP_NO_ERROR : TestReadColorLoopActiveAttributeFromDut_13(); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_13(); break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Turn off light for color control tests\n"); @@ -13534,47 +14099,102 @@ class Test_TC_CC_9_3 : public TestCommand break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_3(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Read ColorLoopActive attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPACTIVE") ? CHIP_NO_ERROR : TestReadColorLoopActiveAttributeFromDut_4(); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Read ColorLoopDirection attribute from DUT.\n"); - err = ShouldSkip("A_COLORLOOPDIRECTION") ? CHIP_NO_ERROR : TestReadColorLoopDirectionAttributeFromDut_5(); + if (ShouldSkip("A_COLORLOOPDIRECTION")) + { + NextTest(); + return; + } + err = TestReadColorLoopDirectionAttributeFromDut_5(); break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Read ColorLoopTime attribute from DUT.\n"); - err = ShouldSkip("A_COLORLOOPTIME") ? CHIP_NO_ERROR : TestReadColorLoopTimeAttributeFromDut_6(); + if (ShouldSkip("A_COLORLOOPTIME")) + { + NextTest(); + return; + } + err = TestReadColorLoopTimeAttributeFromDut_6(); break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Read ColorLoopStartEnhancedHue attribute from DUT.\n"); - err = ShouldSkip("A_COLORLOOPSTARTENHANCEDHUE") ? CHIP_NO_ERROR : TestReadColorLoopStartEnhancedHueAttributeFromDut_7(); + if (ShouldSkip("A_COLORLOOPSTARTENHANCEDHUE")) + { + NextTest(); + return; + } + err = TestReadColorLoopStartEnhancedHueAttributeFromDut_7(); break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Color Loop Set Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestColorLoopSetCommandSetAllAttributes_8(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestColorLoopSetCommandSetAllAttributes_8(); break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Read ColorLoopActive attribute from DUT.\n"); - err = ShouldSkip("A_COLORLOOPACTIVE") ? CHIP_NO_ERROR : TestReadColorLoopActiveAttributeFromDut_9(); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_9(); break; case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : Color Loop Set Command - Start Color Loop\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestColorLoopSetCommandStartColorLoop_10(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestColorLoopSetCommandStartColorLoop_10(); break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : Read ColorLoopTime attribute from DUT.\n"); - err = ShouldSkip("A_COLORLOOPTIME") ? CHIP_NO_ERROR : TestReadColorLoopTimeAttributeFromDut_11(); + if (ShouldSkip("A_COLORLOOPTIME")) + { + NextTest(); + return; + } + err = TestReadColorLoopTimeAttributeFromDut_11(); break; case 12: ChipLogProgress(chipTool, " ***** Test Step 12 : Color Loop Set Command - Start Color Loop\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestColorLoopSetCommandStartColorLoop_12(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestColorLoopSetCommandStartColorLoop_12(); break; case 13: ChipLogProgress(chipTool, " ***** Test Step 13 : Read ColorLoopActive attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPACTIVE") ? CHIP_NO_ERROR : TestReadColorLoopActiveAttributeFromDut_13(); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_13(); break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Turn off light for color control tests\n"); @@ -14488,11 +15108,21 @@ class Test_TC_DM_1_1 : public TestCommand break; case 12: ChipLogProgress(chipTool, " ***** Test Step 12 : Query ManufacturingDate\n"); - err = ShouldSkip("MANF_DATE") ? CHIP_NO_ERROR : TestQueryManufacturingDate_12(); + if (ShouldSkip("MANF_DATE")) + { + NextTest(); + return; + } + err = TestQueryManufacturingDate_12(); break; case 13: ChipLogProgress(chipTool, " ***** Test Step 13 : Query PartNumber\n"); - err = ShouldSkip("PART_NUM") ? CHIP_NO_ERROR : TestQueryPartNumber_13(); + if (ShouldSkip("PART_NUM")) + { + NextTest(); + return; + } + err = TestQueryPartNumber_13(); break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Query ProductURL\n"); @@ -16209,6 +16839,7 @@ class Test_TC_FLW_2_1 : public TestCommand void OnSuccessResponse_11(uint16_t tolerance) { VerifyOrReturn(CheckConstraintType("tolerance", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("tolerance", tolerance, 0U)); VerifyOrReturn(CheckConstraintMaxValue("tolerance", tolerance, 2048U)); NextTest(); } @@ -19507,6 +20138,7 @@ class Test_TC_OCC_2_1 : public TestCommand void OnSuccessResponse_1(uint8_t occupancy) { VerifyOrReturn(CheckConstraintType("occupancy", "", "map8")); + VerifyOrReturn(CheckConstraintMinValue("occupancy", occupancy, 0)); VerifyOrReturn(CheckConstraintMaxValue("occupancy", occupancy, 1)); NextTest(); } @@ -19570,6 +20202,7 @@ class Test_TC_OCC_2_1 : public TestCommand void OnSuccessResponse_4(uint8_t occupancySensorType) { VerifyOrReturn(CheckConstraintType("occupancySensorType", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("occupancySensorType", occupancySensorType, 0)); VerifyOrReturn(CheckConstraintMaxValue("occupancySensorType", occupancySensorType, 3)); NextTest(); } @@ -19725,11 +20358,21 @@ class Test_TC_OCC_2_2 : public TestCommand break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Reads Occupancy attribute from DUT\n"); - err = ShouldSkip("A_OCCUPANCY") ? CHIP_NO_ERROR : TestReadsOccupancyAttributeFromDut_1(); + if (ShouldSkip("A_OCCUPANCY")) + { + NextTest(); + return; + } + err = TestReadsOccupancyAttributeFromDut_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Reads Occupancy attribute from DUT\n"); - err = ShouldSkip("A_OCCUPANCY") ? CHIP_NO_ERROR : TestReadsOccupancyAttributeFromDut_2(); + if (ShouldSkip("A_OCCUPANCY")) + { + NextTest(); + return; + } + err = TestReadsOccupancyAttributeFromDut_2(); break; } @@ -21250,7 +21893,12 @@ class Test_TC_OO_2_3 : public TestCommand break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Send On Command\n"); - err = ShouldSkip("CR_ON") ? CHIP_NO_ERROR : TestSendOnCommand_1(); + if (ShouldSkip("CR_ON")) + { + NextTest(); + return; + } + err = TestSendOnCommand_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Wait 1000ms\n"); @@ -21258,15 +21906,30 @@ class Test_TC_OO_2_3 : public TestCommand break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Reads OnOff attribute from DUT\n"); - err = ShouldSkip("A_ONOFF") ? CHIP_NO_ERROR : TestReadsOnOffAttributeFromDut_3(); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Reads GlobalSceneControl attribute from DUT\n"); - err = ShouldSkip("A_GLOBALSCENECONTROL") ? CHIP_NO_ERROR : TestReadsGlobalSceneControlAttributeFromDut_4(); + if (ShouldSkip("A_GLOBALSCENECONTROL")) + { + NextTest(); + return; + } + err = TestReadsGlobalSceneControlAttributeFromDut_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Send On Command\n"); - err = ShouldSkip("CR_ON") ? CHIP_NO_ERROR : TestSendOnCommand_5(); + if (ShouldSkip("CR_ON")) + { + NextTest(); + return; + } + err = TestSendOnCommand_5(); break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); @@ -21274,15 +21937,30 @@ class Test_TC_OO_2_3 : public TestCommand break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Reads OnOff attribute from DUT\n"); - err = ShouldSkip("A_ONOFF") ? CHIP_NO_ERROR : TestReadsOnOffAttributeFromDut_7(); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_7(); break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Reads GlobalSceneControl attribute from DUT\n"); - err = ShouldSkip("A_GLOBALSCENECONTROL") ? CHIP_NO_ERROR : TestReadsGlobalSceneControlAttributeFromDut_8(); + if (ShouldSkip("A_GLOBALSCENECONTROL")) + { + NextTest(); + return; + } + err = TestReadsGlobalSceneControlAttributeFromDut_8(); break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Send On Command\n"); - err = ShouldSkip("CR_ON") ? CHIP_NO_ERROR : TestSendOnCommand_9(); + if (ShouldSkip("CR_ON")) + { + NextTest(); + return; + } + err = TestSendOnCommand_9(); break; case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 1000ms\n"); @@ -21290,147 +21968,327 @@ class Test_TC_OO_2_3 : public TestCommand break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : Reads OnOff attribute from DUT\n"); - err = ShouldSkip("A_ONOFF") ? CHIP_NO_ERROR : TestReadsOnOffAttributeFromDut_11(); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_11(); break; case 12: ChipLogProgress(chipTool, " ***** Test Step 12 : Reads GlobalSceneControl attribute from DUT\n"); - err = ShouldSkip("A_GLOBALSCENECONTROL") ? CHIP_NO_ERROR : TestReadsGlobalSceneControlAttributeFromDut_12(); + if (ShouldSkip("A_GLOBALSCENECONTROL")) + { + NextTest(); + return; + } + err = TestReadsGlobalSceneControlAttributeFromDut_12(); break; case 13: ChipLogProgress(chipTool, " ***** Test Step 13 : Reads OnTime attribute from DUT\n"); - err = ShouldSkip("A_ONTIME") ? CHIP_NO_ERROR : TestReadsOnTimeAttributeFromDut_13(); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_13(); break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Reads OffWaitTime attribute from DUT\n"); - err = ShouldSkip("A_OFFWAITTIME") ? CHIP_NO_ERROR : TestReadsOffWaitTimeAttributeFromDut_14(); + if (ShouldSkip("A_OFFWAITTIME")) + { + NextTest(); + return; + } + err = TestReadsOffWaitTimeAttributeFromDut_14(); break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Send On Command\n"); - err = ShouldSkip("CR_ON") ? CHIP_NO_ERROR : TestSendOnCommand_15(); + if (ShouldSkip("CR_ON")) + { + NextTest(); + return; + } + err = TestSendOnCommand_15(); break; case 16: ChipLogProgress(chipTool, " ***** Test Step 16 : Reads OnOff attribute from DUT\n"); - err = ShouldSkip("A_ONOFF") ? CHIP_NO_ERROR : TestReadsOnOffAttributeFromDut_16(); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_16(); break; case 17: ChipLogProgress(chipTool, " ***** Test Step 17 : Reads OnTime attribute from DUT\n"); - err = ShouldSkip("A_ONTIME") ? CHIP_NO_ERROR : TestReadsOnTimeAttributeFromDut_17(); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_17(); break; case 18: ChipLogProgress(chipTool, " ***** Test Step 18 : Reads OffWaitTime attribute from DUT\n"); - err = ShouldSkip("A_OFFWAITTIME") ? CHIP_NO_ERROR : TestReadsOffWaitTimeAttributeFromDut_18(); + if (ShouldSkip("A_OFFWAITTIME")) + { + NextTest(); + return; + } + err = TestReadsOffWaitTimeAttributeFromDut_18(); break; case 19: ChipLogProgress(chipTool, " ***** Test Step 19 : Send Off Command\n"); - err = ShouldSkip("CR_OFF") ? CHIP_NO_ERROR : TestSendOffCommand_19(); + if (ShouldSkip("CR_OFF")) + { + NextTest(); + return; + } + err = TestSendOffCommand_19(); break; case 20: ChipLogProgress(chipTool, " ***** Test Step 20 : Reads OnOff attribute from DUT\n"); - err = ShouldSkip("A_ONOFF") ? CHIP_NO_ERROR : TestReadsOnOffAttributeFromDut_20(); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_20(); break; case 21: ChipLogProgress(chipTool, " ***** Test Step 21 : Reads OnTime attribute from DUT\n"); - err = ShouldSkip("A_ONTIME") ? CHIP_NO_ERROR : TestReadsOnTimeAttributeFromDut_21(); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_21(); break; case 22: ChipLogProgress(chipTool, " ***** Test Step 22 : Reads OnOff attribute from DUT\n"); - err = ShouldSkip("A_ONOFF") ? CHIP_NO_ERROR : TestReadsOnOffAttributeFromDut_22(); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_22(); break; case 23: ChipLogProgress(chipTool, " ***** Test Step 23 : Reads OnTime attribute from DUT\n"); - err = ShouldSkip("A_ONTIME") ? CHIP_NO_ERROR : TestReadsOnTimeAttributeFromDut_23(); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_23(); break; case 24: ChipLogProgress(chipTool, " ***** Test Step 24 : Reads OffWaitTime attribute from DUT\n"); - err = ShouldSkip("A_OFFWAITTIME") ? CHIP_NO_ERROR : TestReadsOffWaitTimeAttributeFromDut_24(); + if (ShouldSkip("A_OFFWAITTIME")) + { + NextTest(); + return; + } + err = TestReadsOffWaitTimeAttributeFromDut_24(); break; case 25: ChipLogProgress(chipTool, " ***** Test Step 25 : Send On Command\n"); - err = ShouldSkip("CR_ON") ? CHIP_NO_ERROR : TestSendOnCommand_25(); + if (ShouldSkip("CR_ON")) + { + NextTest(); + return; + } + err = TestSendOnCommand_25(); break; case 26: ChipLogProgress(chipTool, " ***** Test Step 26 : Reads OnTime attribute from DUT\n"); - err = ShouldSkip("A_ONTIME") ? CHIP_NO_ERROR : TestReadsOnTimeAttributeFromDut_26(); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_26(); break; case 27: ChipLogProgress(chipTool, " ***** Test Step 27 : Reads OffWaitTime attribute from DUT\n"); - err = ShouldSkip("A_OFFWAITTIME") ? CHIP_NO_ERROR : TestReadsOffWaitTimeAttributeFromDut_27(); + if (ShouldSkip("A_OFFWAITTIME")) + { + NextTest(); + return; + } + err = TestReadsOffWaitTimeAttributeFromDut_27(); break; case 28: ChipLogProgress(chipTool, " ***** Test Step 28 : Send Off Command\n"); - err = ShouldSkip("CR_OFF") ? CHIP_NO_ERROR : TestSendOffCommand_28(); + if (ShouldSkip("CR_OFF")) + { + NextTest(); + return; + } + err = TestSendOffCommand_28(); break; case 29: ChipLogProgress(chipTool, " ***** Test Step 29 : Reads OnOff attribute from DUT\n"); - err = ShouldSkip("A_ONOFF") ? CHIP_NO_ERROR : TestReadsOnOffAttributeFromDut_29(); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_29(); break; case 30: ChipLogProgress(chipTool, " ***** Test Step 30 : Reads OnTime attribute from DUT\n"); - err = ShouldSkip("A_ONTIME") ? CHIP_NO_ERROR : TestReadsOnTimeAttributeFromDut_30(); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_30(); break; case 31: ChipLogProgress(chipTool, " ***** Test Step 31 : Reads OnOff attribute from DUT\n"); - err = ShouldSkip("A_ONOFF") ? CHIP_NO_ERROR : TestReadsOnOffAttributeFromDut_31(); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_31(); break; case 32: ChipLogProgress(chipTool, " ***** Test Step 32 : Reads OnTime attribute from DUT\n"); - err = ShouldSkip("A_ONTIME") ? CHIP_NO_ERROR : TestReadsOnTimeAttributeFromDut_32(); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_32(); break; case 33: ChipLogProgress(chipTool, " ***** Test Step 33 : Send On Command\n"); - err = ShouldSkip("CR_ON") ? CHIP_NO_ERROR : TestSendOnCommand_33(); + if (ShouldSkip("CR_ON")) + { + NextTest(); + return; + } + err = TestSendOnCommand_33(); break; case 34: ChipLogProgress(chipTool, " ***** Test Step 34 : Reads OnOff attribute from DUT\n"); - err = ShouldSkip("A_ONOFF") ? CHIP_NO_ERROR : TestReadsOnOffAttributeFromDut_34(); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_34(); break; case 35: ChipLogProgress(chipTool, " ***** Test Step 35 : Reads OnTime attribute from DUT\n"); - err = ShouldSkip("A_ONTIME") ? CHIP_NO_ERROR : TestReadsOnTimeAttributeFromDut_35(); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_35(); break; case 36: ChipLogProgress(chipTool, " ***** Test Step 36 : Reads OffWaitTime attribute from DUT\n"); - err = ShouldSkip("A_OFFWAITTIME") ? CHIP_NO_ERROR : TestReadsOffWaitTimeAttributeFromDut_36(); + if (ShouldSkip("A_OFFWAITTIME")) + { + NextTest(); + return; + } + err = TestReadsOffWaitTimeAttributeFromDut_36(); break; case 37: ChipLogProgress(chipTool, " ***** Test Step 37 : Send Off Command\n"); - err = ShouldSkip("CR_OFF") ? CHIP_NO_ERROR : TestSendOffCommand_37(); + if (ShouldSkip("CR_OFF")) + { + NextTest(); + return; + } + err = TestSendOffCommand_37(); break; case 38: ChipLogProgress(chipTool, " ***** Test Step 38 : Reads OnOff attribute from DUT\n"); - err = ShouldSkip("A_ONOFF") ? CHIP_NO_ERROR : TestReadsOnOffAttributeFromDut_38(); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_38(); break; case 39: ChipLogProgress(chipTool, " ***** Test Step 39 : Reads OnTime attribute from DUT\n"); - err = ShouldSkip("A_ONTIME") ? CHIP_NO_ERROR : TestReadsOnTimeAttributeFromDut_39(); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_39(); break; case 40: ChipLogProgress(chipTool, " ***** Test Step 40 : Reads OnOff attribute from DUT\n"); - err = ShouldSkip("A_ONOFF") ? CHIP_NO_ERROR : TestReadsOnOffAttributeFromDut_40(); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_40(); break; case 41: ChipLogProgress(chipTool, " ***** Test Step 41 : Reads OnTime attribute from DUT\n"); - err = ShouldSkip("A_ONTIME") ? CHIP_NO_ERROR : TestReadsOnTimeAttributeFromDut_41(); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_41(); break; case 42: ChipLogProgress(chipTool, " ***** Test Step 42 : Reads OffWaitTime attribute from DUT\n"); - err = ShouldSkip("A_OFFWAITTIME") ? CHIP_NO_ERROR : TestReadsOffWaitTimeAttributeFromDut_42(); + if (ShouldSkip("A_OFFWAITTIME")) + { + NextTest(); + return; + } + err = TestReadsOffWaitTimeAttributeFromDut_42(); break; case 43: ChipLogProgress(chipTool, " ***** Test Step 43 : Reads OnOff attribute from DUT\n"); - err = ShouldSkip("A_ONOFF") ? CHIP_NO_ERROR : TestReadsOnOffAttributeFromDut_43(); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_43(); break; case 44: ChipLogProgress(chipTool, " ***** Test Step 44 : Reads OnTime attribute from DUT\n"); - err = ShouldSkip("A_ONTIME") ? CHIP_NO_ERROR : TestReadsOnTimeAttributeFromDut_44(); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_44(); break; case 45: ChipLogProgress(chipTool, " ***** Test Step 45 : Reads OffWaitTime attribute from DUT\n"); - err = ShouldSkip("A_OFFWAITTIME") ? CHIP_NO_ERROR : TestReadsOffWaitTimeAttributeFromDut_45(); + if (ShouldSkip("A_OFFWAITTIME")) + { + NextTest(); + return; + } + err = TestReadsOffWaitTimeAttributeFromDut_45(); break; case 46: ChipLogProgress(chipTool, " ***** Test Step 46 : Send Off Command\n"); - err = ShouldSkip("CR_OFF") ? CHIP_NO_ERROR : TestSendOffCommand_46(); + if (ShouldSkip("CR_OFF")) + { + NextTest(); + return; + } + err = TestSendOffCommand_46(); break; } @@ -25253,15 +26111,30 @@ class Test_TC_PCC_2_2 : public TestCommand break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Write 1 to the OperationMode attribute to DUT: OperationMode\n"); - err = ShouldSkip("A_OPERATIONMODE") ? CHIP_NO_ERROR : TestWrite1ToTheOperationModeAttributeToDutOperationMode_1(); + if (ShouldSkip("A_OPERATIONMODE")) + { + NextTest(); + return; + } + err = TestWrite1ToTheOperationModeAttributeToDutOperationMode_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Write 2 to the OperationMode attribute to DUT: OperationMode\n"); - err = ShouldSkip("A_OPERATIONMODE") ? CHIP_NO_ERROR : TestWrite2ToTheOperationModeAttributeToDutOperationMode_2(); + if (ShouldSkip("A_OPERATIONMODE")) + { + NextTest(); + return; + } + err = TestWrite2ToTheOperationModeAttributeToDutOperationMode_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Write 3 to the OperationMode attribute to DUT: OperationMode\n"); - err = ShouldSkip("A_OPERATIONMODE") ? CHIP_NO_ERROR : TestWrite3ToTheOperationModeAttributeToDutOperationMode_3(); + if (ShouldSkip("A_OPERATIONMODE")) + { + NextTest(); + return; + } + err = TestWrite3ToTheOperationModeAttributeToDutOperationMode_3(); break; } @@ -25408,39 +26281,84 @@ class Test_TC_PCC_2_3 : public TestCommand break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Write 0 to the OperationMode attribute to DUT\n"); - err = ShouldSkip("A_OPERATIONMODE") ? CHIP_NO_ERROR : TestWrite0ToTheOperationModeAttributeToDut_1(); + if (ShouldSkip("A_OPERATIONMODE")) + { + NextTest(); + return; + } + err = TestWrite0ToTheOperationModeAttributeToDut_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the attribute: EffectiveOperationMode\n"); - err = ShouldSkip("A_EFFECTIVEOPERATIONMODE") ? CHIP_NO_ERROR : TestReadsTheAttributeEffectiveOperationMode_2(); + if (ShouldSkip("A_EFFECTIVEOPERATIONMODE")) + { + NextTest(); + return; + } + err = TestReadsTheAttributeEffectiveOperationMode_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Write 0 to the ControlMode attribute to DUT\n"); - err = ShouldSkip("A_CONTROLMODE") ? CHIP_NO_ERROR : TestWrite0ToTheControlModeAttributeToDut_3(); + if (ShouldSkip("A_CONTROLMODE")) + { + NextTest(); + return; + } + err = TestWrite0ToTheControlModeAttributeToDut_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the attribute: EffectiveControlMode\n"); - err = ShouldSkip("A_EFFECTIVECONTROLMODE") ? CHIP_NO_ERROR : TestReadsTheAttributeEffectiveControlMode_4(); + if (ShouldSkip("A_EFFECTIVECONTROLMODE")) + { + NextTest(); + return; + } + err = TestReadsTheAttributeEffectiveControlMode_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Write 1 to the ControlMode attribute to DUT\n"); - err = ShouldSkip("A_CONTROLMODE") ? CHIP_NO_ERROR : TestWrite1ToTheControlModeAttributeToDut_5(); + if (ShouldSkip("A_CONTROLMODE")) + { + NextTest(); + return; + } + err = TestWrite1ToTheControlModeAttributeToDut_5(); break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Write 2 to the ControlMode attribute to DUT\n"); - err = ShouldSkip("A_CONTROLMODE") ? CHIP_NO_ERROR : TestWrite2ToTheControlModeAttributeToDut_6(); + if (ShouldSkip("A_CONTROLMODE")) + { + NextTest(); + return; + } + err = TestWrite2ToTheControlModeAttributeToDut_6(); break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Write 3 to the ControlMode attribute to DUT\n"); - err = ShouldSkip("A_CONTROLMODE") ? CHIP_NO_ERROR : TestWrite3ToTheControlModeAttributeToDut_7(); + if (ShouldSkip("A_CONTROLMODE")) + { + NextTest(); + return; + } + err = TestWrite3ToTheControlModeAttributeToDut_7(); break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Write 5 to the ControlMode attribute to DUT\n"); - err = ShouldSkip("A_CONTROLMODE") ? CHIP_NO_ERROR : TestWrite5ToTheControlModeAttributeToDut_8(); + if (ShouldSkip("A_CONTROLMODE")) + { + NextTest(); + return; + } + err = TestWrite5ToTheControlModeAttributeToDut_8(); break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Write 7 to the ControlMode attribute to DUT\n"); - err = ShouldSkip("A_CONTROLMODE") ? CHIP_NO_ERROR : TestWrite7ToTheControlModeAttributeToDut_9(); + if (ShouldSkip("A_CONTROLMODE")) + { + NextTest(); + return; + } + err = TestWrite7ToTheControlModeAttributeToDut_9(); break; } @@ -25893,6 +26811,14 @@ class Test_TC_RH_2_1 : public TestCommand ChipLogProgress(chipTool, " ***** Test Step 2 : Reads constraints of attribute: MinMeasuredValue\n"); err = TestReadsConstraintsOfAttributeMinMeasuredValue_2(); break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the optional attribute: Tolerance\n"); + err = TestReadsTheOptionalAttributeTolerance_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads constraints of attribute: Tolerance\n"); + err = TestReadsConstraintsOfAttributeTolerance_4(); + break; } if (CHIP_NO_ERROR != err) @@ -25904,7 +26830,7 @@ class Test_TC_RH_2_1 : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + const uint16_t mTestCount = 5; chip::Optional mCluster; chip::Optional mEndpoint; @@ -25929,6 +26855,26 @@ class Test_TC_RH_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_2(minMeasuredValue); } + static void OnFailureCallback_3(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_3(status); + } + + static void OnSuccessCallback_3(void * context, uint16_t tolerance) + { + (static_cast(context))->OnSuccessResponse_3(tolerance); + } + + static void OnFailureCallback_4(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_4(status); + } + + static void OnSuccessCallback_4(void * context, uint16_t tolerance) + { + (static_cast(context))->OnSuccessResponse_4(tolerance); + } + // // Tests methods // @@ -25976,9 +26922,59 @@ class Test_TC_RH_2_1 : public TestCommand void OnSuccessResponse_2(uint16_t minMeasuredValue) { VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", minMeasuredValue, 0U)); VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", minMeasuredValue, 9999U)); NextTest(); } + + CHIP_ERROR TestReadsTheOptionalAttributeTolerance_3() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::RelativeHumidityMeasurementClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_3(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_3(uint16_t tolerance) + { + VerifyOrReturn(CheckValue("tolerance", tolerance, 0U)); + + NextTest(); + } + + CHIP_ERROR TestReadsConstraintsOfAttributeTolerance_4() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::RelativeHumidityMeasurementClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_4(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_4(uint16_t tolerance) + { + VerifyOrReturn(CheckConstraintType("tolerance", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("tolerance", tolerance, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("tolerance", tolerance, 2048U)); + NextTest(); + } }; class Test_TC_RH_2_2 : public TestCommand @@ -26021,11 +27017,21 @@ class Test_TC_RH_2_2 : public TestCommand break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Reads MeasuredValue attribute from DUT\n"); - err = ShouldSkip("A_RELATIVEHUMIDITY") ? CHIP_NO_ERROR : TestReadsMeasuredValueAttributeFromDut_1(); + if (ShouldSkip("A_RELATIVEHUMIDITY")) + { + NextTest(); + return; + } + err = TestReadsMeasuredValueAttributeFromDut_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Read the mandatory attribute: MeasuredValue\n"); - err = ShouldSkip("A_RELATIVEHUMIDITY") ? CHIP_NO_ERROR : TestReadTheMandatoryAttributeMeasuredValue_2(); + if (ShouldSkip("A_RELATIVEHUMIDITY")) + { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributeMeasuredValue_2(); break; } @@ -26360,6 +27366,10 @@ class Test_TC_TM_2_1 : public TestCommand ChipLogProgress(chipTool, " ***** Test Step 1 : read the mandatory attribute: MeasuredValue\n"); err = TestReadTheMandatoryAttributeMeasuredValue_1(); break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : read the optional attribute: Tolerance\n"); + err = TestReadTheOptionalAttributeTolerance_2(); + break; } if (CHIP_NO_ERROR != err) @@ -26371,7 +27381,7 @@ class Test_TC_TM_2_1 : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; + const uint16_t mTestCount = 3; chip::Optional mCluster; chip::Optional mEndpoint; @@ -26386,6 +27396,16 @@ class Test_TC_TM_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_1(measuredValue); } + static void OnFailureCallback_2(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_2(status); + } + + static void OnSuccessCallback_2(void * context, uint16_t tolerance) + { + (static_cast(context))->OnSuccessResponse_2(tolerance); + } + // // Tests methods // @@ -26415,6 +27435,30 @@ class Test_TC_TM_2_1 : public TestCommand VerifyOrReturn(CheckConstraintType("measuredValue", "", "int16")); NextTest(); } + + CHIP_ERROR TestReadTheOptionalAttributeTolerance_2() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TemperatureMeasurementClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_2(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_2(uint16_t tolerance) + { + VerifyOrReturn(CheckConstraintType("tolerance", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("tolerance", tolerance, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("tolerance", tolerance, 2048U)); + NextTest(); + } }; class Test_TC_TM_2_2 : public TestCommand @@ -26457,11 +27501,21 @@ class Test_TC_TM_2_2 : public TestCommand break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Reads MeasuredValue attribute from DUT\n"); - err = ShouldSkip("A_TEMPERATURE") ? CHIP_NO_ERROR : TestReadsMeasuredValueAttributeFromDut_1(); + if (ShouldSkip("A_TEMPERATURE")) + { + NextTest(); + return; + } + err = TestReadsMeasuredValueAttributeFromDut_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Read the mandatory attribute: MeasuredValue\n"); - err = ShouldSkip("A_TEMPERATURE") ? CHIP_NO_ERROR : TestReadTheMandatoryAttributeMeasuredValue_2(); + if (ShouldSkip("A_TEMPERATURE")) + { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributeMeasuredValue_2(); break; } @@ -28480,6 +29534,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand void OnSuccessResponse_43(uint8_t controlSequenceOfOperation) { VerifyOrReturn(CheckConstraintType("controlSequenceOfOperation", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("controlSequenceOfOperation", controlSequenceOfOperation, 0)); VerifyOrReturn(CheckConstraintMaxValue("controlSequenceOfOperation", controlSequenceOfOperation, 5)); NextTest(); } @@ -28560,6 +29615,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand void OnSuccessResponse_47(uint8_t systemMode) { VerifyOrReturn(CheckConstraintType("systemMode", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("systemMode", systemMode, 0)); VerifyOrReturn(CheckConstraintMaxValue("systemMode", systemMode, 9)); NextTest(); } @@ -28644,6 +29700,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand void OnSuccessResponse_51(int8_t minSetpointDeadBand) { VerifyOrReturn(CheckConstraintType("minSetpointDeadBand", "", "int8")); + VerifyOrReturn(CheckConstraintMinValue("minSetpointDeadBand", minSetpointDeadBand, 0)); VerifyOrReturn(CheckConstraintMaxValue("minSetpointDeadBand", minSetpointDeadBand, 25)); NextTest(); } @@ -28711,6 +29768,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand void OnSuccessResponse_54(uint8_t startOfWeek) { VerifyOrReturn(CheckConstraintType("startOfWeek", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("startOfWeek", startOfWeek, 0)); VerifyOrReturn(CheckConstraintMaxValue("startOfWeek", startOfWeek, 6)); NextTest(); } @@ -28894,344 +29952,509 @@ class Test_TC_TSTAT_2_2 : public TestCommand ChipLogProgress(chipTool, " ***** Test Step 1 : Reads OccupiedCoolingSetpoint attribute from Server DUT and verifies that the " "value is within range\n"); - err = ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT") - ? CHIP_NO_ERROR - : TestReadsOccupiedCoolingSetpointAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_1(); + if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) + { + NextTest(); + return; + } + err = TestReadsOccupiedCoolingSetpointAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_1(); break; case 2: ChipLogProgress( chipTool, " ***** Test Step 2 : Writes a value back that is different but valid for OccupiedCoolingSetpoint attribute\n"); - err = ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT") - ? CHIP_NO_ERROR - : TestWritesAValueBackThatIsDifferentButValidForOccupiedCoolingSetpointAttribute_2(); + if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) + { + NextTest(); + return; + } + err = TestWritesAValueBackThatIsDifferentButValidForOccupiedCoolingSetpointAttribute_2(); break; case 3: ChipLogProgress( chipTool, " ***** Test Step 3 : Reads it back again to confirm the successful write of OccupiedCoolingSetpoint attribute\n"); - err = ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT") - ? CHIP_NO_ERROR - : TestReadsItBackAgainToConfirmTheSuccessfulWriteOfOccupiedCoolingSetpointAttribute_3(); + if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) + { + NextTest(); + return; + } + err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfOccupiedCoolingSetpointAttribute_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Writes the limit of MinCoolSetpointLimit to OccupiedCoolingSetpoint attribute\n"); - err = ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT") - ? CHIP_NO_ERROR - : TestWritesTheLimitOfMinCoolSetpointLimitToOccupiedCoolingSetpointAttribute_4(); + if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfMinCoolSetpointLimitToOccupiedCoolingSetpointAttribute_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Writes the limit of MaxCoolSetpointLimit to OccupiedCoolingSetpoint attribute\n"); - err = ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT") - ? CHIP_NO_ERROR - : TestWritesTheLimitOfMaxCoolSetpointLimitToOccupiedCoolingSetpointAttribute_5(); + if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfMaxCoolSetpointLimitToOccupiedCoolingSetpointAttribute_5(); break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Reads OccupiedHeatingSetpoint attribute from Server DUT and verifies that the " "value is within range\n"); - err = ShouldSkip("A_OCCUPIEDHEATINGSETPOINT") - ? CHIP_NO_ERROR - : TestReadsOccupiedHeatingSetpointAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_6(); + if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) + { + NextTest(); + return; + } + err = TestReadsOccupiedHeatingSetpointAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_6(); break; case 7: ChipLogProgress( chipTool, " ***** Test Step 7 : Writes a value back that is different but valid for OccupiedHeatingSetpoint attribute\n"); - err = ShouldSkip("A_OCCUPIEDHEATINGSETPOINT") - ? CHIP_NO_ERROR - : TestWritesAValueBackThatIsDifferentButValidForOccupiedHeatingSetpointAttribute_7(); + if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) + { + NextTest(); + return; + } + err = TestWritesAValueBackThatIsDifferentButValidForOccupiedHeatingSetpointAttribute_7(); break; case 8: ChipLogProgress( chipTool, " ***** Test Step 8 : Reads it back again to confirm the successful write of OccupiedHeatingSetpoint attribute\n"); - err = ShouldSkip("A_OCCUPIEDHEATINGSETPOINT") - ? CHIP_NO_ERROR - : TestReadsItBackAgainToConfirmTheSuccessfulWriteOfOccupiedHeatingSetpointAttribute_8(); + if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) + { + NextTest(); + return; + } + err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfOccupiedHeatingSetpointAttribute_8(); break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Writes the limit of MinHeatSetpointLimit to OccupiedHeatingSetpoint attribute\n"); - err = ShouldSkip("A_OCCUPIEDHEATINGSETPOINT") - ? CHIP_NO_ERROR - : TestWritesTheLimitOfMinHeatSetpointLimitToOccupiedHeatingSetpointAttribute_9(); + if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfMinHeatSetpointLimitToOccupiedHeatingSetpointAttribute_9(); break; case 10: ChipLogProgress( chipTool, " ***** Test Step 10 : Writes the limit of MaxHeatSetpointLimit to OccupiedHeatingSetpoint attribute\n"); - err = ShouldSkip("A_OCCUPIEDHEATINGSETPOINT") - ? CHIP_NO_ERROR - : TestWritesTheLimitOfMaxHeatSetpointLimitToOccupiedHeatingSetpointAttribute_10(); + if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfMaxHeatSetpointLimitToOccupiedHeatingSetpointAttribute_10(); break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : Reads MinHeatSetpointLimit attribute from Server DUT and verifies that the " "value is within range\n"); - err = ShouldSkip("A_MINHEATSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestReadsMinHeatSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_11(); + if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestReadsMinHeatSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_11(); break; case 12: ChipLogProgress( chipTool, " ***** Test Step 12 : Writes a value back that is different but valid for MinHeatSetpointLimit attribute\n"); - err = ShouldSkip("A_MINHEATSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesAValueBackThatIsDifferentButValidForMinHeatSetpointLimitAttribute_12(); + if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesAValueBackThatIsDifferentButValidForMinHeatSetpointLimitAttribute_12(); break; case 13: ChipLogProgress( chipTool, " ***** Test Step 13 : Reads it back again to confirm the successful write of MinHeatSetpointLimit attribute\n"); - err = ShouldSkip("A_MINHEATSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinHeatSetpointLimitAttribute_13(); + if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinHeatSetpointLimitAttribute_13(); break; case 14: ChipLogProgress( chipTool, " ***** Test Step 14 : Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); - err = ShouldSkip("A_MINHEATSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesTheLimitOfAbsMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_14(); + if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfAbsMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_14(); break; case 15: ChipLogProgress( chipTool, " ***** Test Step 15 : Writes the limit of AbsMaxHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); - err = ShouldSkip("A_MINHEATSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_15(); + if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_15(); break; case 16: ChipLogProgress(chipTool, " ***** Test Step 16 : Reads MaxHeatSetpointLimit attribute from Server DUT and verifies that the " "value is within range\n"); - err = ShouldSkip("A_MAXHEATSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestReadsMaxHeatSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_16(); + if (ShouldSkip("A_MAXHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestReadsMaxHeatSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_16(); break; case 17: ChipLogProgress( chipTool, " ***** Test Step 17 : Writes a value back that is different but valid for MaxHeatSetpointLimit attribute\n"); - err = ShouldSkip("A_MAXHEATSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesAValueBackThatIsDifferentButValidForMaxHeatSetpointLimitAttribute_17(); + if (ShouldSkip("A_MAXHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesAValueBackThatIsDifferentButValidForMaxHeatSetpointLimitAttribute_17(); break; case 18: ChipLogProgress( chipTool, " ***** Test Step 18 : Reads it back again to confirm the successful write of MaxHeatSetpointLimit attribute\n"); - err = ShouldSkip("A_MAXHEATSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxHeatSetpointLimitAttribute_18(); + if (ShouldSkip("A_MAXHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxHeatSetpointLimitAttribute_18(); break; case 19: ChipLogProgress( chipTool, " ***** Test Step 19 : Writes the limit of AbsMinHeatSetpointLimit to MaxHeatSetpointLimit attribute\n"); - err = ShouldSkip("A_MAXHEATSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesTheLimitOfAbsMinHeatSetpointLimitToMaxHeatSetpointLimitAttribute_19(); + if (ShouldSkip("A_MAXHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfAbsMinHeatSetpointLimitToMaxHeatSetpointLimitAttribute_19(); break; case 20: ChipLogProgress( chipTool, " ***** Test Step 20 : Writes the limit of AbsMaxHeatSetpointLimit to MaxHeatSetpointLimit attribute\n"); - err = ShouldSkip("A_MAXHEATSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMaxHeatSetpointLimitAttribute_20(); + if (ShouldSkip("A_MAXHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMaxHeatSetpointLimitAttribute_20(); break; case 21: ChipLogProgress(chipTool, " ***** Test Step 21 : Reads MinCoolSetpointLimit attribute from Server DUT and verifies that the " "value is within range\n"); - err = ShouldSkip("A_MINCOOLSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestReadsMinCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_21(); + if (ShouldSkip("A_MINCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestReadsMinCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_21(); break; case 22: ChipLogProgress( chipTool, " ***** Test Step 22 : Writes a value back that is different but valid for MinCoolSetpointLimit attribute\n"); - err = ShouldSkip("A_MINCOOLSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesAValueBackThatIsDifferentButValidForMinCoolSetpointLimitAttribute_22(); + if (ShouldSkip("A_MINCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesAValueBackThatIsDifferentButValidForMinCoolSetpointLimitAttribute_22(); break; case 23: ChipLogProgress( chipTool, " ***** Test Step 23 : Reads it back again to confirm the successful write of MinCoolSetpointLimit attribute\n"); - err = ShouldSkip("A_MINCOOLSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinCoolSetpointLimitAttribute_23(); + if (ShouldSkip("A_MINCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinCoolSetpointLimitAttribute_23(); break; case 24: ChipLogProgress( chipTool, " ***** Test Step 24 : Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit attribute\n"); - err = ShouldSkip("A_MINCOOLSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesTheLimitOfAbsMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_24(); + if (ShouldSkip("A_MINCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfAbsMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_24(); break; case 25: ChipLogProgress(chipTool, " ***** Test Step 25 : Writes the limit of MaxCoolSetpointLimit to MinCoolSetpointLimit attribute\n"); - err = ShouldSkip("A_MINCOOLSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesTheLimitOfMaxCoolSetpointLimitToMinCoolSetpointLimitAttribute_25(); + if (ShouldSkip("A_MINCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfMaxCoolSetpointLimitToMinCoolSetpointLimitAttribute_25(); break; case 26: ChipLogProgress(chipTool, " ***** Test Step 26 : Reads MaxCoolSetpointLimit attribute from Server DUT and verifies that the " "value is within range\n"); - err = ShouldSkip("A_MAXCOOLSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestReadsMaxCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_26(); + if (ShouldSkip("A_MAXCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestReadsMaxCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_26(); break; case 27: ChipLogProgress( chipTool, " ***** Test Step 27 : Writes a value back that is different but valid for MaxCoolSetpointLimit attribute\n"); - err = ShouldSkip("A_MAXCOOLSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesAValueBackThatIsDifferentButValidForMaxCoolSetpointLimitAttribute_27(); + if (ShouldSkip("A_MAXCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesAValueBackThatIsDifferentButValidForMaxCoolSetpointLimitAttribute_27(); break; case 28: ChipLogProgress( chipTool, " ***** Test Step 28 : Reads it back again to confirm the successful write of MaxCoolSetpointLimit attribute\n"); - err = ShouldSkip("A_MAXCOOLSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxCoolSetpointLimitAttribute_28(); + if (ShouldSkip("A_MAXCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxCoolSetpointLimitAttribute_28(); break; case 29: ChipLogProgress( chipTool, " ***** Test Step 29 : Writes the limit of AbsMinCoolSetpointLimit to MaxCoolSetpointLimit attribute\n"); - err = ShouldSkip("A_MAXCOOLSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesTheLimitOfAbsMinCoolSetpointLimitToMaxCoolSetpointLimitAttribute_29(); + if (ShouldSkip("A_MAXCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfAbsMinCoolSetpointLimitToMaxCoolSetpointLimitAttribute_29(); break; case 30: ChipLogProgress(chipTool, " ***** Test Step 30 : Writes the limit of MaxCoolSetpointLimit to MaxCoolSetpointLimit attribute\n"); - err = ShouldSkip("A_MAXCOOLSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesTheLimitOfMaxCoolSetpointLimitToMaxCoolSetpointLimitAttribute_30(); + if (ShouldSkip("A_MAXCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfMaxCoolSetpointLimitToMaxCoolSetpointLimitAttribute_30(); break; case 31: ChipLogProgress( chipTool, " ***** Test Step 31 : Writes (sets back) the limit of MinHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); - err = ShouldSkip("A_MINHEATSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesSetsBackTheLimitOfMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_31(); + if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesSetsBackTheLimitOfMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_31(); break; case 32: ChipLogProgress( chipTool, " ***** Test Step 32 : Writes (sets back) the limit of MaxHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); - err = ShouldSkip("A_MINHEATSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesSetsBackTheLimitOfMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_32(); + if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesSetsBackTheLimitOfMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_32(); break; case 33: ChipLogProgress( chipTool, " ***** Test Step 33 : Writes (sets back) the limit of MinHeatSetpointLimit to MaxHeatSetpointLimit attribute\n"); - err = ShouldSkip("A_MINHEATSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesSetsBackTheLimitOfMinHeatSetpointLimitToMaxHeatSetpointLimitAttribute_33(); + if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesSetsBackTheLimitOfMinHeatSetpointLimitToMaxHeatSetpointLimitAttribute_33(); break; case 34: ChipLogProgress( chipTool, " ***** Test Step 34 : Writes (sets back) the limit of MaxHeatSetpointLimit to MaxHeatSetpointLimit attribute\n"); - err = ShouldSkip("A_MINHEATSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesSetsBackTheLimitOfMaxHeatSetpointLimitToMaxHeatSetpointLimitAttribute_34(); + if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesSetsBackTheLimitOfMaxHeatSetpointLimitToMaxHeatSetpointLimitAttribute_34(); break; case 35: ChipLogProgress( chipTool, " ***** Test Step 35 : Writes (sets back) the limit of MinCoolSetpointLimit to MinCoolSetpointLimit attribute\n"); - err = ShouldSkip("A_MINCOOLSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesSetsBackTheLimitOfMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_35(); + if (ShouldSkip("A_MINCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesSetsBackTheLimitOfMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_35(); break; case 36: ChipLogProgress( chipTool, " ***** Test Step 36 : Writes (sets back) the limit of MaxCoolSetpointLimit to MinCoolSetpointLimit attribute\n"); - err = ShouldSkip("A_MINCOOLSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesSetsBackTheLimitOfMaxCoolSetpointLimitToMinCoolSetpointLimitAttribute_36(); + if (ShouldSkip("A_MINCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesSetsBackTheLimitOfMaxCoolSetpointLimitToMinCoolSetpointLimitAttribute_36(); break; case 37: ChipLogProgress( chipTool, " ***** Test Step 37 : Writes (sets back) the limit of MinCoolSetpointLimit to MaxCoolSetpointLimit attribute\n"); - err = ShouldSkip("A_MAXCOOLSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesSetsBackTheLimitOfMinCoolSetpointLimitToMaxCoolSetpointLimitAttribute_37(); + if (ShouldSkip("A_MAXCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesSetsBackTheLimitOfMinCoolSetpointLimitToMaxCoolSetpointLimitAttribute_37(); break; case 38: ChipLogProgress( chipTool, " ***** Test Step 38 : Writes (sets back) the limit of MaxCoolSetpointLimit to MaxCoolSetpointLimit attribute\n"); - err = ShouldSkip("A_MAXCOOLSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesSetsBackTheLimitOfMaxCoolSetpointLimitToMaxCoolSetpointLimitAttribute_38(); + if (ShouldSkip("A_MAXCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesSetsBackTheLimitOfMaxCoolSetpointLimitToMaxCoolSetpointLimitAttribute_38(); break; case 39: ChipLogProgress( chipTool, " ***** Test Step 39 : Reads ControlSequenceOfOperation from Server DUT and verifies that the value is valid\n"); - err = ShouldSkip("A_CONTROLSEQUENCEOFOPERATION") - ? CHIP_NO_ERROR - : TestReadsControlSequenceOfOperationFromServerDutAndVerifiesThatTheValueIsValid_39(); + if (ShouldSkip("A_CONTROLSEQUENCEOFOPERATION")) + { + NextTest(); + return; + } + err = TestReadsControlSequenceOfOperationFromServerDutAndVerifiesThatTheValueIsValid_39(); break; case 40: ChipLogProgress( chipTool, " ***** Test Step 40 : Write Attribute command for ControlSequenceOfOperation with a new valid value\n"); - err = ShouldSkip("A_CONTROLSEQUENCEOFOPERATION") - ? CHIP_NO_ERROR - : TestWriteAttributeCommandForControlSequenceOfOperationWithANewValidValue_40(); + if (ShouldSkip("A_CONTROLSEQUENCEOFOPERATION")) + { + NextTest(); + return; + } + err = TestWriteAttributeCommandForControlSequenceOfOperationWithANewValidValue_40(); break; case 41: ChipLogProgress(chipTool, " ***** Test Step 41 : Read it back again to confirm the successful write\n"); - err = ShouldSkip("A_CONTROLSEQUENCEOFOPERATION") ? CHIP_NO_ERROR : TestReadItBackAgainToConfirmTheSuccessfulWrite_41(); + if (ShouldSkip("A_CONTROLSEQUENCEOFOPERATION")) + { + NextTest(); + return; + } + err = TestReadItBackAgainToConfirmTheSuccessfulWrite_41(); break; case 42: ChipLogProgress(chipTool, " ***** Test Step 42 : Sets OccupiedHeatingSetpoint to default value\n"); - err = ShouldSkip("A_OCCUPIEDHEATINGSETPOINT") ? CHIP_NO_ERROR : TestSetsOccupiedHeatingSetpointToDefaultValue_42(); + if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) + { + NextTest(); + return; + } + err = TestSetsOccupiedHeatingSetpointToDefaultValue_42(); break; case 43: ChipLogProgress(chipTool, " ***** Test Step 43 : Sets OccupiedHeatingSetpoint to default value\n"); - err = ShouldSkip("A_OCCUPIEDHEATINGSETPOINT") ? CHIP_NO_ERROR : TestSetsOccupiedHeatingSetpointToDefaultValue_43(); + if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) + { + NextTest(); + return; + } + err = TestSetsOccupiedHeatingSetpointToDefaultValue_43(); break; case 44: ChipLogProgress(chipTool, " ***** Test Step 44 : Sets OccupiedCoolingSetpoint to default value\n"); - err = ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT") ? CHIP_NO_ERROR : TestSetsOccupiedCoolingSetpointToDefaultValue_44(); + if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) + { + NextTest(); + return; + } + err = TestSetsOccupiedCoolingSetpointToDefaultValue_44(); break; case 45: ChipLogProgress(chipTool, " ***** Test Step 45 : Sets OccupiedCoolingSetpoint to default value\n"); - err = ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT") ? CHIP_NO_ERROR : TestSetsOccupiedCoolingSetpointToDefaultValue_45(); + if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) + { + NextTest(); + return; + } + err = TestSetsOccupiedCoolingSetpointToDefaultValue_45(); break; case 46: ChipLogProgress(chipTool, " ***** Test Step 46 : Sets OccupiedCoolingSetpoint to default value\n"); - err = ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT") ? CHIP_NO_ERROR : TestSetsOccupiedCoolingSetpointToDefaultValue_46(); + if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) + { + NextTest(); + return; + } + err = TestSetsOccupiedCoolingSetpointToDefaultValue_46(); break; case 47: ChipLogProgress(chipTool, " ***** Test Step 47 : Sets OccupiedHeatingSetpoint to default value\n"); - err = ShouldSkip("A_OCCUPIEDHEATINGSETPOINT") ? CHIP_NO_ERROR : TestSetsOccupiedHeatingSetpointToDefaultValue_47(); + if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) + { + NextTest(); + return; + } + err = TestSetsOccupiedHeatingSetpointToDefaultValue_47(); break; case 48: ChipLogProgress(chipTool, " ***** Test Step 48 : Sets OccupiedCoolingSetpoint to default value\n"); - err = ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT") ? CHIP_NO_ERROR : TestSetsOccupiedCoolingSetpointToDefaultValue_48(); + if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) + { + NextTest(); + return; + } + err = TestSetsOccupiedCoolingSetpointToDefaultValue_48(); break; case 49: ChipLogProgress(chipTool, " ***** Test Step 49 : Sets OccupiedHeatingSetpoint to default value\n"); - err = ShouldSkip("A_OCCUPIEDHEATINGSETPOINT") ? CHIP_NO_ERROR : TestSetsOccupiedHeatingSetpointToDefaultValue_49(); + if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) + { + NextTest(); + return; + } + err = TestSetsOccupiedHeatingSetpointToDefaultValue_49(); break; } @@ -31312,51 +32535,95 @@ class Test_TC_TSUIC_2_2 : public TestCommand break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Writes a value of 0 to TemperatureDisplayMode attribute of DUT\n"); - err = ShouldSkip("A_TEMPERATURE_DISPLAY_MODE") ? CHIP_NO_ERROR - : TestWritesAValueOf0ToTemperatureDisplayModeAttributeOfDut_1(); + if (ShouldSkip("A_TEMPERATURE_DISPLAY_MODE")) + { + NextTest(); + return; + } + err = TestWritesAValueOf0ToTemperatureDisplayModeAttributeOfDut_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Writes a value of 1 to TemperatureDisplayMode attribute of DUT\n"); - err = ShouldSkip("A_TEMPERATURE_DISPLAY_MODE") ? CHIP_NO_ERROR - : TestWritesAValueOf1ToTemperatureDisplayModeAttributeOfDut_2(); + if (ShouldSkip("A_TEMPERATURE_DISPLAY_MODE")) + { + NextTest(); + return; + } + err = TestWritesAValueOf1ToTemperatureDisplayModeAttributeOfDut_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Writes a value of 0 to KeypadLockout attribute of DUT\n"); - err = ShouldSkip("A_KEYPAD_LOCKOUT") ? CHIP_NO_ERROR : TestWritesAValueOf0ToKeypadLockoutAttributeOfDut_3(); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) + { + NextTest(); + return; + } + err = TestWritesAValueOf0ToKeypadLockoutAttributeOfDut_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Writes a value of 1 to KeypadLockout attribute of DUT\n"); - err = ShouldSkip("A_KEYPAD_LOCKOUT") ? CHIP_NO_ERROR : TestWritesAValueOf1ToKeypadLockoutAttributeOfDut_4(); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) + { + NextTest(); + return; + } + err = TestWritesAValueOf1ToKeypadLockoutAttributeOfDut_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Writes a value of 2 to KeypadLockout attribute of DUT\n"); - err = ShouldSkip("A_KEYPAD_LOCKOUT") ? CHIP_NO_ERROR : TestWritesAValueOf2ToKeypadLockoutAttributeOfDut_5(); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) + { + NextTest(); + return; + } + err = TestWritesAValueOf2ToKeypadLockoutAttributeOfDut_5(); break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Writes a value of 3 to KeypadLockout attribute of DUT\n"); - err = ShouldSkip("A_KEYPAD_LOCKOUT") ? CHIP_NO_ERROR : TestWritesAValueOf3ToKeypadLockoutAttributeOfDut_6(); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) + { + NextTest(); + return; + } + err = TestWritesAValueOf3ToKeypadLockoutAttributeOfDut_6(); break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Writes a value of 4 to KeypadLockout attribute of DUT\n"); - err = ShouldSkip("A_KEYPAD_LOCKOUT") ? CHIP_NO_ERROR : TestWritesAValueOf4ToKeypadLockoutAttributeOfDut_7(); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) + { + NextTest(); + return; + } + err = TestWritesAValueOf4ToKeypadLockoutAttributeOfDut_7(); break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Writes a value of 5 to KeypadLockout attribute of DUT\n"); - err = ShouldSkip("A_KEYPAD_LOCKOUT") ? CHIP_NO_ERROR : TestWritesAValueOf5ToKeypadLockoutAttributeOfDut_8(); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) + { + NextTest(); + return; + } + err = TestWritesAValueOf5ToKeypadLockoutAttributeOfDut_8(); break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Writes a value of 0 to ScheduleProgrammingVisibility attribute of DUT\n"); - err = ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY") - ? CHIP_NO_ERROR - : TestWritesAValueOf0ToScheduleProgrammingVisibilityAttributeOfDut_9(); + if (ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY")) + { + NextTest(); + return; + } + err = TestWritesAValueOf0ToScheduleProgrammingVisibilityAttributeOfDut_9(); break; case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : Writes a value of 1 to ScheduleProgrammingVisibility attribute of DUT\n"); - err = ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY") - ? CHIP_NO_ERROR - : TestWritesAValueOf1ToScheduleProgrammingVisibilityAttributeOfDut_10(); + if (ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY")) + { + NextTest(); + return; + } + err = TestWritesAValueOf1ToScheduleProgrammingVisibilityAttributeOfDut_10(); break; } @@ -32077,6 +33344,7 @@ class Test_TC_WNCV_1_1 : public TestCommand void OnSuccessResponse_4(uint32_t featureMap) { VerifyOrReturn(CheckConstraintType("featureMap", "", "uint32")); + VerifyOrReturn(CheckConstraintMinValue("featureMap", featureMap, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("featureMap", featureMap, 32768UL)); NextTest(); } @@ -32952,6 +34220,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_1(uint8_t type) { VerifyOrReturn(CheckConstraintType("type", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("type", type, 0)); VerifyOrReturn(CheckConstraintMaxValue("type", type, 9)); NextTest(); } @@ -33015,6 +34284,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_4(uint8_t configStatus) { VerifyOrReturn(CheckConstraintType("configStatus", "", "map8")); + VerifyOrReturn(CheckConstraintMinValue("configStatus", configStatus, 0)); VerifyOrReturn(CheckConstraintMaxValue("configStatus", configStatus, 63)); NextTest(); } @@ -33078,6 +34348,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_7(uint8_t operationalStatus) { VerifyOrReturn(CheckConstraintType("operationalStatus", "", "map8")); + VerifyOrReturn(CheckConstraintMinValue("operationalStatus", operationalStatus, 0)); VerifyOrReturn(CheckConstraintMaxValue("operationalStatus", operationalStatus, 63)); NextTest(); } @@ -33141,6 +34412,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_10(uint8_t endProductType) { VerifyOrReturn(CheckConstraintType("endProductType", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("endProductType", endProductType, 0)); VerifyOrReturn(CheckConstraintMaxValue("endProductType", endProductType, 23)); NextTest(); } @@ -33204,6 +34476,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_13(uint8_t mode) { VerifyOrReturn(CheckConstraintType("mode", "", "map8")); + VerifyOrReturn(CheckConstraintMinValue("mode", mode, 0)); VerifyOrReturn(CheckConstraintMaxValue("mode", mode, 15)); NextTest(); } @@ -33263,6 +34536,8 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_16(const chip::app::DataModel::Nullable & targetPositionLiftPercent100ths) { VerifyOrReturn(CheckConstraintType("targetPositionLiftPercent100ths", "", "Percent100ths")); + VerifyOrReturn( + CheckConstraintMinValue("targetPositionLiftPercent100ths", targetPositionLiftPercent100ths, 0U)); VerifyOrReturn(CheckConstraintMaxValue("targetPositionLiftPercent100ths", targetPositionLiftPercent100ths, 10000U)); NextTest(); @@ -33331,6 +34606,8 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_19(const chip::app::DataModel::Nullable & targetPositionTiltPercent100ths) { VerifyOrReturn(CheckConstraintType("targetPositionTiltPercent100ths", "", "Percent100ths")); + VerifyOrReturn( + CheckConstraintMinValue("targetPositionTiltPercent100ths", targetPositionTiltPercent100ths, 0U)); VerifyOrReturn(CheckConstraintMaxValue("targetPositionTiltPercent100ths", targetPositionTiltPercent100ths, 10000U)); NextTest(); @@ -33399,6 +34676,8 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_22(const chip::app::DataModel::Nullable & currentPositionLiftPercent100ths) { VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "", "Percent100ths")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionLiftPercent100ths", currentPositionLiftPercent100ths, 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentPositionLiftPercent100ths", currentPositionLiftPercent100ths, 10000U)); NextTest(); @@ -33467,6 +34746,8 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_25(const chip::app::DataModel::Nullable & currentPositionTiltPercent100ths) { VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "", "Percent100ths")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionTiltPercent100ths", currentPositionTiltPercent100ths, 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentPositionTiltPercent100ths", currentPositionTiltPercent100ths, 10000U)); NextTest(); @@ -33535,6 +34816,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_28(uint16_t installedOpenLimitLift) { VerifyOrReturn(CheckConstraintType("installedOpenLimitLift", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("installedOpenLimitLift", installedOpenLimitLift, 0U)); VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitLift", installedOpenLimitLift, 65535U)); NextTest(); } @@ -33579,6 +34861,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_30(uint16_t installedOpenLimitLift) { VerifyOrReturn(CheckConstraintType("installedOpenLimitLift", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("installedOpenLimitLift", installedOpenLimitLift, 0U)); VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitLift", installedOpenLimitLift, 65535U)); NextTest(); } @@ -33600,6 +34883,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_31(uint16_t installedClosedLimitLift) { VerifyOrReturn(CheckConstraintType("installedClosedLimitLift", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("installedClosedLimitLift", installedClosedLimitLift, 0U)); VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitLift", installedClosedLimitLift, 65535U)); NextTest(); } @@ -33644,6 +34928,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_33(uint16_t installedClosedLimitLift) { VerifyOrReturn(CheckConstraintType("installedClosedLimitLift", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("installedClosedLimitLift", installedClosedLimitLift, 0U)); VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitLift", installedClosedLimitLift, 65535U)); NextTest(); } @@ -33665,6 +34950,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_34(uint16_t installedOpenLimitTilt) { VerifyOrReturn(CheckConstraintType("installedOpenLimitTilt", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("installedOpenLimitTilt", installedOpenLimitTilt, 0U)); VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitTilt", installedOpenLimitTilt, 65535U)); NextTest(); } @@ -33709,6 +34995,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_36(uint16_t installedOpenLimitTilt) { VerifyOrReturn(CheckConstraintType("installedOpenLimitTilt", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("installedOpenLimitTilt", installedOpenLimitTilt, 0U)); VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitTilt", installedOpenLimitTilt, 65535U)); NextTest(); } @@ -33730,6 +35017,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_37(uint16_t installedClosedLimitTilt) { VerifyOrReturn(CheckConstraintType("installedClosedLimitTilt", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("installedClosedLimitTilt", installedClosedLimitTilt, 0U)); VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitTilt", installedClosedLimitTilt, 65535U)); NextTest(); } @@ -33774,6 +35062,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_39(uint16_t installedClosedLimitTilt) { VerifyOrReturn(CheckConstraintType("installedClosedLimitTilt", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("installedClosedLimitTilt", installedClosedLimitTilt, 0U)); VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitTilt", installedClosedLimitTilt, 65535U)); NextTest(); } @@ -33794,6 +35083,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_40(uint16_t safetyStatus) { VerifyOrReturn(CheckConstraintType("safetyStatus", "", "map16")); + VerifyOrReturn(CheckConstraintMinValue("safetyStatus", safetyStatus, 0U)); VerifyOrReturn(CheckConstraintMaxValue("safetyStatus", safetyStatus, 2047U)); NextTest(); } @@ -33857,6 +35147,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_43(const chip::app::DataModel::Nullable & currentPositionLift) { VerifyOrReturn(CheckConstraintType("currentPositionLift", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("currentPositionLift", currentPositionLift, 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentPositionLift", currentPositionLift, 65535U)); NextTest(); } @@ -33900,6 +35191,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_45(const chip::app::DataModel::Nullable & currentPositionLift) { VerifyOrReturn(CheckConstraintType("currentPositionLift", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("currentPositionLift", currentPositionLift, 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentPositionLift", currentPositionLift, 65535U)); NextTest(); } @@ -33920,6 +35212,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_46(const chip::app::DataModel::Nullable & currentPositionTilt) { VerifyOrReturn(CheckConstraintType("currentPositionTilt", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("currentPositionTilt", currentPositionTilt, 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentPositionTilt", currentPositionTilt, 65535U)); NextTest(); } @@ -33963,6 +35256,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_48(const chip::app::DataModel::Nullable & currentPositionTilt) { VerifyOrReturn(CheckConstraintType("currentPositionTilt", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("currentPositionTilt", currentPositionTilt, 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentPositionTilt", currentPositionTilt, 65535U)); NextTest(); } @@ -33984,6 +35278,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_49(const chip::app::DataModel::Nullable & currentPositionLiftPercentage) { VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "", "Percent")); + VerifyOrReturn(CheckConstraintMinValue("currentPositionLiftPercentage", currentPositionLiftPercentage, 0)); VerifyOrReturn(CheckConstraintMaxValue("currentPositionLiftPercentage", currentPositionLiftPercentage, 100)); NextTest(); } @@ -34051,6 +35346,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_52(const chip::app::DataModel::Nullable & currentPositionTiltPercentage) { VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "", "Percent")); + VerifyOrReturn(CheckConstraintMinValue("currentPositionTiltPercentage", currentPositionTiltPercentage, 0)); VerifyOrReturn(CheckConstraintMaxValue("currentPositionTiltPercentage", currentPositionTiltPercentage, 100)); NextTest(); } @@ -34207,11 +35503,21 @@ class Test_TC_WNCV_2_4 : public TestCommand break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Reads Type attribute from DUT\n"); - err = ShouldSkip("A_TYPE") ? CHIP_NO_ERROR : TestReadsTypeAttributeFromDut_1(); + if (ShouldSkip("A_TYPE")) + { + NextTest(); + return; + } + err = TestReadsTypeAttributeFromDut_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Reads Type attribute constraints\n"); - err = ShouldSkip("A_TYPE") ? CHIP_NO_ERROR : TestReadsTypeAttributeConstraints_2(); + if (ShouldSkip("A_TYPE")) + { + NextTest(); + return; + } + err = TestReadsTypeAttributeConstraints_2(); break; } @@ -34295,6 +35601,7 @@ class Test_TC_WNCV_2_4 : public TestCommand void OnSuccessResponse_2(uint8_t type) { VerifyOrReturn(CheckConstraintType("type", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("type", type, 0)); VerifyOrReturn(CheckConstraintMaxValue("type", type, 9)); NextTest(); } @@ -34340,11 +35647,21 @@ class Test_TC_WNCV_2_5 : public TestCommand break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Reads EndProductType attribute from DUT\n"); - err = ShouldSkip("A_ENDPRODUCTTYPE") ? CHIP_NO_ERROR : TestReadsEndProductTypeAttributeFromDut_1(); + if (ShouldSkip("A_ENDPRODUCTTYPE")) + { + NextTest(); + return; + } + err = TestReadsEndProductTypeAttributeFromDut_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Reads EndProductType attribute constraints from DUT\n"); - err = ShouldSkip("A_ENDPRODUCTTYPE") ? CHIP_NO_ERROR : TestReadsEndProductTypeAttributeConstraintsFromDut_2(); + if (ShouldSkip("A_ENDPRODUCTTYPE")) + { + NextTest(); + return; + } + err = TestReadsEndProductTypeAttributeConstraintsFromDut_2(); break; } @@ -34428,6 +35745,7 @@ class Test_TC_WNCV_2_5 : public TestCommand void OnSuccessResponse_2(uint8_t endProductType) { VerifyOrReturn(CheckConstraintType("endProductType", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("endProductType", endProductType, 0)); VerifyOrReturn(CheckConstraintMaxValue("endProductType", endProductType, 23)); NextTest(); } @@ -48485,6 +49803,7 @@ class TestCluster : public TestCommand void OnSuccessResponse_214(const chip::app::DataModel::Nullable & nullableInt8u) { + VerifyOrReturn(CheckConstraintMinValue("nullableInt8u", nullableInt8u, 0)); VerifyOrReturn(CheckConstraintMaxValue("nullableInt8u", nullableInt8u, 254)); NextTest(); } @@ -48543,6 +49862,7 @@ class TestCluster : public TestCommand void OnSuccessResponse_217(const chip::app::DataModel::Nullable & nullableInt8u) { + VerifyOrReturn(CheckConstraintMinValue("nullableInt8u", nullableInt8u, 0)); VerifyOrReturn(CheckConstraintMaxValue("nullableInt8u", nullableInt8u, 254)); NextTest(); } @@ -48744,6 +50064,7 @@ class TestCluster : public TestCommand void OnSuccessResponse_227(const chip::app::DataModel::Nullable & nullableInt16u) { + VerifyOrReturn(CheckConstraintMinValue("nullableInt16u", nullableInt16u, 0U)); VerifyOrReturn(CheckConstraintMaxValue("nullableInt16u", nullableInt16u, 65534U)); NextTest(); } @@ -48802,6 +50123,7 @@ class TestCluster : public TestCommand void OnSuccessResponse_230(const chip::app::DataModel::Nullable & nullableInt16u) { + VerifyOrReturn(CheckConstraintMinValue("nullableInt16u", nullableInt16u, 0U)); VerifyOrReturn(CheckConstraintMaxValue("nullableInt16u", nullableInt16u, 65534U)); NextTest(); } @@ -49003,6 +50325,7 @@ class TestCluster : public TestCommand void OnSuccessResponse_240(const chip::app::DataModel::Nullable & nullableInt32u) { + VerifyOrReturn(CheckConstraintMinValue("nullableInt32u", nullableInt32u, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("nullableInt32u", nullableInt32u, 4294967294UL)); NextTest(); } @@ -49061,6 +50384,7 @@ class TestCluster : public TestCommand void OnSuccessResponse_243(const chip::app::DataModel::Nullable & nullableInt32u) { + VerifyOrReturn(CheckConstraintMinValue("nullableInt32u", nullableInt32u, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("nullableInt32u", nullableInt32u, 4294967294UL)); NextTest(); } @@ -49262,6 +50586,7 @@ class TestCluster : public TestCommand void OnSuccessResponse_253(const chip::app::DataModel::Nullable & nullableInt64u) { + VerifyOrReturn(CheckConstraintMinValue("nullableInt64u", nullableInt64u, 0ULL)); VerifyOrReturn(CheckConstraintMaxValue("nullableInt64u", nullableInt64u, 18446744073709551614ULL)); NextTest(); } @@ -49320,6 +50645,7 @@ class TestCluster : public TestCommand void OnSuccessResponse_256(const chip::app::DataModel::Nullable & nullableInt64u) { + VerifyOrReturn(CheckConstraintMinValue("nullableInt64u", nullableInt64u, 0ULL)); VerifyOrReturn(CheckConstraintMaxValue("nullableInt64u", nullableInt64u, 18446744073709551614ULL)); NextTest(); } @@ -54628,8 +55954,51 @@ class TestConstraints : public TestCommand err = TestReadAttributeCharStringValueEndsWithConstraints_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Write attribute CHAR_STRING Value Back to Default Value\n"); - err = TestWriteAttributeCharStringValueBackToDefaultValue_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Write attribute CHAR_STRING Value\n"); + err = TestWriteAttributeCharStringValue_11(); + break; + case 12: + ChipLogProgress(chipTool, + " ***** Test Step 12 : Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints\n"); + err = TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Write attribute CHAR_STRING Value\n"); + err = TestWriteAttributeCharStringValue_13(); + break; + case 14: + ChipLogProgress(chipTool, + " ***** Test Step 14 : Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints\n"); + err = TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Write attribute CHAR_STRING Value\n"); + err = TestWriteAttributeCharStringValue_15(); + break; + case 16: + ChipLogProgress(chipTool, + " ***** Test Step 16 : Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints\n"); + err = TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Write attribute CHAR_STRING Value\n"); + err = TestWriteAttributeCharStringValue_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Read attribute CHAR_STRING Value isHexString Constraints\n"); + err = TestReadAttributeCharStringValueIsHexStringConstraints_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Write attribute CHAR_STRING Value\n"); + err = TestWriteAttributeCharStringValue_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Read attribute CHAR_STRING Value isHexString Constraints\n"); + err = TestReadAttributeCharStringValueIsHexStringConstraints_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Write attribute CHAR_STRING Value Back to Default Value\n"); + err = TestWriteAttributeCharStringValueBackToDefaultValue_21(); break; } @@ -54642,7 +56011,7 @@ class TestConstraints : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + const uint16_t mTestCount = 22; chip::Optional mCluster; chip::Optional mEndpoint; @@ -54745,6 +56114,91 @@ class TestConstraints : public TestCommand static void OnSuccessCallback_11(void * context) { (static_cast(context))->OnSuccessResponse_11(); } + static void OnFailureCallback_12(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_12(status); + } + + static void OnSuccessCallback_12(void * context, chip::CharSpan charString) + { + (static_cast(context))->OnSuccessResponse_12(charString); + } + + static void OnFailureCallback_13(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_13(status); + } + + static void OnSuccessCallback_13(void * context) { (static_cast(context))->OnSuccessResponse_13(); } + + static void OnFailureCallback_14(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_14(status); + } + + static void OnSuccessCallback_14(void * context, chip::CharSpan charString) + { + (static_cast(context))->OnSuccessResponse_14(charString); + } + + static void OnFailureCallback_15(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_15(status); + } + + static void OnSuccessCallback_15(void * context) { (static_cast(context))->OnSuccessResponse_15(); } + + static void OnFailureCallback_16(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_16(status); + } + + static void OnSuccessCallback_16(void * context, chip::CharSpan charString) + { + (static_cast(context))->OnSuccessResponse_16(charString); + } + + static void OnFailureCallback_17(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_17(status); + } + + static void OnSuccessCallback_17(void * context) { (static_cast(context))->OnSuccessResponse_17(); } + + static void OnFailureCallback_18(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_18(status); + } + + static void OnSuccessCallback_18(void * context, chip::CharSpan charString) + { + (static_cast(context))->OnSuccessResponse_18(charString); + } + + static void OnFailureCallback_19(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_19(status); + } + + static void OnSuccessCallback_19(void * context) { (static_cast(context))->OnSuccessResponse_19(); } + + static void OnFailureCallback_20(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_20(status); + } + + static void OnSuccessCallback_20(void * context, chip::CharSpan charString) + { + (static_cast(context))->OnSuccessResponse_20(charString); + } + + static void OnFailureCallback_21(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_21(status); + } + + static void OnSuccessCallback_21(void * context) { (static_cast(context))->OnSuccessResponse_21(); } + // // Tests methods // @@ -54943,14 +56397,14 @@ class TestConstraints : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeCharStringValueBackToDefaultValue_11() + CHIP_ERROR TestWriteAttributeCharStringValue_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::CharSpan charStringArgument; - charStringArgument = chip::Span("garbage: not in length on purpose", 0); + charStringArgument = chip::Span("lowercasegarbage: not in length on purpose", 9); ReturnErrorOnFailure(cluster.WriteAttribute( charStringArgument, this, OnSuccessCallback_11, OnFailureCallback_11)); @@ -54960,6 +56414,194 @@ class TestConstraints : public TestCommand void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } void OnSuccessResponse_11() { NextTest(); } + + CHIP_ERROR TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_12() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_12, OnFailureCallback_12)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_12(chip::CharSpan charString) + { + VerifyOrReturn(CheckConstraintIsUpperCase("charString", charString, false)); + VerifyOrReturn(CheckConstraintIsLowerCase("charString", charString, true)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeCharStringValue_13() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::CharSpan charStringArgument; + charStringArgument = chip::Span("UPPERCASEgarbage: not in length on purpose", 9); + + ReturnErrorOnFailure(cluster.WriteAttribute( + charStringArgument, this, OnSuccessCallback_13, OnFailureCallback_13)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_13() { NextTest(); } + + CHIP_ERROR TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_14() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_14, OnFailureCallback_14)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_14(chip::CharSpan charString) + { + VerifyOrReturn(CheckConstraintIsUpperCase("charString", charString, true)); + VerifyOrReturn(CheckConstraintIsLowerCase("charString", charString, false)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeCharStringValue_15() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::CharSpan charStringArgument; + charStringArgument = chip::Span("lowUPPERgarbage: not in length on purpose", 8); + + ReturnErrorOnFailure(cluster.WriteAttribute( + charStringArgument, this, OnSuccessCallback_15, OnFailureCallback_15)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_15() { NextTest(); } + + CHIP_ERROR TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_16() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_16, OnFailureCallback_16)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_16(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_16(chip::CharSpan charString) + { + VerifyOrReturn(CheckConstraintIsUpperCase("charString", charString, false)); + VerifyOrReturn(CheckConstraintIsLowerCase("charString", charString, false)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeCharStringValue_17() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::CharSpan charStringArgument; + charStringArgument = chip::Span("ABCDEF012Vgarbage: not in length on purpose", 10); + + ReturnErrorOnFailure(cluster.WriteAttribute( + charStringArgument, this, OnSuccessCallback_17, OnFailureCallback_17)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_17(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_17() { NextTest(); } + + CHIP_ERROR TestReadAttributeCharStringValueIsHexStringConstraints_18() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_18, OnFailureCallback_18)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_18(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_18(chip::CharSpan charString) + { + VerifyOrReturn(CheckConstraintIsHexString("charString", charString, false)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeCharStringValue_19() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::CharSpan charStringArgument; + charStringArgument = chip::Span("ABCDEF0123garbage: not in length on purpose", 10); + + ReturnErrorOnFailure(cluster.WriteAttribute( + charStringArgument, this, OnSuccessCallback_19, OnFailureCallback_19)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_19(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_19() { NextTest(); } + + CHIP_ERROR TestReadAttributeCharStringValueIsHexStringConstraints_20() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_20, OnFailureCallback_20)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_20(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_20(chip::CharSpan charString) + { + VerifyOrReturn(CheckConstraintIsHexString("charString", charString, true)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeCharStringValueBackToDefaultValue_21() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::CharSpan charStringArgument; + charStringArgument = chip::Span("garbage: not in length on purpose", 0); + + ReturnErrorOnFailure(cluster.WriteAttribute( + charStringArgument, this, OnSuccessCallback_21, OnFailureCallback_21)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_21(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_21() { NextTest(); } }; class TestDelayCommands : public TestCommand @@ -58527,9 +60169,9 @@ class TestDescriptorCluster : public TestCommand VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 5)); VerifyOrReturn(CheckValue("serverList[5]", iter_0.GetValue(), 40UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 6)); - VerifyOrReturn(CheckValue("serverList[6]", iter_0.GetValue(), 41UL)); + VerifyOrReturn(CheckValue("serverList[6]", iter_0.GetValue(), 42UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 7)); - VerifyOrReturn(CheckValue("serverList[7]", iter_0.GetValue(), 42UL)); + VerifyOrReturn(CheckValue("serverList[7]", iter_0.GetValue(), 43UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 8)); VerifyOrReturn(CheckValue("serverList[8]", iter_0.GetValue(), 46UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 9)); @@ -58583,7 +60225,9 @@ class TestDescriptorCluster : public TestCommand { { auto iter_0 = clientList.begin(); - VerifyOrReturn(CheckNoMoreListItems("clientList", iter_0, 0)); + VerifyOrReturn(CheckNextListItemDecodes("clientList", iter_0, 0)); + VerifyOrReturn(CheckValue("clientList[0]", iter_0.GetValue(), 41UL)); + VerifyOrReturn(CheckNoMoreListItems("clientList", iter_0, 1)); } NextTest(); @@ -60331,8 +61975,16 @@ class TestGroupMessaging : public TestCommand err = TestGroupWriteAttribute_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Restore initial location value\n"); - err = TestRestoreInitialLocationValue_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read back Attribute\n"); + err = TestReadBackAttribute_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Restore initial location value\n"); + err = TestRestoreInitialLocationValue_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read back Attribute\n"); + err = TestReadBackAttribute_4(); break; } @@ -60345,7 +61997,7 @@ class TestGroupMessaging : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + const uint16_t mTestCount = 5; chip::Optional mCluster; chip::Optional mEndpoint; @@ -60359,14 +62011,34 @@ class TestGroupMessaging : public TestCommand static void OnSuccessCallback_1(void * context) { (static_cast(context))->OnSuccessResponse_1(); } - static void OnDoneCallback_2(void * context) { (static_cast(context))->OnDoneResponse_2(); } - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } + static void OnSuccessCallback_2(void * context, chip::CharSpan location) + { + (static_cast(context))->OnSuccessResponse_2(location); + } + + static void OnDoneCallback_3(void * context) { (static_cast(context))->OnDoneResponse_3(); } + + static void OnFailureCallback_3(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_3(status); + } + + static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } + + static void OnFailureCallback_4(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_4(status); + } + + static void OnSuccessCallback_4(void * context, chip::CharSpan location) + { + (static_cast(context))->OnSuccessResponse_4(location); + } // // Tests methods @@ -60398,7 +62070,27 @@ class TestGroupMessaging : public TestCommand void OnDoneResponse_1() { NextTest(); } - CHIP_ERROR TestRestoreInitialLocationValue_2() + CHIP_ERROR TestReadBackAttribute_2() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; + chip::Controller::BasicClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_2(chip::CharSpan location) + { + VerifyOrReturn(CheckValueAsString("location", location, chip::CharSpan("us", 2))); + + NextTest(); + } + + CHIP_ERROR TestRestoreInitialLocationValue_3() { const chip::GroupId groupId = 1234; chip::Controller::BasicClusterTest cluster; @@ -60408,15 +62100,35 @@ class TestGroupMessaging : public TestCommand locationArgument = chip::Span("garbage: not in length on purpose", 0); ReturnErrorOnFailure(cluster.WriteAttribute( - locationArgument, this, OnSuccessCallback_2, OnFailureCallback_2, OnDoneCallback_2)); + locationArgument, this, OnSuccessCallback_3, OnFailureCallback_3, OnDoneCallback_3)); return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2() { NextTest(); } + void OnSuccessResponse_3() { NextTest(); } + + void OnDoneResponse_3() { NextTest(); } - void OnDoneResponse_2() { NextTest(); } + CHIP_ERROR TestReadBackAttribute_4() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; + chip::Controller::BasicClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_4(chip::CharSpan location) + { + VerifyOrReturn(CheckValueAsString("location", location, chip::CharSpan("", 0))); + + NextTest(); + } }; class Test_TC_SWDIAG_1_1 : public TestCommand @@ -60463,12 +62175,21 @@ class Test_TC_SWDIAG_1_1 : public TestCommand break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Reads CurrentHeapUsed non-global attribute value from DUT\n"); - err = ShouldSkip("A_CURRENTHEAPUSED") ? CHIP_NO_ERROR : TestReadsCurrentHeapUsedNonGlobalAttributeValueFromDut_2(); + if (ShouldSkip("A_CURRENTHEAPUSED")) + { + NextTest(); + return; + } + err = TestReadsCurrentHeapUsedNonGlobalAttributeValueFromDut_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Reads CurrentHeapHighWaterMark non-global attribute value from DUT\n"); - err = ShouldSkip("A_CURRENTHEAPHIGHWATERMARK") ? CHIP_NO_ERROR - : TestReadsCurrentHeapHighWaterMarkNonGlobalAttributeValueFromDut_3(); + if (ShouldSkip("A_CURRENTHEAPHIGHWATERMARK")) + { + NextTest(); + return; + } + err = TestReadsCurrentHeapHighWaterMarkNonGlobalAttributeValueFromDut_3(); break; } @@ -60687,6 +62408,24 @@ class Test_TC_SWDIAG_3_1 : public TestCommand ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads CurrentHeapUsed attribute value from DUT\n"); + if (ShouldSkip("A_CURRENTHEAPUSED")) + { + NextTest(); + return; + } + err = TestReadsCurrentHeapUsedAttributeValueFromDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads CurrentHeapHighWaterMark attribute value from DUT\n"); + if (ShouldSkip("A_CURRENTHEAPHIGHWATERMARK")) + { + NextTest(); + return; + } + err = TestReadsCurrentHeapHighWaterMarkAttributeValueFromDut_2(); + break; } if (CHIP_NO_ERROR != err) @@ -60698,11 +62437,31 @@ class Test_TC_SWDIAG_3_1 : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 1; + const uint16_t mTestCount = 3; chip::Optional mCluster; chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_1(status); + } + + static void OnSuccessCallback_1(void * context, uint64_t currentHeapUsed) + { + (static_cast(context))->OnSuccessResponse_1(currentHeapUsed); + } + + static void OnFailureCallback_2(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_2(status); + } + + static void OnSuccessCallback_2(void * context, uint64_t currentHeapHighWatermark) + { + (static_cast(context))->OnSuccessResponse_2(currentHeapHighWatermark); + } + // // Tests methods // @@ -60712,6 +62471,53 @@ class Test_TC_SWDIAG_3_1 : public TestCommand SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } + + CHIP_ERROR TestReadsCurrentHeapUsedAttributeValueFromDut_1() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::SoftwareDiagnosticsClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_1(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_1(uint64_t currentHeapUsed) + { + VerifyOrReturn(CheckValue("currentHeapUsed", currentHeapUsed, 0ULL)); + + NextTest(); + } + + CHIP_ERROR TestReadsCurrentHeapHighWaterMarkAttributeValueFromDut_2() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::SoftwareDiagnosticsClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_2(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_2(uint64_t currentHeapHighWatermark) + { + VerifyOrReturn(CheckValue("currentHeapHighWatermark", currentHeapHighWatermark, 0ULL)); + + NextTest(); + } }; class TestSubscribe_OnOff : public TestCommand diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp index 779834df8d925a..2747ebd5c3e560 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp @@ -1235,6 +1235,28 @@ void LevelControlClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvDat cb->mCall(cb->mContext, list); } +void LocalizationConfigurationClusterSupportedLocalesListAttributeFilter(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 LowPowerClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { @@ -2893,6 +2915,20 @@ bool emberAfTestClusterClusterTestAddArgumentsResponseCallback(EndpointId endpoi return true; } +bool emberAfTestClusterClusterTestEmitTestEventResponseCallback(EndpointId endpoint, app::CommandSender * commandObj, + uint64_t value) +{ + ChipLogProgress(Zcl, "TestEmitTestEventResponse:"); + ChipLogProgress(Zcl, " value: %" PRIu64 "", value); + + GET_CLUSTER_RESPONSE_CALLBACKS("TestClusterClusterTestEmitTestEventResponseCallback"); + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, value); + return true; +} + bool emberAfTestClusterClusterTestEnumsResponseCallback(EndpointId endpoint, app::CommandSender * commandObj, chip::VendorId arg1, uint8_t arg2) { diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h index c4551161a6357c..5584bf2c23a8f5 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h @@ -101,6 +101,7 @@ typedef void (*TargetNavigatorClusterNavigateTargetResponseCallback)(void * cont typedef void (*TestClusterClusterBooleanResponseCallback)(void * context, bool value); typedef void (*TestClusterClusterSimpleStructResponseCallback)(void * context, SimpleStruct arg1); typedef void (*TestClusterClusterTestAddArgumentsResponseCallback)(void * context, uint8_t returnValue); +typedef void (*TestClusterClusterTestEmitTestEventResponseCallback)(void * context, uint64_t value); typedef void (*TestClusterClusterTestEnumsResponseCallback)(void * context, chip::VendorId arg1, uint8_t arg2); typedef void (*TestClusterClusterTestListInt8UReverseResponseCallback)(void * context, /* TYPE WARNING: array array defaults to */ uint8_t * arg1); @@ -372,6 +373,11 @@ void LevelControlClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * chip::Callback::Cancelable * onFailureCallback); typedef void (*LevelControlAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); +void LocalizationConfigurationClusterSupportedLocalesListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*LocalizationConfigurationSupportedLocalesListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); void LowPowerClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); typedef void (*LowPowerAttributeListListAttributeCallback)(void * context, diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp index 681b6afefaf038..8d4586e2f0a1af 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp @@ -3992,6 +3992,8 @@ CHIP_ERROR LevelControlCluster::StopWithOnOff(Callback::Cancelable * onSuccessCa return err; } +// LocalizationConfiguration Cluster Commands + // LowPower Cluster Commands CHIP_ERROR LowPowerCluster::Sleep(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { @@ -6331,6 +6333,53 @@ CHIP_ERROR TestClusterCluster::TestAddArguments(Callback::Cancelable * onSuccess return err; } +CHIP_ERROR TestClusterCluster::TestEmitTestEventRequest(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t arg1, uint8_t arg2, + bool arg3) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + TestCluster::Commands::TestEmitTestEventRequest::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // arg1: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), arg1)); + // arg2: simpleEnum + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), arg2)); + // arg3: boolean + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), arg3)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + CHIP_ERROR TestClusterCluster::TestEnumsRequest(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, chip::VendorId arg1, uint8_t arg2) { diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h index 3e6c0b7081c175..83eb1a93a8f94c 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h @@ -456,6 +456,13 @@ class DLL_EXPORT LevelControlCluster : public ClusterBase CHIP_ERROR StopWithOnOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); }; +class DLL_EXPORT LocalizationConfigurationCluster : public ClusterBase +{ +public: + LocalizationConfigurationCluster() : ClusterBase(app::Clusters::LocalizationConfiguration::Id) {} + ~LocalizationConfigurationCluster() {} +}; + class DLL_EXPORT LowPowerCluster : public ClusterBase { public: @@ -728,6 +735,8 @@ class DLL_EXPORT TestClusterCluster : public ClusterBase CHIP_ERROR Test(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); CHIP_ERROR TestAddArguments(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t arg1, uint8_t arg2); + CHIP_ERROR TestEmitTestEventRequest(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t arg1, uint8_t arg2, bool arg3); CHIP_ERROR TestEnumsRequest(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, chip::VendorId arg1, uint8_t arg2); CHIP_ERROR TestListInt8UArgumentRequest(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, diff --git a/zzz_generated/controller-clusters/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/controller-clusters/zap-generated/IMClusterCommandHandler.cpp index 5c79540bad0ac2..d981635c673b23 100644 --- a/zzz_generated/controller-clusters/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/controller-clusters/zap-generated/IMClusterCommandHandler.cpp @@ -3259,6 +3259,65 @@ void DispatchClientCommand(CommandSender * apCommandObj, const ConcreteCommandPa } break; } + case Commands::TestEmitTestEventResponse::Id: { + expectArgumentCount = 1; + uint64_t value; + bool argExists[1]; + + memset(argExists, 0, sizeof argExists); + + while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) + { + // Since call to aDataTlv.Next() is CHIP_NO_ERROR, the read head always points to an element. + // Skip this element if it is not a ContextTag, not consider it as an error if other values are valid. + if (!TLV::IsContextTag(aDataTlv.GetTag())) + { + continue; + } + currentDecodeTagId = TLV::TagNumFromTag(aDataTlv.GetTag()); + if (currentDecodeTagId < 1) + { + if (argExists[currentDecodeTagId]) + { + ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); + TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; + break; + } + else + { + argExists[currentDecodeTagId] = true; + validArgumentCount++; + } + } + switch (currentDecodeTagId) + { + case 0: + TLVUnpackError = aDataTlv.Get(value); + break; + default: + // Unsupported tag, ignore it. + ChipLogProgress(Zcl, "Unknown TLV tag during processing."); + break; + } + if (CHIP_NO_ERROR != TLVUnpackError) + { + break; + } + } + + if (CHIP_END_OF_TLV == TLVError) + { + // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. + TLVError = CHIP_NO_ERROR; + } + + if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount) + { + wasHandled = + emberAfTestClusterClusterTestEmitTestEventResponseCallback(aCommandPath.mEndpointId, apCommandObj, value); + } + break; + } case Commands::TestEnumsResponse::Id: { expectArgumentCount = 2; chip::VendorId arg1; diff --git a/zzz_generated/controller-clusters/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/controller-clusters/zap-generated/PluginApplicationCallbacks.h index 58ad4eee403386..a1db299d699aa0 100644 --- a/zzz_generated/controller-clusters/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/controller-clusters/zap-generated/PluginApplicationCallbacks.h @@ -53,6 +53,7 @@ MatterIlluminanceMeasurementPluginClientInitCallback(); \ MatterKeypadInputPluginClientInitCallback(); \ MatterLevelControlPluginClientInitCallback(); \ + MatterLocalizationConfigurationPluginClientInitCallback(); \ MatterLowPowerPluginClientInitCallback(); \ MatterMediaInputPluginClientInitCallback(); \ MatterMediaPlaybackPluginClientInitCallback(); \ diff --git a/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp b/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp index 105f048289f12a..553c4b2eace656 100644 --- a/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp +++ b/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp @@ -122,6 +122,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_LEVEL_CONTROL_CLUSTER_ID: emberAfLevelControlClusterInitCallback(endpoint); break; + case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; case ZCL_LOW_POWER_CLUSTER_ID: emberAfLowPowerClusterInitCallback(endpoint); break; @@ -370,6 +373,11 @@ void __attribute__((weak)) emberAfLevelControlClusterInitCallback(EndpointId end // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfLowPowerClusterInitCallback(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 b595a44c43dc83..f38eedda6b7b15 100644 --- a/zzz_generated/controller-clusters/zap-generated/endpoint_config.h +++ b/zzz_generated/controller-clusters/zap-generated/endpoint_config.h @@ -318,7 +318,7 @@ #define GENERATED_FUNCTION_ARRAYS #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 60 +#define GENERATED_CLUSTER_COUNT 61 #define GENERATED_CLUSTERS \ { \ { 0x0003, ZAP_ATTRIBUTE_INDEX(0), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Identify (client) */ \ @@ -351,6 +351,9 @@ { \ 0x002A, ZAP_ATTRIBUTE_INDEX(13), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: OTA Software Update Requestor (client) */ \ + { \ + 0x002B, ZAP_ATTRIBUTE_INDEX(14), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ + }, /* Endpoint: 1, Cluster: Localization Configuration (client) */ \ { \ 0x002E, ZAP_ATTRIBUTE_INDEX(14), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Power Source Configuration (client) */ \ @@ -494,7 +497,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 60, 138 }, \ + { ZAP_CLUSTER_INDEX(0), 61, 138 }, \ } // Largest attribute size is needed for various buffers diff --git a/zzz_generated/controller-clusters/zap-generated/gen_config.h b/zzz_generated/controller-clusters/zap-generated/gen_config.h index 1a538867128128..b434e22141f697 100644 --- a/zzz_generated/controller-clusters/zap-generated/gen_config.h +++ b/zzz_generated/controller-clusters/zap-generated/gen_config.h @@ -60,6 +60,7 @@ #define EMBER_AF_ILLUMINANCE_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_KEYPAD_INPUT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_LEVEL_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (1) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_LOW_POWER_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_MEDIA_INPUT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_MEDIA_PLAYBACK_CLUSTER_CLIENT_ENDPOINT_COUNT (1) @@ -216,6 +217,10 @@ #define ZCL_USING_LEVEL_CONTROL_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_LEVEL_CONTROL_CLIENT +// Use this macro to check if the client side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_CLIENT +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_CLIENT + // Use this macro to check if the client side of the Low Power cluster is included #define ZCL_USING_LOW_POWER_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_LOW_POWER_CLIENT diff --git a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h index 8733079a01b4f4..aa243c4170bd4d 100644 --- a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h +++ b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h @@ -241,6 +241,13 @@ class DLL_EXPORT LevelControlClusterTest : public LevelControlCluster ~LevelControlClusterTest() {} }; +class DLL_EXPORT LocalizationConfigurationClusterTest : public LocalizationConfigurationCluster +{ +public: + LocalizationConfigurationClusterTest() : LocalizationConfigurationCluster() {} + ~LocalizationConfigurationClusterTest() {} +}; + class DLL_EXPORT LowPowerClusterTest : public LowPowerCluster { public: diff --git a/zzz_generated/door-lock-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/door-lock-app/zap-generated/PluginApplicationCallbacks.h index fd99dee02a36fa..721fcc1e447ca9 100644 --- a/zzz_generated/door-lock-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/door-lock-app/zap-generated/PluginApplicationCallbacks.h @@ -31,6 +31,7 @@ MatterFixedLabelPluginServerInitCallback(); \ MatterGeneralCommissioningPluginServerInitCallback(); \ MatterGeneralDiagnosticsPluginServerInitCallback(); \ + MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ MatterOperationalCredentialsPluginServerInitCallback(); \ MatterPowerSourcePluginServerInitCallback(); \ diff --git a/zzz_generated/door-lock-app/zap-generated/callback-stub.cpp b/zzz_generated/door-lock-app/zap-generated/callback-stub.cpp index 6f8c064ca598c2..91e0e39bba160a 100644 --- a/zzz_generated/door-lock-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/door-lock-app/zap-generated/callback-stub.cpp @@ -56,6 +56,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID: emberAfGeneralDiagnosticsClusterInitCallback(endpoint); break; + case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: emberAfNetworkCommissioningClusterInitCallback(endpoint); break; @@ -131,6 +134,11 @@ void __attribute__((weak)) emberAfGeneralDiagnosticsClusterInitCallback(Endpoint // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfNetworkCommissioningClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/door-lock-app/zap-generated/endpoint_config.h b/zzz_generated/door-lock-app/zap-generated/endpoint_config.h index aae0e26c48f0b7..4c1522a59ddfe2 100644 --- a/zzz_generated/door-lock-app/zap-generated/endpoint_config.h +++ b/zzz_generated/door-lock-app/zap-generated/endpoint_config.h @@ -615,7 +615,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 194 +#define GENERATED_ATTRIBUTE_COUNT 196 #define GENERATED_ATTRIBUTES \ { \ \ @@ -642,6 +642,10 @@ { 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: Localization Configuration (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + \ /* 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 */ \ @@ -877,7 +881,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 19 +#define GENERATED_CLUSTER_COUNT 20 #define GENERATED_CLUSTERS \ { \ { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ @@ -888,55 +892,58 @@ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x002E, ZAP_ATTRIBUTE_INDEX(17), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(17), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { \ + 0x002E, ZAP_ATTRIBUTE_INDEX(19), 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 \ + 0x002F, ZAP_ATTRIBUTE_INDEX(21), 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 \ + 0x0030, ZAP_ATTRIBUTE_INDEX(27), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(31), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(33), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(41), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(43), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(41), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(43), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(50), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(52), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(56), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(58), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(121), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(123), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(136), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(138), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(147), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(149), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(151), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(153), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(157), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(159), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(159), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(161), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(161), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(163), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(166), 9, 133, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002F, ZAP_ATTRIBUTE_INDEX(168), 9, 133, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Power Source (server) */ \ { 0x0101, \ - ZAP_ATTRIBUTE_INDEX(175), \ + ZAP_ATTRIBUTE_INDEX(177), \ 19, \ 29, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | \ @@ -949,7 +956,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 16, 1070 }, { ZAP_CLUSTER_INDEX(16), 3, 162 }, \ + { ZAP_CLUSTER_INDEX(0), 17, 1106 }, { ZAP_CLUSTER_INDEX(17), 3, 162 }, \ } // Largest attribute size is needed for various buffers @@ -959,7 +966,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (246) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1232) +#define ATTRIBUTE_MAX_SIZE (1268) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/door-lock-app/zap-generated/gen_config.h b/zzz_generated/door-lock-app/zap-generated/gen_config.h index 0c7333888530e9..e77427d0c9a328 100644 --- a/zzz_generated/door-lock-app/zap-generated/gen_config.h +++ b/zzz_generated/door-lock-app/zap-generated/gen_config.h @@ -38,6 +38,7 @@ #define EMBER_AF_FIXED_LABEL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_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) @@ -94,6 +95,11 @@ #define EMBER_AF_PLUGIN_GENERAL_DIAGNOSTICS_SERVER #define EMBER_AF_PLUGIN_GENERAL_DIAGNOSTICS +// Use this macro to check if the server side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + // Use this macro to check if the server side of the Network Commissioning cluster is included #define ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING_SERVER diff --git a/zzz_generated/lighting-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/lighting-app/zap-generated/PluginApplicationCallbacks.h index ac93a15a8550c2..a1fb371ae0b6b7 100644 --- a/zzz_generated/lighting-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/lighting-app/zap-generated/PluginApplicationCallbacks.h @@ -33,6 +33,7 @@ MatterGeneralDiagnosticsPluginServerInitCallback(); \ MatterIdentifyPluginServerInitCallback(); \ MatterLevelControlPluginServerInitCallback(); \ + MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ MatterOtaSoftwareUpdateProviderPluginClientInitCallback(); \ MatterOccupancySensingPluginServerInitCallback(); \ diff --git a/zzz_generated/lighting-app/zap-generated/callback-stub.cpp b/zzz_generated/lighting-app/zap-generated/callback-stub.cpp index ff219206cbe828..ccb5454a214c2c 100644 --- a/zzz_generated/lighting-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/lighting-app/zap-generated/callback-stub.cpp @@ -62,6 +62,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_LEVEL_CONTROL_CLUSTER_ID: emberAfLevelControlClusterInitCallback(endpoint); break; + case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: emberAfNetworkCommissioningClusterInitCallback(endpoint); break; @@ -156,6 +159,11 @@ void __attribute__((weak)) emberAfLevelControlClusterInitCallback(EndpointId end // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfNetworkCommissioningClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/lighting-app/zap-generated/endpoint_config.h b/zzz_generated/lighting-app/zap-generated/endpoint_config.h index b5fca851ead891..e32b52b850391d 100644 --- a/zzz_generated/lighting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lighting-app/zap-generated/endpoint_config.h @@ -577,7 +577,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 221 +#define GENERATED_ATTRIBUTE_COUNT 223 #define GENERATED_ATTRIBUTES \ { \ \ @@ -613,6 +613,10 @@ { 0x0012, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* UniqueID */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + \ /* 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 */ \ @@ -889,7 +893,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 24 +#define GENERATED_CLUSTER_COUNT 25 #define GENERATED_CLUSTERS \ { \ { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ @@ -903,82 +907,85 @@ 0x0029, ZAP_ATTRIBUTE_INDEX(25), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 0, Cluster: OTA Software Update Provider (client) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(25), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(25), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { \ + 0x0030, ZAP_ATTRIBUTE_INDEX(27), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(31), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(33), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(41), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(43), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(41), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(43), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(50), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(52), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(56), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(58), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(121), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(123), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(136), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(138), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003B, ZAP_ATTRIBUTE_INDEX(147), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003B, ZAP_ATTRIBUTE_INDEX(149), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Switch (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(147), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(149), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(151), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(153), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(157), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(159), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(159), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(161), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (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) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(164), \ + ZAP_ATTRIBUTE_INDEX(166), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x0008, \ - ZAP_ATTRIBUTE_INDEX(171), \ + ZAP_ATTRIBUTE_INDEX(173), \ 15, \ 23, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(186), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(188), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { 0x0300, \ - ZAP_ATTRIBUTE_INDEX(191), \ + ZAP_ATTRIBUTE_INDEX(193), \ 22, \ 36, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(213), \ + ZAP_ATTRIBUTE_INDEX(215), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOccupancySensingServer }, /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ { \ - 0x0006, ZAP_ATTRIBUTE_INDEX(217), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0006, ZAP_ATTRIBUTE_INDEX(219), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 2, Cluster: On/Off (client) */ \ { \ - 0x0007, ZAP_ATTRIBUTE_INDEX(218), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0007, ZAP_ATTRIBUTE_INDEX(220), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: On/off Switch Configuration (server) */ \ } @@ -987,7 +994,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 16, 1436 }, { ZAP_CLUSTER_INDEX(16), 6, 82 }, { ZAP_CLUSTER_INDEX(22), 2, 6 }, \ + { ZAP_CLUSTER_INDEX(0), 17, 1472 }, { ZAP_CLUSTER_INDEX(17), 6, 82 }, { ZAP_CLUSTER_INDEX(23), 2, 6 }, \ } // Largest attribute size is needed for various buffers @@ -997,7 +1004,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (687) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1524) +#define ATTRIBUTE_MAX_SIZE (1560) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) diff --git a/zzz_generated/lighting-app/zap-generated/gen_config.h b/zzz_generated/lighting-app/zap-generated/gen_config.h index 1ce9f36f46e1aa..053035a8d0e6cc 100644 --- a/zzz_generated/lighting-app/zap-generated/gen_config.h +++ b/zzz_generated/lighting-app/zap-generated/gen_config.h @@ -40,6 +40,7 @@ #define EMBER_AF_GENERAL_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_IDENTIFY_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OTA_PROVIDER_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_OCCUPANCY_SENSING_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -118,6 +119,11 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 +// Use this macro to check if the server side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + // Use this macro to check if the server side of the Network Commissioning cluster is included #define ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING_SERVER diff --git a/zzz_generated/lock-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/lock-app/zap-generated/PluginApplicationCallbacks.h index 9a4bb6ef208247..283a0d39b2a71d 100644 --- a/zzz_generated/lock-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/lock-app/zap-generated/PluginApplicationCallbacks.h @@ -30,6 +30,7 @@ MatterFixedLabelPluginServerInitCallback(); \ MatterGeneralCommissioningPluginServerInitCallback(); \ MatterGeneralDiagnosticsPluginServerInitCallback(); \ + MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ MatterOnOffPluginServerInitCallback(); \ MatterOperationalCredentialsPluginServerInitCallback(); \ diff --git a/zzz_generated/lock-app/zap-generated/callback-stub.cpp b/zzz_generated/lock-app/zap-generated/callback-stub.cpp index ab25a52ca85fbf..0ff68ab589c5c0 100644 --- a/zzz_generated/lock-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/lock-app/zap-generated/callback-stub.cpp @@ -53,6 +53,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID: emberAfGeneralDiagnosticsClusterInitCallback(endpoint); break; + case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: emberAfNetworkCommissioningClusterInitCallback(endpoint); break; @@ -126,6 +129,11 @@ void __attribute__((weak)) emberAfGeneralDiagnosticsClusterInitCallback(Endpoint // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfNetworkCommissioningClusterInitCallback(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 ea9e855079a2e8..42073b3fa69f29 100644 --- a/zzz_generated/lock-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lock-app/zap-generated/endpoint_config.h @@ -601,7 +601,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 182 +#define GENERATED_ATTRIBUTE_COUNT 184 #define GENERATED_ATTRIBUTES \ { \ \ @@ -628,6 +628,10 @@ { 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: Localization Configuration (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + \ /* 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 */ \ @@ -845,7 +849,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 19 +#define GENERATED_CLUSTER_COUNT 20 #define GENERATED_CLUSTERS \ { \ { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ @@ -856,58 +860,61 @@ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x002E, ZAP_ATTRIBUTE_INDEX(17), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(17), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { \ + 0x002E, ZAP_ATTRIBUTE_INDEX(19), 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 \ + 0x002F, ZAP_ATTRIBUTE_INDEX(21), 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 \ + 0x0030, ZAP_ATTRIBUTE_INDEX(27), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(31), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(33), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(41), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(43), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(41), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(43), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(50), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(52), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(56), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(58), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(121), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(123), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(136), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(138), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(147), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(149), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(151), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(153), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(157), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(159), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(159), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(161), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(161), \ + ZAP_ATTRIBUTE_INDEX(163), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(168), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(170), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(173), 9, 133, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002F, ZAP_ATTRIBUTE_INDEX(175), 9, 133, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Power Source (server) */ \ } @@ -916,7 +923,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 16, 1070 }, { ZAP_CLUSTER_INDEX(16), 3, 146 }, \ + { ZAP_CLUSTER_INDEX(0), 17, 1106 }, { ZAP_CLUSTER_INDEX(17), 3, 146 }, \ } // Largest attribute size is needed for various buffers @@ -926,7 +933,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (246) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1216) +#define ATTRIBUTE_MAX_SIZE (1252) // 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 39b4ce04665a4e..ff49f2cd25c1ad 100644 --- a/zzz_generated/lock-app/zap-generated/gen_config.h +++ b/zzz_generated/lock-app/zap-generated/gen_config.h @@ -37,6 +37,7 @@ #define EMBER_AF_FIXED_LABEL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #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) @@ -89,6 +90,11 @@ #define EMBER_AF_PLUGIN_GENERAL_DIAGNOSTICS_SERVER #define EMBER_AF_PLUGIN_GENERAL_DIAGNOSTICS +// Use this macro to check if the server side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + // Use this macro to check if the server side of the Network Commissioning cluster is included #define ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING_SERVER diff --git a/zzz_generated/ota-provider-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/ota-provider-app/zap-generated/PluginApplicationCallbacks.h index fad0ef9d414927..f03b2fe574ae10 100644 --- a/zzz_generated/ota-provider-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/ota-provider-app/zap-generated/PluginApplicationCallbacks.h @@ -24,6 +24,7 @@ #define MATTER_PLUGINS_INIT \ MatterFixedLabelPluginServerInitCallback(); \ MatterGeneralCommissioningPluginServerInitCallback(); \ + MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ MatterOtaSoftwareUpdateProviderPluginServerInitCallback(); \ MatterOperationalCredentialsPluginServerInitCallback(); \ diff --git a/zzz_generated/ota-provider-app/zap-generated/callback-stub.cpp b/zzz_generated/ota-provider-app/zap-generated/callback-stub.cpp index 38d052057955ba..970d17d71a9bb9 100644 --- a/zzz_generated/ota-provider-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/ota-provider-app/zap-generated/callback-stub.cpp @@ -35,6 +35,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: emberAfGeneralCommissioningClusterInitCallback(endpoint); break; + case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: emberAfNetworkCommissioningClusterInitCallback(endpoint); break; @@ -63,6 +66,11 @@ void __attribute__((weak)) emberAfGeneralCommissioningClusterInitCallback(Endpoi // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfNetworkCommissioningClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h b/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h index 9d1654a9823ee0..a579509c0b88d0 100644 --- a/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h +++ b/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h @@ -133,13 +133,17 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 27 +#define GENERATED_ATTRIBUTE_COUNT 29 #define GENERATED_ATTRIBUTES \ { \ \ /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* SupportedLocales */ \ + \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(0) }, /* Breadcrumb */ \ { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(8) }, /* BasicCommissioningInfoList */ \ @@ -187,26 +191,29 @@ #define GENERATED_FUNCTION_ARRAYS #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 6 +#define GENERATED_CLUSTER_COUNT 7 #define GENERATED_CLUSTERS \ { \ { \ 0x0029, ZAP_ATTRIBUTE_INDEX(0), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(1), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(1), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { \ + 0x0030, ZAP_ATTRIBUTE_INDEX(3), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(7), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(9), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(17), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(19), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(23), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(25), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(25), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(27), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ } @@ -215,7 +222,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 6, 340 }, \ + { ZAP_CLUSTER_INDEX(0), 7, 376 }, \ } // Largest attribute size is needed for various buffers @@ -225,7 +232,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (0) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (340) +#define ATTRIBUTE_MAX_SIZE (376) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (1) diff --git a/zzz_generated/ota-provider-app/zap-generated/gen_config.h b/zzz_generated/ota-provider-app/zap-generated/gen_config.h index 9f87a95135c1fa..c87b837d639c15 100644 --- a/zzz_generated/ota-provider-app/zap-generated/gen_config.h +++ b/zzz_generated/ota-provider-app/zap-generated/gen_config.h @@ -31,6 +31,7 @@ /**** Cluster endpoint counts ****/ #define EMBER_AF_FIXED_LABEL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OTA_PROVIDER_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OPERATIONAL_CREDENTIALS_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -48,6 +49,11 @@ #define EMBER_AF_PLUGIN_GENERAL_COMMISSIONING_SERVER #define EMBER_AF_PLUGIN_GENERAL_COMMISSIONING +// Use this macro to check if the server side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + // Use this macro to check if the server side of the Network Commissioning cluster is included #define ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING_SERVER diff --git a/zzz_generated/ota-requestor-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/ota-requestor-app/zap-generated/PluginApplicationCallbacks.h index 3bbd9e5dc78fa3..1755fcd9f503a4 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/ota-requestor-app/zap-generated/PluginApplicationCallbacks.h @@ -25,6 +25,7 @@ MatterBasicPluginServerInitCallback(); \ MatterFixedLabelPluginServerInitCallback(); \ MatterGeneralCommissioningPluginServerInitCallback(); \ + MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ MatterOtaSoftwareUpdateProviderPluginClientInitCallback(); \ MatterOtaSoftwareUpdateRequestorPluginServerInitCallback(); \ diff --git a/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp b/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp index 10c525beeb9ce6..500c51e856ba69 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp @@ -38,6 +38,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: emberAfGeneralCommissioningClusterInitCallback(endpoint); break; + case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: emberAfNetworkCommissioningClusterInitCallback(endpoint); break; @@ -74,6 +77,11 @@ void __attribute__((weak)) emberAfGeneralCommissioningClusterInitCallback(Endpoi // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfNetworkCommissioningClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h b/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h index 2366566c61aa77..370e417762b800 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h +++ b/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h @@ -143,7 +143,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 44 +#define GENERATED_ATTRIBUTE_COUNT 46 #define GENERATED_ATTRIBUTES \ { \ \ @@ -174,6 +174,10 @@ { 0x0003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* SupportedLocales */ \ + \ /* 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 */ \ @@ -224,7 +228,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 8 +#define GENERATED_CLUSTER_COUNT 9 #define GENERATED_CLUSTERS \ { \ { 0x0028, \ @@ -240,19 +244,22 @@ 0x002A, ZAP_ATTRIBUTE_INDEX(13), 5, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(18), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(18), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { \ + 0x0030, ZAP_ATTRIBUTE_INDEX(20), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(24), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(26), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(34), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(36), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(40), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(42), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(42), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(44), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ } @@ -261,7 +268,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 8, 591 }, \ + { ZAP_CLUSTER_INDEX(0), 9, 627 }, \ } // Largest attribute size is needed for various buffers @@ -271,7 +278,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (246) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (591) +#define ATTRIBUTE_MAX_SIZE (627) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (1) diff --git a/zzz_generated/ota-requestor-app/zap-generated/gen_config.h b/zzz_generated/ota-requestor-app/zap-generated/gen_config.h index d317f39bbdc43c..c24be940fb3941 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/gen_config.h +++ b/zzz_generated/ota-requestor-app/zap-generated/gen_config.h @@ -32,6 +32,7 @@ #define EMBER_AF_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_FIXED_LABEL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OTA_PROVIDER_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_OTA_REQUESTOR_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -55,6 +56,11 @@ #define EMBER_AF_PLUGIN_GENERAL_COMMISSIONING_SERVER #define EMBER_AF_PLUGIN_GENERAL_COMMISSIONING +// Use this macro to check if the server side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + // Use this macro to check if the server side of the Network Commissioning cluster is included #define ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING_SERVER diff --git a/zzz_generated/pump-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/pump-app/zap-generated/PluginApplicationCallbacks.h index 3de849fbc19dfb..1577ba5b20e53c 100644 --- a/zzz_generated/pump-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/pump-app/zap-generated/PluginApplicationCallbacks.h @@ -32,6 +32,7 @@ MatterGeneralCommissioningPluginServerInitCallback(); \ MatterGeneralDiagnosticsPluginServerInitCallback(); \ MatterLevelControlPluginServerInitCallback(); \ + MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ MatterOnOffPluginServerInitCallback(); \ MatterOperationalCredentialsPluginServerInitCallback(); \ diff --git a/zzz_generated/pump-app/zap-generated/callback-stub.cpp b/zzz_generated/pump-app/zap-generated/callback-stub.cpp index c9eb42086f4c57..56c234f67b6905 100644 --- a/zzz_generated/pump-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/pump-app/zap-generated/callback-stub.cpp @@ -56,6 +56,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_LEVEL_CONTROL_CLUSTER_ID: emberAfLevelControlClusterInitCallback(endpoint); break; + case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: emberAfNetworkCommissioningClusterInitCallback(endpoint); break; @@ -134,6 +137,11 @@ void __attribute__((weak)) emberAfLevelControlClusterInitCallback(EndpointId end // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfNetworkCommissioningClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/pump-app/zap-generated/endpoint_config.h b/zzz_generated/pump-app/zap-generated/endpoint_config.h index 569d0885c7a39e..200f63cd9215b2 100644 --- a/zzz_generated/pump-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-app/zap-generated/endpoint_config.h @@ -483,7 +483,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 177 +#define GENERATED_ATTRIBUTE_COUNT 179 #define GENERATED_ATTRIBUTES \ { \ \ @@ -510,6 +510,10 @@ { 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: Localization Configuration (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + \ /* 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 */ \ @@ -739,7 +743,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 22 +#define GENERATED_CLUSTER_COUNT 23 #define GENERATED_CLUSTERS \ { \ { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ @@ -750,75 +754,78 @@ 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 \ + 0x002B, ZAP_ATTRIBUTE_INDEX(17), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { \ + 0x0030, ZAP_ATTRIBUTE_INDEX(19), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(23), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(25), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(33), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(35), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(33), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(35), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(42), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(44), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(48), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(50), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(113), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(115), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(117), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(119), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(123), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(125), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(125), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(127), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(127), \ + ZAP_ATTRIBUTE_INDEX(129), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x0008, \ - ZAP_ATTRIBUTE_INDEX(129), \ + ZAP_ATTRIBUTE_INDEX(131), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(131), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(133), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ 0x0200, \ - ZAP_ATTRIBUTE_INDEX(136), \ + ZAP_ATTRIBUTE_INDEX(138), \ 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) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(162), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(164), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (client) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(163), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(165), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(167), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0403, ZAP_ATTRIBUTE_INDEX(169), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (client) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(168), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0403, ZAP_ATTRIBUTE_INDEX(170), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(172), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0404, ZAP_ATTRIBUTE_INDEX(174), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (client) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(173), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0404, ZAP_ATTRIBUTE_INDEX(175), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ } @@ -827,7 +834,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 12, 880 }, { ZAP_CLUSTER_INDEX(12), 10, 90 }, \ + { ZAP_CLUSTER_INDEX(0), 13, 916 }, { ZAP_CLUSTER_INDEX(13), 10, 90 }, \ } // Largest attribute size is needed for various buffers @@ -837,7 +844,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (246) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (970) +#define ATTRIBUTE_MAX_SIZE (1006) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/pump-app/zap-generated/gen_config.h b/zzz_generated/pump-app/zap-generated/gen_config.h index e88eb960407f5d..f7026fcb38420f 100644 --- a/zzz_generated/pump-app/zap-generated/gen_config.h +++ b/zzz_generated/pump-app/zap-generated/gen_config.h @@ -39,6 +39,7 @@ #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #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) @@ -106,6 +107,11 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 +// Use this macro to check if the server side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + // Use this macro to check if the server side of the Network Commissioning cluster is included #define ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING_SERVER diff --git a/zzz_generated/pump-controller-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/pump-controller-app/zap-generated/PluginApplicationCallbacks.h index 142169742a9d52..65591bafed56d7 100644 --- a/zzz_generated/pump-controller-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/pump-controller-app/zap-generated/PluginApplicationCallbacks.h @@ -32,6 +32,7 @@ MatterGeneralCommissioningPluginServerInitCallback(); \ MatterGeneralDiagnosticsPluginServerInitCallback(); \ MatterLevelControlPluginClientInitCallback(); \ + MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ MatterOnOffPluginClientInitCallback(); \ MatterOperationalCredentialsPluginServerInitCallback(); \ diff --git a/zzz_generated/pump-controller-app/zap-generated/callback-stub.cpp b/zzz_generated/pump-controller-app/zap-generated/callback-stub.cpp index bf672f6f48cf56..b3ada25d6ddec5 100644 --- a/zzz_generated/pump-controller-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/pump-controller-app/zap-generated/callback-stub.cpp @@ -59,6 +59,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_LEVEL_CONTROL_CLUSTER_ID: emberAfLevelControlClusterInitCallback(endpoint); break; + case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: emberAfNetworkCommissioningClusterInitCallback(endpoint); break; @@ -145,6 +148,11 @@ void __attribute__((weak)) emberAfLevelControlClusterInitCallback(EndpointId end // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfNetworkCommissioningClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h index 1c2c759c8e7f4c..35a93f18cdfa24 100644 --- a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h @@ -553,7 +553,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 164 +#define GENERATED_ATTRIBUTE_COUNT 166 #define GENERATED_ATTRIBUTES \ { \ \ @@ -583,6 +583,10 @@ { 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: Localization Configuration (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + \ /* 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 */ \ @@ -780,7 +784,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 21 +#define GENERATED_CLUSTER_COUNT 22 #define GENERATED_CLUSTERS \ { \ { \ @@ -796,58 +800,61 @@ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(18), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(18), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { \ + 0x0030, ZAP_ATTRIBUTE_INDEX(20), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(24), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(26), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(34), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(36), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(34), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(36), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(43), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(45), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(49), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(51), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(114), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(116), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(129), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(131), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(140), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(142), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(144), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(146), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(150), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(152), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(152), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(154), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x0006, ZAP_ATTRIBUTE_INDEX(154), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0006, ZAP_ATTRIBUTE_INDEX(156), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: On/Off (client) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(155), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(157), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x0200, ZAP_ATTRIBUTE_INDEX(160), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0200, ZAP_ATTRIBUTE_INDEX(162), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (client) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(161), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(163), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (client) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(162), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0403, ZAP_ATTRIBUTE_INDEX(164), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (client) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(163), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0404, ZAP_ATTRIBUTE_INDEX(165), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (client) */ \ } @@ -856,7 +863,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 15, 997 }, { ZAP_CLUSTER_INDEX(15), 6, 10 }, \ + { ZAP_CLUSTER_INDEX(0), 16, 1033 }, { ZAP_CLUSTER_INDEX(16), 6, 10 }, \ } // Largest attribute size is needed for various buffers @@ -866,7 +873,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (246) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1007) +#define ATTRIBUTE_MAX_SIZE (1043) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/pump-controller-app/zap-generated/gen_config.h b/zzz_generated/pump-controller-app/zap-generated/gen_config.h index 718e956174bf18..fbdad125670956 100644 --- a/zzz_generated/pump-controller-app/zap-generated/gen_config.h +++ b/zzz_generated/pump-controller-app/zap-generated/gen_config.h @@ -39,6 +39,7 @@ #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_LEVEL_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (1) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_ON_OFF_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_OPERATIONAL_CREDENTIALS_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -100,6 +101,11 @@ #define ZCL_USING_LEVEL_CONTROL_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_LEVEL_CONTROL_CLIENT +// Use this macro to check if the server side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + // Use this macro to check if the server side of the Network Commissioning cluster is included #define ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING_SERVER diff --git a/zzz_generated/temperature-measurement-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/temperature-measurement-app/zap-generated/PluginApplicationCallbacks.h index b6ef4d19178f9a..e23d944246c149 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/temperature-measurement-app/zap-generated/PluginApplicationCallbacks.h @@ -30,6 +30,7 @@ MatterFixedLabelPluginServerInitCallback(); \ MatterGeneralCommissioningPluginServerInitCallback(); \ MatterGeneralDiagnosticsPluginServerInitCallback(); \ + MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ MatterOperationalCredentialsPluginServerInitCallback(); \ MatterSoftwareDiagnosticsPluginServerInitCallback(); \ diff --git a/zzz_generated/temperature-measurement-app/zap-generated/callback-stub.cpp b/zzz_generated/temperature-measurement-app/zap-generated/callback-stub.cpp index b5982dfa75391b..ecf1610feb98f7 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/temperature-measurement-app/zap-generated/callback-stub.cpp @@ -53,6 +53,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID: emberAfGeneralDiagnosticsClusterInitCallback(endpoint); break; + case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: emberAfNetworkCommissioningClusterInitCallback(endpoint); break; @@ -117,6 +120,11 @@ void __attribute__((weak)) emberAfGeneralDiagnosticsClusterInitCallback(Endpoint // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfNetworkCommissioningClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h index 8e1bd856a844ab..4197c1af68af6a 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h +++ b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h @@ -279,7 +279,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 94 +#define GENERATED_ATTRIBUTE_COUNT 96 #define GENERATED_ATTRIBUTES \ { \ \ @@ -306,6 +306,10 @@ { 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: Localization Configuration (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + \ /* 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 */ \ @@ -422,7 +426,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 15 +#define GENERATED_CLUSTER_COUNT 16 #define GENERATED_CLUSTERS \ { \ { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ @@ -433,43 +437,46 @@ 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 \ + 0x002B, ZAP_ATTRIBUTE_INDEX(17), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { \ + 0x0030, ZAP_ATTRIBUTE_INDEX(19), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(23), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(25), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(33), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(35), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(33), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(35), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(42), 3, 14, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(44), 3, 14, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(45), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(47), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(60), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(62), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(71), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(73), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(75), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(77), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(81), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(83), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(83), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(85), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(85), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(87), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(90), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(92), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ } @@ -478,7 +485,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 13, 732 }, { ZAP_CLUSTER_INDEX(13), 2, 8 }, \ + { ZAP_CLUSTER_INDEX(0), 14, 768 }, { ZAP_CLUSTER_INDEX(14), 2, 8 }, \ } // Largest attribute size is needed for various buffers @@ -488,7 +495,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (246) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (740) +#define ATTRIBUTE_MAX_SIZE (776) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/temperature-measurement-app/zap-generated/gen_config.h b/zzz_generated/temperature-measurement-app/zap-generated/gen_config.h index 60f8d01ee7fa07..4220daf57ace22 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/gen_config.h +++ b/zzz_generated/temperature-measurement-app/zap-generated/gen_config.h @@ -37,6 +37,7 @@ #define EMBER_AF_FIXED_LABEL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OPERATIONAL_CREDENTIALS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_SOFTWARE_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -86,6 +87,11 @@ #define EMBER_AF_PLUGIN_GENERAL_DIAGNOSTICS_SERVER #define EMBER_AF_PLUGIN_GENERAL_DIAGNOSTICS +// Use this macro to check if the server side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + // Use this macro to check if the server side of the Network Commissioning cluster is included #define ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING_SERVER diff --git a/zzz_generated/thermostat/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/thermostat/zap-generated/PluginApplicationCallbacks.h index ddf961a4f73ae7..0503178449e649 100644 --- a/zzz_generated/thermostat/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/thermostat/zap-generated/PluginApplicationCallbacks.h @@ -35,6 +35,7 @@ MatterGroupsPluginServerInitCallback(); \ MatterIdentifyPluginClientInitCallback(); \ MatterIdentifyPluginServerInitCallback(); \ + MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ MatterOtaSoftwareUpdateProviderPluginServerInitCallback(); \ MatterOperationalCredentialsPluginServerInitCallback(); \ diff --git a/zzz_generated/thermostat/zap-generated/callback-stub.cpp b/zzz_generated/thermostat/zap-generated/callback-stub.cpp index 19e86e1145d4dd..5b349786749461 100644 --- a/zzz_generated/thermostat/zap-generated/callback-stub.cpp +++ b/zzz_generated/thermostat/zap-generated/callback-stub.cpp @@ -65,6 +65,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_IDENTIFY_CLUSTER_ID: emberAfIdentifyClusterInitCallback(endpoint); break; + case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: emberAfNetworkCommissioningClusterInitCallback(endpoint); break; @@ -158,6 +161,11 @@ void __attribute__((weak)) emberAfIdentifyClusterInitCallback(EndpointId endpoin // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfNetworkCommissioningClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/thermostat/zap-generated/endpoint_config.h b/zzz_generated/thermostat/zap-generated/endpoint_config.h index 9465e8e9300b8d..f1d91899ef636d 100644 --- a/zzz_generated/thermostat/zap-generated/endpoint_config.h +++ b/zzz_generated/thermostat/zap-generated/endpoint_config.h @@ -664,7 +664,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 211 +#define GENERATED_ATTRIBUTE_COUNT 213 #define GENERATED_ATTRIBUTES \ { \ \ @@ -713,6 +713,10 @@ /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(21) }, /* Breadcrumb */ \ { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(29) }, /* BasicCommissioningInfoList */ \ @@ -973,7 +977,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 24 +#define GENERATED_CLUSTER_COUNT 25 #define GENERATED_CLUSTERS \ { \ { 0x0003, \ @@ -996,73 +1000,76 @@ 0x0029, ZAP_ATTRIBUTE_INDEX(28), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(29), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(29), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { \ + 0x0030, ZAP_ATTRIBUTE_INDEX(31), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(35), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(37), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(45), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(47), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(45), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(47), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(54), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(56), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(60), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(62), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(125), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(127), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(140), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(142), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(151), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(153), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(155), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(157), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x003F, ZAP_ATTRIBUTE_INDEX(161), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003F, ZAP_ATTRIBUTE_INDEX(163), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Group Key Management (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(164), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(166), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(166), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(168), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x0003, ZAP_ATTRIBUTE_INDEX(168), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0003, ZAP_ATTRIBUTE_INDEX(170), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Identify (client) */ \ { 0x0003, \ - ZAP_ATTRIBUTE_INDEX(169), \ + ZAP_ATTRIBUTE_INDEX(171), \ 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(172), \ + ZAP_ATTRIBUTE_INDEX(174), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 1, Cluster: Groups (server) */ \ { 0x0005, \ - ZAP_ATTRIBUTE_INDEX(174), \ + ZAP_ATTRIBUTE_INDEX(176), \ 6, \ 8, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayScenesServer }, /* Endpoint: 1, Cluster: Scenes (server) */ \ { 0x0028, \ - ZAP_ATTRIBUTE_INDEX(180), \ + ZAP_ATTRIBUTE_INDEX(182), \ 12, \ 246, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 1, Cluster: Basic (server) */ \ { 0x0201, \ - ZAP_ATTRIBUTE_INDEX(192), \ + ZAP_ATTRIBUTE_INDEX(194), \ 19, \ 34, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -1074,7 +1081,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 18, 1954 }, { ZAP_CLUSTER_INDEX(18), 6, 298 }, \ + { ZAP_CLUSTER_INDEX(0), 19, 1990 }, { ZAP_CLUSTER_INDEX(19), 6, 298 }, \ } // Largest attribute size is needed for various buffers @@ -1084,7 +1091,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (933) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (2252) +#define ATTRIBUTE_MAX_SIZE (2288) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/thermostat/zap-generated/gen_config.h b/zzz_generated/thermostat/zap-generated/gen_config.h index 2b56c70d885655..8a8c6ea2df6ca0 100644 --- a/zzz_generated/thermostat/zap-generated/gen_config.h +++ b/zzz_generated/thermostat/zap-generated/gen_config.h @@ -42,6 +42,7 @@ #define EMBER_AF_GROUPS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_IDENTIFY_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_IDENTIFY_CLUSTER_SERVER_ENDPOINT_COUNT (2) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OTA_PROVIDER_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OPERATIONAL_CREDENTIALS_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -118,6 +119,11 @@ #define EMBER_AF_PLUGIN_IDENTIFY_SERVER #define EMBER_AF_PLUGIN_IDENTIFY +// Use this macro to check if the server side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + // Use this macro to check if the server side of the Network Commissioning cluster is included #define ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING_SERVER diff --git a/zzz_generated/tv-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/tv-app/zap-generated/PluginApplicationCallbacks.h index 37896ec66a3021..25f724f468dcb6 100644 --- a/zzz_generated/tv-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/tv-app/zap-generated/PluginApplicationCallbacks.h @@ -42,6 +42,7 @@ MatterGroupKeyManagementPluginServerInitCallback(); \ MatterKeypadInputPluginServerInitCallback(); \ MatterLevelControlPluginServerInitCallback(); \ + MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterLowPowerPluginServerInitCallback(); \ MatterMediaInputPluginServerInitCallback(); \ MatterMediaPlaybackPluginServerInitCallback(); \ diff --git a/zzz_generated/tv-app/zap-generated/callback-stub.cpp b/zzz_generated/tv-app/zap-generated/callback-stub.cpp index 92d6949c3e3f27..84e72526be3645 100644 --- a/zzz_generated/tv-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/tv-app/zap-generated/callback-stub.cpp @@ -83,6 +83,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_LEVEL_CONTROL_CLUSTER_ID: emberAfLevelControlClusterInitCallback(endpoint); break; + case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; case ZCL_LOW_POWER_CLUSTER_ID: emberAfLowPowerClusterInitCallback(endpoint); break; @@ -221,6 +224,11 @@ void __attribute__((weak)) emberAfLevelControlClusterInitCallback(EndpointId end // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfLowPowerClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/tv-app/zap-generated/endpoint_config.h b/zzz_generated/tv-app/zap-generated/endpoint_config.h index d693a74ca0d717..5c6861c64f3ea3 100644 --- a/zzz_generated/tv-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-app/zap-generated/endpoint_config.h @@ -1000,7 +1000,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 282 +#define GENERATED_ATTRIBUTE_COUNT 284 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1045,6 +1045,10 @@ /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + \ /* Endpoint: 0, Cluster: General Commissioning (client) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ @@ -1419,7 +1423,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 46 +#define GENERATED_CLUSTER_COUNT 47 #define GENERATED_CLUSTERS \ { \ { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ @@ -1435,136 +1439,139 @@ 0x0029, ZAP_ATTRIBUTE_INDEX(26), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(27), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(27), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { \ + 0x0030, ZAP_ATTRIBUTE_INDEX(29), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (client) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(28), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0030, ZAP_ATTRIBUTE_INDEX(30), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(34), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(36), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (client) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(36), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(38), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(46), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(48), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(46), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(48), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(55), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(57), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(61), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(63), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(126), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(128), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(141), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(143), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(152), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(154), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(156), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(158), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (client) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(157), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(159), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x003F, ZAP_ATTRIBUTE_INDEX(163), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003F, ZAP_ATTRIBUTE_INDEX(165), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Group Key Management (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(166), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(168), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(168), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(170), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(170), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0405, ZAP_ATTRIBUTE_INDEX(172), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Relative Humidity Measurement (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(174), \ + ZAP_ATTRIBUTE_INDEX(176), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(176), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(178), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x0503, ZAP_ATTRIBUTE_INDEX(181), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0503, ZAP_ATTRIBUTE_INDEX(183), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(183), 4, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(185), 4, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Channel (server) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(187), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(189), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(190), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(192), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Input (server) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(193), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0508, ZAP_ATTRIBUTE_INDEX(195), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Low Power (server) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(194), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(196), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(195), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(197), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(198), 3, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(200), 3, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(201), \ + ZAP_ATTRIBUTE_INDEX(203), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { 0x0008, \ - ZAP_ATTRIBUTE_INDEX(203), \ + ZAP_ATTRIBUTE_INDEX(205), \ 15, \ 23, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 2, Cluster: Level Control (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(218), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(220), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(223), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(225), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Audio Output (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(226), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(228), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Descriptor (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(231), 8, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(233), 8, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Media Playback (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(239), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(241), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Content Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(242), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(244), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(251), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(253), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Account Login (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(252), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(254), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Descriptor (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(257), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(259), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Content Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(260), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(262), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Application Basic (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(269), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(271), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 5, Cluster: Descriptor (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(274), 8, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(276), 8, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 5, Cluster: Application Basic (server) */ \ } @@ -1573,8 +1580,8 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 22, 1969 }, { ZAP_CLUSTER_INDEX(22), 10, 1328 }, { ZAP_CLUSTER_INDEX(32), 4, 283 }, \ - { ZAP_CLUSTER_INDEX(36), 5, 439 }, { ZAP_CLUSTER_INDEX(41), 3, 398 }, { ZAP_CLUSTER_INDEX(44), 2, 106 }, \ + { ZAP_CLUSTER_INDEX(0), 23, 2005 }, { ZAP_CLUSTER_INDEX(23), 10, 1328 }, { ZAP_CLUSTER_INDEX(33), 4, 283 }, \ + { ZAP_CLUSTER_INDEX(37), 5, 439 }, { ZAP_CLUSTER_INDEX(42), 3, 398 }, { ZAP_CLUSTER_INDEX(45), 2, 106 }, \ } // Largest attribute size is needed for various buffers @@ -1584,7 +1591,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (686) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (4523) +#define ATTRIBUTE_MAX_SIZE (4559) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (6) diff --git a/zzz_generated/tv-app/zap-generated/gen_config.h b/zzz_generated/tv-app/zap-generated/gen_config.h index 505dbc52c7334e..6bfc53dfb17504 100644 --- a/zzz_generated/tv-app/zap-generated/gen_config.h +++ b/zzz_generated/tv-app/zap-generated/gen_config.h @@ -49,6 +49,7 @@ #define EMBER_AF_GROUP_KEY_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_KEYPAD_INPUT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_LOW_POWER_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_MEDIA_INPUT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_MEDIA_PLAYBACK_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -170,6 +171,11 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 +// Use this macro to check if the server side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + // Use this macro to check if the server side of the Low Power cluster is included #define ZCL_USING_LOW_POWER_CLUSTER_SERVER #define EMBER_AF_PLUGIN_LOW_POWER_SERVER diff --git a/zzz_generated/tv-casting-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/tv-casting-app/zap-generated/PluginApplicationCallbacks.h index 88263561b15ab6..750c9b932af6dc 100644 --- a/zzz_generated/tv-casting-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/tv-casting-app/zap-generated/PluginApplicationCallbacks.h @@ -49,6 +49,7 @@ MatterIdentifyPluginServerInitCallback(); \ MatterKeypadInputPluginClientInitCallback(); \ MatterLevelControlPluginServerInitCallback(); \ + MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterMediaInputPluginClientInitCallback(); \ MatterMediaPlaybackPluginClientInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ diff --git a/zzz_generated/tv-casting-app/zap-generated/callback-stub.cpp b/zzz_generated/tv-casting-app/zap-generated/callback-stub.cpp index 8b5794eb07ee0b..5e6947d605ad84 100644 --- a/zzz_generated/tv-casting-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/tv-casting-app/zap-generated/callback-stub.cpp @@ -110,6 +110,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_LEVEL_CONTROL_CLUSTER_ID: emberAfLevelControlClusterInitCallback(endpoint); break; + case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; case ZCL_MEDIA_INPUT_CLUSTER_ID: emberAfMediaInputClusterInitCallback(endpoint); break; @@ -314,6 +317,11 @@ void __attribute__((weak)) emberAfLevelControlClusterInitCallback(EndpointId end // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfMediaInputClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h index d5bb8fc7b5d760..f31900054264a7 100644 --- a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h @@ -864,7 +864,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 402 +#define GENERATED_ATTRIBUTE_COUNT 404 #define GENERATED_ATTRIBUTES \ { \ \ @@ -908,6 +908,10 @@ /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(21) }, /* Breadcrumb */ \ { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(29) }, /* BasicCommissioningInfoList */ \ @@ -1469,7 +1473,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 54 +#define GENERATED_CLUSTER_COUNT 55 #define GENERATED_CLUSTERS \ { \ { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ @@ -1484,186 +1488,189 @@ 0x0029, ZAP_ATTRIBUTE_INDEX(26), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(27), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(27), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { \ + 0x0030, ZAP_ATTRIBUTE_INDEX(29), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(33), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(35), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(43), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(45), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(43), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(45), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(52), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(54), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(58), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(60), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(123), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(125), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(138), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(140), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(149), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(151), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(153), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(155), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x003F, ZAP_ATTRIBUTE_INDEX(159), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003F, ZAP_ATTRIBUTE_INDEX(161), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Group Key Management (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(162), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(164), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(164), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(166), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(166), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0405, ZAP_ATTRIBUTE_INDEX(168), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Relative Humidity Measurement (server) */ \ { 0x0003, \ - ZAP_ATTRIBUTE_INDEX(170), \ + ZAP_ATTRIBUTE_INDEX(172), \ 2, \ 4, \ 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(172), \ + ZAP_ATTRIBUTE_INDEX(174), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 1, Cluster: Groups (server) */ \ { 0x0005, \ - ZAP_ATTRIBUTE_INDEX(174), \ + ZAP_ATTRIBUTE_INDEX(176), \ 6, \ 8, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayScenesServer }, /* Endpoint: 1, Cluster: Scenes (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(180), \ + ZAP_ATTRIBUTE_INDEX(182), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x0008, \ - ZAP_ATTRIBUTE_INDEX(187), \ + ZAP_ATTRIBUTE_INDEX(189), \ 15, \ 23, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x000F, ZAP_ATTRIBUTE_INDEX(202), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x000F, ZAP_ATTRIBUTE_INDEX(204), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(206), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(208), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x001E, ZAP_ATTRIBUTE_INDEX(211), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001E, ZAP_ATTRIBUTE_INDEX(213), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binding (server) */ \ { \ - 0x0039, ZAP_ATTRIBUTE_INDEX(212), 15, 646, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0039, ZAP_ATTRIBUTE_INDEX(214), 15, 646, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ { \ - 0x003B, ZAP_ATTRIBUTE_INDEX(227), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003B, ZAP_ATTRIBUTE_INDEX(229), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(230), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(232), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ { 0x0101, \ - ZAP_ATTRIBUTE_INDEX(232), \ + ZAP_ATTRIBUTE_INDEX(234), \ 19, \ 29, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayDoorLockServer }, /* Endpoint: 1, Cluster: Door Lock (server) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(251), 19, 31, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0102, ZAP_ATTRIBUTE_INDEX(253), 19, 31, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (server) */ \ { \ - 0x0103, ZAP_ATTRIBUTE_INDEX(270), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0103, ZAP_ATTRIBUTE_INDEX(272), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Barrier Control (server) */ \ { 0x0201, \ - ZAP_ATTRIBUTE_INDEX(275), \ + ZAP_ATTRIBUTE_INDEX(277), \ 10, \ 17, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayThermostatServer }, /* Endpoint: 1, Cluster: Thermostat (server) */ \ { 0x0300, \ - ZAP_ATTRIBUTE_INDEX(285), \ + ZAP_ATTRIBUTE_INDEX(287), \ 51, \ 337, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(336), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(338), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(340), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0403, ZAP_ATTRIBUTE_INDEX(342), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(344), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0404, ZAP_ATTRIBUTE_INDEX(346), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(348), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0405, ZAP_ATTRIBUTE_INDEX(350), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ { 0x0500, \ - ZAP_ATTRIBUTE_INDEX(352), \ + ZAP_ATTRIBUTE_INDEX(354), \ 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(358), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0503, ZAP_ATTRIBUTE_INDEX(360), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(360), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(362), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Channel (client) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(361), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(363), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (client) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(362), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(364), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (client) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(363), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(365), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Media Input (client) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(364), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(366), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (client) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(365), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(367), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (client) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(366), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(368), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (client) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(367), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(369), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (client) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(368), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(370), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (client) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(369), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(371), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Account Login (client) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(370), 21, 1582, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050F, ZAP_ATTRIBUTE_INDEX(372), 21, 1582, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(391), \ + ZAP_ATTRIBUTE_INDEX(393), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(393), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(395), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(398), \ + ZAP_ATTRIBUTE_INDEX(400), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -1675,7 +1682,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 18, 1958 }, { ZAP_CLUSTER_INDEX(18), 33, 3070 }, { ZAP_CLUSTER_INDEX(51), 3, 8 }, \ + { ZAP_CLUSTER_INDEX(0), 19, 1994 }, { ZAP_CLUSTER_INDEX(19), 33, 3070 }, { ZAP_CLUSTER_INDEX(52), 3, 8 }, \ } // Largest attribute size is needed for various buffers @@ -1685,7 +1692,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (1333) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (5036) +#define ATTRIBUTE_MAX_SIZE (5072) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) diff --git a/zzz_generated/tv-casting-app/zap-generated/gen_config.h b/zzz_generated/tv-casting-app/zap-generated/gen_config.h index 357d784b21e5ea..6d1336ae44732a 100644 --- a/zzz_generated/tv-casting-app/zap-generated/gen_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/gen_config.h @@ -56,6 +56,7 @@ #define EMBER_AF_IDENTIFY_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_KEYPAD_INPUT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_MEDIA_INPUT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_MEDIA_PLAYBACK_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -218,6 +219,11 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 +// Use this macro to check if the server side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + // Use this macro to check if the client side of the Media Input cluster is included #define ZCL_USING_MEDIA_INPUT_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_MEDIA_INPUT_CLIENT diff --git a/zzz_generated/window-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/window-app/zap-generated/PluginApplicationCallbacks.h index 711efcc060e74d..8eba42de88aea1 100644 --- a/zzz_generated/window-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/window-app/zap-generated/PluginApplicationCallbacks.h @@ -30,6 +30,7 @@ MatterGeneralCommissioningPluginServerInitCallback(); \ MatterGeneralDiagnosticsPluginServerInitCallback(); \ MatterIdentifyPluginServerInitCallback(); \ + MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ MatterOperationalCredentialsPluginServerInitCallback(); \ MatterPowerSourcePluginServerInitCallback(); \ diff --git a/zzz_generated/window-app/zap-generated/callback-stub.cpp b/zzz_generated/window-app/zap-generated/callback-stub.cpp index 797dda2ce0ff60..b92b84140138dc 100644 --- a/zzz_generated/window-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/window-app/zap-generated/callback-stub.cpp @@ -53,6 +53,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_IDENTIFY_CLUSTER_ID: emberAfIdentifyClusterInitCallback(endpoint); break; + case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: emberAfNetworkCommissioningClusterInitCallback(endpoint); break; @@ -123,6 +126,11 @@ void __attribute__((weak)) emberAfIdentifyClusterInitCallback(EndpointId endpoin // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfNetworkCommissioningClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/window-app/zap-generated/endpoint_config.h b/zzz_generated/window-app/zap-generated/endpoint_config.h index f9360fd687863b..e4923a8de5e910 100644 --- a/zzz_generated/window-app/zap-generated/endpoint_config.h +++ b/zzz_generated/window-app/zap-generated/endpoint_config.h @@ -609,7 +609,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 224 +#define GENERATED_ATTRIBUTE_COUNT 226 #define GENERATED_ATTRIBUTES \ { \ \ @@ -644,6 +644,10 @@ { 0x0011, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* Reachable */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + \ /* Endpoint: 0, Cluster: Power Source (server) */ \ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Status */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Order */ \ @@ -914,7 +918,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 19 +#define GENERATED_CLUSTER_COUNT 20 #define GENERATED_CLUSTERS \ { \ { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ @@ -925,58 +929,61 @@ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(24), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(24), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { \ + 0x002F, ZAP_ATTRIBUTE_INDEX(26), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Power Source (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(35), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0030, ZAP_ATTRIBUTE_INDEX(37), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(41), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(43), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(51), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(53), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(60), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(62), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(66), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(68), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(131), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(133), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(146), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(148), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(157), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(159), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(161), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(163), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(167), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(169), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(169), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(171), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { 0x0003, \ - ZAP_ATTRIBUTE_INDEX(171), \ + ZAP_ATTRIBUTE_INDEX(173), \ 3, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayIdentifyServer }, /* Endpoint: 1, Cluster: Identify (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(174), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(176), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(179), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0102, ZAP_ATTRIBUTE_INDEX(181), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(199), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(201), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(204), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0102, ZAP_ATTRIBUTE_INDEX(206), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Window Covering (server) */ \ } @@ -985,7 +992,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 14, 1491 }, { ZAP_CLUSTER_INDEX(14), 3, 40 }, { ZAP_CLUSTER_INDEX(17), 2, 35 }, \ + { ZAP_CLUSTER_INDEX(0), 15, 1527 }, { ZAP_CLUSTER_INDEX(15), 3, 40 }, { ZAP_CLUSTER_INDEX(18), 2, 35 }, \ } // Largest attribute size is needed for various buffers @@ -995,7 +1002,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (654) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1566) +#define ATTRIBUTE_MAX_SIZE (1602) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) diff --git a/zzz_generated/window-app/zap-generated/gen_config.h b/zzz_generated/window-app/zap-generated/gen_config.h index 35647a0101b356..845f489e283cc4 100644 --- a/zzz_generated/window-app/zap-generated/gen_config.h +++ b/zzz_generated/window-app/zap-generated/gen_config.h @@ -37,6 +37,7 @@ #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_IDENTIFY_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_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) @@ -88,6 +89,11 @@ #define EMBER_AF_PLUGIN_IDENTIFY_SERVER #define EMBER_AF_PLUGIN_IDENTIFY +// Use this macro to check if the server side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + // Use this macro to check if the server side of the Network Commissioning cluster is included #define ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING_SERVER