diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 2a1ead454e3ac4..0b195ba9a244e5 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -632,6 +632,7 @@ hci hciattach hciconfig hdlc +HEPA HKDF HMAC hoc @@ -641,7 +642,6 @@ HomePods hostapd hostname href -HEPA HTTPS HW hwadr @@ -652,6 +652,7 @@ IasWd iaszone ibb ICA +ICD iCloud ICMP IDF diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml index 35d62da349d4f0..76bbb9cf6da05c 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -54,7 +54,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:1 + image: ghcr.io/project-chip/chip-build-esp32:2 options: --user root steps: @@ -64,8 +64,6 @@ jobs: uses: ./.github/actions/checkout-submodules-and-bootstrap with: platform: esp32 - - name: Fixup GdbGui requirement - run: perl -i -pe 's/^gdbgui==/# gdbgui==/' /opt/espressif/esp-idf/requirements.txt - name: CI Examples ESP32 shell: bash run: | diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 99c74c80eb7f27..3757d952b29fda 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:1 + image: ghcr.io/project-chip/chip-build-esp32:2 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -46,9 +46,6 @@ jobs: with: platform: esp32 - - name: Fixup GdbGui requirement - run: perl -i -pe 's/^gdbgui==/# gdbgui==/' /opt/espressif/esp-idf/requirements.txt - - name: Set up environment for size reports uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} @@ -130,7 +127,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:1 + image: ghcr.io/project-chip/chip-build-esp32:2 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -142,9 +139,6 @@ jobs: with: platform: esp32 - - name: Fixup GdbGui requirement - run: perl -i -pe 's/^gdbgui==/# gdbgui==/' /opt/espressif/esp-idf/requirements.txt - - name: Build example Bridge App run: scripts/examples/esp_example.sh bridge-app diff --git a/.github/workflows/examples-openiotsdk.yaml b/.github/workflows/examples-openiotsdk.yaml index 86ff03e6754071..7c2b76b1b8841d 100644 --- a/.github/workflows/examples-openiotsdk.yaml +++ b/.github/workflows/examples-openiotsdk.yaml @@ -72,6 +72,15 @@ jobs: examples/shell/openiotsdk/build/chip-openiotsdk-shell-example.elf \ /tmp/bloat_reports/ + - name: "Test: shell example" + if: steps.build_shell.outcome == 'success' + run: | + scripts/run_in_python_env.sh out/venv \ + 'scripts/examples/openiotsdk_example.sh --no-activate -C test shell' + + - name: Clean shell output + run: rm -rf examples/shell/openiotsdk/build + - name: Build lock-app example (mbedtls) # Disabled being tracked here: https://github.com/project-chip/connectedhomeip/issues/28026 if: false @@ -93,6 +102,18 @@ jobs: examples/tv-app/openiotsdk/build/chip-openiotsdk-tv-app-example.elf \ /tmp/bloat_reports/ + - name: "Test: tv-app example" + if: steps.build_tv_app.outcome == 'success' + timeout-minutes: 10 + run: | + scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up + scripts/run_in_python_env.sh out/venv \ + 'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap tv-app' + scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down + + - name: Clean tv-app output + run: rm -rf examples/tv-app/openiotsdk/build + - name: Build all-clusters-app example id: build_all_clusters_app timeout-minutes: 10 @@ -103,6 +124,18 @@ jobs: examples/all-clusters-app/openiotsdk/build/chip-openiotsdk-all-clusters-app-example.elf \ /tmp/bloat_reports/ + - name: "Test: all-clusters-app example" + if: steps.build_all_clusters_app.outcome == 'success' + timeout-minutes: 5 + run: | + scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up + scripts/run_in_python_env.sh out/venv \ + 'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap all-clusters-app' + scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down + + - name: Clean all-clusters-app output + run: rm -rf examples/all-clusters-app/openiotsdk/build + - name: Build ota-requestor-app example id: build_ota_requestor_app timeout-minutes: 10 @@ -127,12 +160,6 @@ jobs: run: | scripts/examples/gn_build_example.sh examples/ota-provider-app/linux/ out/ota-provider chip_config_network_layer_ble=false - - name: "Test: shell example" - if: steps.build_shell.outcome == 'success' - run: | - scripts/run_in_python_env.sh out/venv \ - 'scripts/examples/openiotsdk_example.sh --no-activate -C test shell' - - name: "Test: lock-app example (mbedtls)" if: steps.build_lock_app_mbedtls.outcome == 'success' run: | @@ -141,24 +168,6 @@ jobs: 'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap lock-app' scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down - - name: "Test: tv-app example" - if: steps.build_tv_app.outcome == 'success' - timeout-minutes: 10 - run: | - scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up - scripts/run_in_python_env.sh out/venv \ - 'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap tv-app' - scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down - - - name: "Test: all-clusters-app example" - if: steps.build_all_clusters_app.outcome == 'success' - timeout-minutes: 5 - run: | - scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up - scripts/run_in_python_env.sh out/venv \ - 'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap all-clusters-app' - scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down - - name: "Test: ota-requestor-app example" if: steps.build_ota_requestor_app.outcome == 'success' && steps.build_ota_provider_app.outcome == 'success' timeout-minutes: 30 @@ -189,11 +198,6 @@ jobs: examples/lock-app/openiotsdk/build/chip-openiotsdk-lock-app-example.elf \ /tmp/bloat_reports/ - - name: Build unit tests (psa) - id: build_unit_tests_psa - run: | - scripts/examples/openiotsdk_example.sh -b psa unit-tests - - name: "Test: lock-app example (psa)" if: steps.build_lock_app_psa.outcome == 'success' run: | @@ -202,6 +206,11 @@ jobs: 'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap lock-app' scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down + - name: Build unit tests (psa) + id: build_unit_tests_psa + run: | + scripts/examples/openiotsdk_example.sh -b psa unit-tests + - name: "Test: unit-tests (psa)" if: steps.build_unit_tests_psa.outcome == 'success' run: | diff --git a/.github/workflows/kotlin-style.yaml b/.github/workflows/kotlin-style.yaml index 921e89528d7ee5..8ea7eb2fe8d388 100644 --- a/.github/workflows/kotlin-style.yaml +++ b/.github/workflows/kotlin-style.yaml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@v3 - name: "detekt" - uses: natiginfo/action-detekt-all@1.23.0 + uses: natiginfo/action-detekt-all@1.23.1 # Detekt seems not to like circular symlinks, so we set up # explicit paths below with: diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index 078b4dd960c679..13badfcf8340b6 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32-qemu:1 + image: ghcr.io/project-chip/chip-build-esp32-qemu:2 volumes: - "/tmp/log_output:/tmp/test_logs" @@ -50,9 +50,6 @@ jobs: with: platform: esp32 - - name: Fixup GdbGui requirement - run: perl -i -pe 's/^gdbgui==/# gdbgui==/' /opt/espressif/esp-idf/requirements.txt - - name: Build ESP32 QEMU test images run: | scripts/run_in_build_env.sh " \ diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index a6c14d8401a5c2..5cbcc9b53308b9 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-esp32:1 + image: ghcr.io/project-chip/chip-build-esp32:2 steps: - name: Checkout diff --git a/build/chip/java/config.gni b/build/chip/java/config.gni index ca18c9231fef1d..fbc1d95755863f 100644 --- a/build/chip/java/config.gni +++ b/build/chip/java/config.gni @@ -15,6 +15,9 @@ java_path = getenv("JAVA_PATH") declare_args() { java_matter_controller_dependent_paths = [] + + # The class of each cluster created by ZAP is added to the library. (e.g., ChipClusters) + matter_enable_java_generated_api = true matter_enable_java_compilation = false if (java_path != "" && current_os == "linux") { java_matter_controller_dependent_paths += [ "${java_path}/include/" ] @@ -27,6 +30,7 @@ declare_args() { [ "${java_path}/include/linux/" ] } + matter_enable_java_generated_api = false matter_enable_java_compilation = true } } diff --git a/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index d35791cf1ed3c0..6aa824bdcba6f3 100644 --- a/config/esp32/components/chip/CMakeLists.txt +++ b/config/esp32/components/chip/CMakeLists.txt @@ -124,6 +124,10 @@ if(CONFIG_DISABLE_IPV4) chip_gn_arg_append("chip_inet_config_enable_ipv4" "false") endif() +if(CONFIG_DISABLE_READ_CLIENT) + chip_gn_arg_append("chip_enable_read_client" "false") +endif() + if(CHIP_CODEGEN_PREGEN_DIR) chip_gn_arg_append("chip_code_pre_generated_directory" "\"${CHIP_CODEGEN_PREGEN_DIR}\"") endif() @@ -462,26 +466,11 @@ foreach(phy_blob ${phy_blobs}) list(APPEND chip_libraries "${esp_phy_dir}/lib/${target_name}/lib${phy_blob}.a") endforeach() -idf_component_get_property(esp_event_lib esp_event COMPONENT_LIB) -list(APPEND chip_libraries $) - -idf_component_get_property(hal_lib hal COMPONENT_LIB) -list(APPEND chip_libraries $) - -idf_component_get_property(esp_system_lib esp_system COMPONENT_LIB) -list(APPEND chip_libraries $) - -idf_component_get_property(soc_lib soc COMPONENT_LIB) -list(APPEND chip_libraries $) - -idf_component_get_property(efuse_lib efuse COMPONENT_LIB) -list(APPEND chip_libraries $) - -idf_component_get_property(vfs_lib vfs COMPONENT_LIB) -list(APPEND chip_libraries $) - -idf_component_get_property(driver_lib driver COMPONENT_LIB) -list(APPEND chip_libraries $) +set(components_to_link esp_event hal esp_system soc efuse vfs driver esp_coex freertos) +foreach(component ${components_to_link}) + idf_component_get_property(lib_name ${component} COMPONENT_LIB) + list(APPEND chip_libraries $) +endforeach() target_link_libraries(${COMPONENT_LIB} INTERFACE -Wl,--start-group ${chip_libraries} diff --git a/config/esp32/components/chip/Kconfig b/config/esp32/components/chip/Kconfig index 99de12afa97e6e..5c871c2d043a30 100644 --- a/config/esp32/components/chip/Kconfig +++ b/config/esp32/components/chip/Kconfig @@ -108,6 +108,12 @@ menu "CHIP Core" help Matter spec is based on IPv6 communication only. Enabling this option may save some flash/ram. + config DISABLE_READ_CLIENT + bool "Disable read client in Interaction Model" + default n + help + Some device types don't require the read client. Enabling this option may save some flash/ram. + config BUILD_CHIP_TESTS bool "Build CHIP tests" default n diff --git a/docs/guides/chip_tool_guide.md b/docs/guides/chip_tool_guide.md index 2561a6cdd6c754..49fe4ad48a83da 100644 --- a/docs/guides/chip_tool_guide.md +++ b/docs/guides/chip_tool_guide.md @@ -980,15 +980,15 @@ Complete the following steps: fabric by using the following command pattern: ``` - $ ./chip-tool pairing code --commissioner-name + $ ./chip-tool pairing code --commissioner-name ``` In this command: - - __ is the the QR code payload or a manual pairing code generated - by the first commissioner instance when opened commissioning window - __ is the user-defined ID of the node being commissioned. It doesn't need to be the same ID, as for the first fabric. + - __ is the the QR code payload or a manual pairing code generated + by the first commissioner instance when opened commissioning window - __ is the name of the second fabric. Valid values are "alpha", "beta", "gamma", and integers greater than or equal to 4. The default if not specified is "alpha". @@ -996,7 +996,7 @@ Complete the following steps: **Example of command:** ``` - $ ./chip-tool pairing code 36281602573 1 --commissioner-name beta + $ ./chip-tool pairing code 1 36281602573 --commissioner-name beta ``` #### Step 5: Test reception of commands diff --git a/docs/guides/esp32/setup_idf_chip.md b/docs/guides/esp32/setup_idf_chip.md index ff5ee40c60aed8..ef57e61ca3c3ac 100644 --- a/docs/guides/esp32/setup_idf_chip.md +++ b/docs/guides/esp32/setup_idf_chip.md @@ -13,42 +13,32 @@ step. ### Install Prerequisites -- [Linux](https://docs.espressif.com/projects/esp-idf/en/v4.4.4/esp32/get-started/linux-setup.html) -- [macOS](https://docs.espressif.com/projects/esp-idf/en/v4.4.4/esp32/get-started/macos-setup.html) +- [Linux](https://docs.espressif.com/projects/esp-idf/en/v5.1/esp32/get-started/linux-macos-setup.html#for-linux-users) +- [macOS](https://docs.espressif.com/projects/esp-idf/en/v5.1/esp32/get-started/linux-macos-setup.html#for-macos-users) -### Get IDF v4.4.4 +### Get IDF v5.1 - Clone ESP-IDF - [v4.4.4 release](https://github.com/espressif/esp-idf/releases/tag/v4.4.4) + [v5.1 release](https://github.com/espressif/esp-idf/releases/tag/v5.1) ``` - $ git clone -b v4.4.4 --recursive https://github.com/espressif/esp-idf.git + $ git clone -b v5.1 --recursive --depth 1 --shallow-submodule https://github.com/espressif/esp-idf.git $ cd esp-idf $ ./install.sh ``` -- To update an existing esp-idf toolchain to v4.4.4: +- To update an existing esp-idf toolchain to v5.1: ``` $ cd path/to/esp-idf $ git fetch origin - $ git checkout v4.4.4 - $ git reset --hard origin/v4.4.4 + $ git checkout v5.1 + $ git reset --hard origin/v5.1 $ git submodule update --recursive --init $ git clean -fdx $ ./install.sh ``` -- For ESP32C6 & ESP32H2, please use commit - [ea5e0ff](https://github.com/espressif/esp-idf/tree/ea5e0ff). - - ``` - $ cd esp-idf - $ git checkout ea5e0ff - $ git submodule update --init - $ ./install.sh - ``` - ## Setup Matter environment ### Install Prerequisites @@ -80,22 +70,6 @@ below: python3 -m pip install esptool ``` -For MacOS, `gdbgui` python package will not be installed using `bootstrap.sh` -script as it is restricted only for x64 Linux platforms. It is restricted -because, building wheels for `gevent` (dependency of `gdbgui`) fails on MacOS. - -For ARM-based Mac, no further installation steps are necessary if Python3 -version is greater than or equal to 3.11. - -If Python3 version is less than 3.11 or you are using x86(Intel-based) Mac then -please run the below commands after every bootstrapping to install gdbgui wheels -as binary - -``` -python3 -m pip install -c scripts/setup/constraints.txt --no-cache --prefer-binary gdbgui==0.13.2.0 -deactivate -``` - --- Once IDF and Matter environment is set up, head over to 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 8dd918c4cfcbbd..f7983bd036f737 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -13554,15 +13554,15 @@ ] }, { - "name": "Temperature Control", - "code": 86, + "name": "Laundry Washer Mode", + "code": 81, "mfgCode": null, - "define": "TEMPERATURE_CONTROL_CLUSTER", + "define": "LAUNDRY_WASHER_MODE_CLUSTER", "side": "client", "enabled": 0, "commands": [ { - "name": "SetTemperature", + "name": "ChangeToMode", "code": 0, "mfgCode": null, "source": "client", @@ -13606,21 +13606,31 @@ ] }, { - "name": "Temperature Control", - "code": 86, + "name": "Laundry Washer Mode", + "code": 81, "mfgCode": null, - "define": "TEMPERATURE_CONTROL_CLUSTER", + "define": "LAUNDRY_WASHER_MODE_CLUSTER", "side": "server", "enabled": 1, + "commands": [ + { + "name": "ChangeToModeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], "attributes": [ { - "name": "TemperatureSetpoint", + "name": "SupportedModes", "code": 0, "mfgCode": null, "side": "server", - "type": "temperature", - "included": 0, - "storageOption": "RAM", + "type": "array", + "included": 1, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13630,13 +13640,13 @@ "reportableChange": 0 }, { - "name": "MinTemperature", + "name": "CurrentMode", "code": 1, "mfgCode": null, "side": "server", - "type": "temperature", - "included": 0, - "storageOption": "RAM", + "type": "int8u", + "included": 1, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13646,13 +13656,13 @@ "reportableChange": 0 }, { - "name": "MaxTemperature", + "name": "StartUpMode", "code": 2, "mfgCode": null, "side": "server", - "type": "temperature", - "included": 0, - "storageOption": "RAM", + "type": "int8u", + "included": 1, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13662,13 +13672,13 @@ "reportableChange": 0 }, { - "name": "Step", + "name": "OnMode", "code": 3, "mfgCode": null, "side": "server", - "type": "temperature", - "included": 0, - "storageOption": "RAM", + "type": "int8u", + "included": 1, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13678,24 +13688,24 @@ "reportableChange": 0 }, { - "name": "SelectedTemperatureLevel", - "code": 4, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SupportedTemperatureLevels", - "code": 5, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", "type": "array", @@ -13710,12 +13720,12 @@ "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -13726,8 +13736,8 @@ "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", "type": "array", @@ -13742,48 +13752,68 @@ "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Refrigerator And Temperature Controlled Cabinet Mode", + "code": 82, + "mfgCode": null, + "define": "REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ChangeToMode", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ { "name": "FeatureMap", "code": 65532, "mfgCode": null, - "side": "server", + "side": "client", "type": "bitmap32", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13793,7 +13823,7 @@ "name": "ClusterRevision", "code": 65533, "mfgCode": null, - "side": "server", + "side": "client", "type": "int16u", "included": 1, "storageOption": "RAM", @@ -13808,56 +13838,82 @@ ] }, { - "name": "Refrigerator Alarm", - "code": 87, + "name": "Refrigerator And Temperature Controlled Cabinet Mode", + "code": 82, "mfgCode": null, - "define": "REFRIGERATOR_ALARM_CLUSTER", + "define": "REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER", "side": "server", "enabled": 1, + "commands": [ + { + "name": "ChangeToModeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], "attributes": [ { - "name": "Mask", + "name": "SupportedModes", "code": 0, "mfgCode": null, "side": "server", - "type": "AlarmMap", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "State", + "name": "CurrentMode", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpMode", "code": 2, "mfgCode": null, "side": "server", - "type": "AlarmMap", + "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Supported", + "name": "OnMode", "code": 3, "mfgCode": null, "side": "server", - "type": "AlarmMap", + "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13959,22 +14015,13 @@ "maxInterval": 65534, "reportableChange": 0 } - ], - "events": [ - { - "name": "Notify", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1 - } ] }, { - "name": "Laundry Washer Mode", - "code": 81, + "name": "RVC Run Mode", + "code": 84, "mfgCode": null, - "define": "LAUNDRY_WASHER_MODE_CLUSTER", + "define": "RVC_RUN_MODE_CLUSTER", "side": "client", "enabled": 0, "commands": [ @@ -14023,10 +14070,10 @@ ] }, { - "name": "Laundry Washer Mode", - "code": 81, + "name": "RVC Run Mode", + "code": 84, "mfgCode": null, - "define": "LAUNDRY_WASHER_MODE_CLUSTER", + "define": "RVC_RUN_MODE_CLUSTER", "side": "server", "enabled": 1, "commands": [ @@ -14047,7 +14094,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14063,7 +14110,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14079,7 +14126,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14095,7 +14142,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14111,7 +14158,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14127,7 +14174,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14143,7 +14190,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14159,7 +14206,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14203,10 +14250,10 @@ ] }, { - "name": "Refrigerator And Temperature Controlled Cabinet Mode", - "code": 82, + "name": "RVC Clean Mode", + "code": 85, "mfgCode": null, - "define": "REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER", + "define": "RVC_CLEAN_MODE_CLUSTER", "side": "client", "enabled": 0, "commands": [ @@ -14255,10 +14302,10 @@ ] }, { - "name": "Refrigerator And Temperature Controlled Cabinet Mode", - "code": 82, + "name": "RVC Clean Mode", + "code": 85, "mfgCode": null, - "define": "REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER", + "define": "RVC_CLEAN_MODE_CLUSTER", "side": "server", "enabled": 1, "commands": [ @@ -14279,7 +14326,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14295,7 +14342,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14311,7 +14358,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14327,7 +14374,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14343,7 +14390,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14359,7 +14406,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14375,7 +14422,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14391,7 +14438,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14435,15 +14482,15 @@ ] }, { - "name": "RVC Run Mode", - "code": 84, + "name": "Temperature Control", + "code": 86, "mfgCode": null, - "define": "RVC_RUN_MODE_CLUSTER", + "define": "TEMPERATURE_CONTROL_CLUSTER", "side": "client", "enabled": 0, "commands": [ { - "name": "ChangeToMode", + "name": "SetTemperature", "code": 0, "mfgCode": null, "source": "client", @@ -14487,31 +14534,21 @@ ] }, { - "name": "RVC Run Mode", - "code": 84, + "name": "Temperature Control", + "code": 86, "mfgCode": null, - "define": "RVC_RUN_MODE_CLUSTER", + "define": "TEMPERATURE_CONTROL_CLUSTER", "side": "server", "enabled": 1, - "commands": [ - { - "name": "ChangeToModeResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - } - ], "attributes": [ { - "name": "SupportedModes", + "name": "TemperatureSetpoint", "code": 0, "mfgCode": null, "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", + "type": "temperature", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14521,13 +14558,13 @@ "reportableChange": 0 }, { - "name": "CurrentMode", + "name": "MinTemperature", "code": 1, "mfgCode": null, "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", + "type": "temperature", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14537,13 +14574,13 @@ "reportableChange": 0 }, { - "name": "StartUpMode", + "name": "MaxTemperature", "code": 2, "mfgCode": null, "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", + "type": "temperature", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14553,13 +14590,13 @@ "reportableChange": 0 }, { - "name": "OnMode", + "name": "Step", "code": 3, "mfgCode": null, "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", + "type": "temperature", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14569,24 +14606,24 @@ "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "SelectedTemperatureLevel", + "code": 4, "mfgCode": null, "side": "server", - "type": "array", + "type": "int8u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "SupportedTemperatureLevels", + "code": 5, "mfgCode": null, "side": "server", "type": "array", @@ -14601,12 +14638,12 @@ "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -14617,8 +14654,8 @@ "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", "type": "array", @@ -14633,68 +14670,48 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", + "type": "array", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "RVC Clean Mode", - "code": 85, - "mfgCode": null, - "define": "RVC_CLEAN_MODE_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ChangeToMode", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ + }, { "name": "FeatureMap", "code": 65532, "mfgCode": null, - "side": "client", + "side": "server", "type": "bitmap32", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -14704,7 +14721,7 @@ "name": "ClusterRevision", "code": 65533, "mfgCode": null, - "side": "client", + "side": "server", "type": "int16u", "included": 1, "storageOption": "RAM", @@ -14719,82 +14736,56 @@ ] }, { - "name": "RVC Clean Mode", - "code": 85, + "name": "Refrigerator Alarm", + "code": 87, "mfgCode": null, - "define": "RVC_CLEAN_MODE_CLUSTER", + "define": "REFRIGERATOR_ALARM_CLUSTER", "side": "server", "enabled": 1, - "commands": [ - { - "name": "ChangeToModeResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - } - ], "attributes": [ { - "name": "SupportedModes", + "name": "Mask", "code": 0, "mfgCode": null, "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentMode", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int8u", + "type": "AlarmMap", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "StartUpMode", + "name": "State", "code": 2, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "AlarmMap", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OnMode", + "name": "Supported", "code": 3, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "AlarmMap", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -14896,6 +14887,15 @@ "maxInterval": 65534, "reportableChange": 0 } + ], + "events": [ + { + "name": "Notify", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + } ] }, { @@ -14975,7 +14975,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14991,7 +14991,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15007,7 +15007,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15023,7 +15023,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15039,7 +15039,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15055,7 +15055,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15071,7 +15071,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15087,7 +15087,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15531,7 +15531,7 @@ "reportableChange": 0 }, { - "name": "SensitivityLevel", + "name": "SmokeSensitivityLevel", "code": 11, "mfgCode": null, "side": "server", @@ -22854,330 +22854,6 @@ } ] }, - { - "name": "Nitric Oxide Concentration Measurement", - "code": 1042, - "mfgCode": null, - "define": "NITRIC_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Nitric Oxide Concentration Measurement", - "code": 1042, - "mfgCode": null, - "define": "NITRIC_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "MeasuredValue", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "single", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MinMeasuredValue", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "single", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MaxMeasuredValue", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "single", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "PeakMeasuredValue", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "single", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "PeakMeasuredValueWindow", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "elapsed_s", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AverageMeasuredValue", - "code": 5, - "mfgCode": null, - "side": "server", - "type": "single", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AverageMeasuredValueWindow", - "code": 6, - "mfgCode": null, - "side": "server", - "type": "elapsed_s", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Uncertainty", - "code": 7, - "mfgCode": null, - "side": "server", - "type": "single", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MeasurementUnit", - "code": 8, - "mfgCode": null, - "side": "server", - "type": "MeasurementUnitEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MeasurementMedium", - "code": 9, - "mfgCode": null, - "side": "server", - "type": "MeasurementMediumEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LevelValue", - "code": 10, - "mfgCode": null, - "side": "server", - "type": "LevelValueEnum", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "Nitrogen Dioxide Concentration Measurement", "code": 1043, diff --git a/examples/all-clusters-app/all-clusters-common/include/laundry-washer-controls-delegate-impl.h b/examples/all-clusters-app/all-clusters-common/include/laundry-washer-controls-delegate-impl.h new file mode 100644 index 00000000000000..15a72482726ba0 --- /dev/null +++ b/examples/all-clusters-app/all-clusters-common/include/laundry-washer-controls-delegate-impl.h @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2023 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 +#include + +namespace chip { +namespace app { +namespace Clusters { +namespace LaundryWasherControls { + +/** + * The application delegate to statically define the options. + */ + +class LaundryWasherControlDelegate : public Delegate +{ + static const CharSpan spinSpeedsNameOptions[]; + static const NumberOfRinsesEnum supportRinsesOptions[]; + static LaundryWasherControlDelegate instance; + +public: + CHIP_ERROR GetSpinSpeedAtIndex(size_t index, MutableCharSpan & spinSpeed); + CHIP_ERROR GetSupportedRinseAtIndex(size_t index, NumberOfRinsesEnum & supportedRinse); + + LaundryWasherControlDelegate() = default; + ~LaundryWasherControlDelegate() = default; + + static inline LaundryWasherControlDelegate & getLaundryWasherControlDelegate() { return instance; } +}; + +} // namespace LaundryWasherControls +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/examples/all-clusters-app/all-clusters-common/src/laundry-washer-controls-delegate-impl.cpp b/examples/all-clusters-app/all-clusters-common/src/laundry-washer-controls-delegate-impl.cpp new file mode 100644 index 00000000000000..6c70ef98cb4736 --- /dev/null +++ b/examples/all-clusters-app/all-clusters-common/src/laundry-washer-controls-delegate-impl.cpp @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 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::Clusters::LaundryWasherControls; + +const CharSpan LaundryWasherControlDelegate::spinSpeedsNameOptions[] = { + CharSpan::fromCharString("Off"), + CharSpan::fromCharString("Low"), + CharSpan::fromCharString("Medium"), + CharSpan::fromCharString("High"), +}; + +const NumberOfRinsesEnum LaundryWasherControlDelegate::supportRinsesOptions[] = { + NumberOfRinsesEnum::kNormal, + NumberOfRinsesEnum::kExtra, +}; + +LaundryWasherControlDelegate LaundryWasherControlDelegate::instance; + +CHIP_ERROR LaundryWasherControlDelegate::GetSpinSpeedAtIndex(size_t index, MutableCharSpan & spinSpeed) +{ + if (index >= ArraySize(spinSpeedsNameOptions)) + { + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; + } + return chip::CopyCharSpanToMutableCharSpan(LaundryWasherControlDelegate::spinSpeedsNameOptions[index], spinSpeed); +} + +CHIP_ERROR LaundryWasherControlDelegate::GetSupportedRinseAtIndex(size_t index, NumberOfRinsesEnum & supportedRinse) +{ + if (index >= ArraySize(supportRinsesOptions)) + { + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; + } + supportedRinse = LaundryWasherControlDelegate::supportRinsesOptions[index]; + return CHIP_NO_ERROR; +} diff --git a/examples/all-clusters-app/esp32/CMakeLists.txt b/examples/all-clusters-app/esp32/CMakeLists.txt index dc92f0c65b2e19..d5508c4197d790 100644 --- a/examples/all-clusters-app/esp32/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/CMakeLists.txt @@ -26,12 +26,11 @@ include(${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/cm set(EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/config/esp32/components" - "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/QRCode" + "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common" ) + if(${IDF_TARGET} STREQUAL "esp32") - list(APPEND EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components/tft" - "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components/spidriver" - "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/screen-framework") + list(APPEND EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components") endif() project(chip-all-clusters-app) diff --git a/examples/all-clusters-app/esp32/main/CMakeLists.txt b/examples/all-clusters-app/esp32/main/CMakeLists.txt index 14015338230788..1b4b6ff21e6296 100644 --- a/examples/all-clusters-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/main/CMakeLists.txt @@ -110,8 +110,14 @@ set(PRIV_INCLUDE_DIRS_LIST "${PRIV_INCLUDE_DIRS_LIST}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/lib/support" - "${IDF_PATH}/components/freertos/include/freertos" ) + +if (${IDF_VERSION_MAJOR} LESS 5) + list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/include/freertos") +else() + list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/FreeRTOS-Kernel/include/freertos") +endif() + set(SRC_DIRS_LIST "${SRC_DIRS_LIST}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" @@ -119,9 +125,10 @@ set(SRC_DIRS_LIST "${SRC_DIRS_LIST}" ) endif (CONFIG_ENABLE_PW_RPC) -set(PRIV_REQUIRES_LIST chip QRCode bt driver app_update nvs_flash spi_flash openthread) -if(CONFIG_HAVE_DISPLAY) - list(APPEND PRIV_REQUIRES_LIST tft spidrier screen-framework) +set(PRIV_REQUIRES_LIST chip QRCode bt app_update nvs_flash spi_flash openthread) + +if(${IDF_TARGET} STREQUAL "esp32") + list(APPEND PRIV_REQUIRES_LIST spidriver screen-framework) endif() if(CONFIG_DEVICE_TYPE_ESP32_C3_DEVKITM) diff --git a/examples/all-clusters-app/esp32/sdkconfig.defaults b/examples/all-clusters-app/esp32/sdkconfig.defaults index d824c990600f65..c3b10929d4120d 100644 --- a/examples/all-clusters-app/esp32/sdkconfig.defaults +++ b/examples/all-clusters-app/esp32/sdkconfig.defaults @@ -66,3 +66,6 @@ CONFIG_MBEDTLS_HKDF_C=y # This example uses the older version of RMT driver to work with both # idf-v4.4.3 and idf-v5.0, so supressing the warnings by setting below option CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y + +# Move functions from IRAM to flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y diff --git a/examples/all-clusters-app/esp32/sdkconfig_c3devkit.defaults b/examples/all-clusters-app/esp32/sdkconfig_c3devkit.defaults index 24d4fe754ebdc8..8d7455d0d7610f 100644 --- a/examples/all-clusters-app/esp32/sdkconfig_c3devkit.defaults +++ b/examples/all-clusters-app/esp32/sdkconfig_c3devkit.defaults @@ -50,3 +50,6 @@ CONFIG_ESPTOOLPY_FLASHSIZE="4MB" # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +# Move functions from IRAM to flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y diff --git a/examples/all-clusters-app/esp32/sdkconfig_m5stack.defaults b/examples/all-clusters-app/esp32/sdkconfig_m5stack.defaults index a7d058bc7fe30a..287262d17e57cc 100644 --- a/examples/all-clusters-app/esp32/sdkconfig_m5stack.defaults +++ b/examples/all-clusters-app/esp32/sdkconfig_m5stack.defaults @@ -70,3 +70,6 @@ CONFIG_MBEDTLS_HKDF_C=y # Build chip tests CONFIG_BUILD_CHIP_TESTS=y + +# Move functions from IRAM to flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y diff --git a/examples/all-clusters-app/esp32/sdkconfig_m5stack_rpc.defaults b/examples/all-clusters-app/esp32/sdkconfig_m5stack_rpc.defaults index e0cf1a0f22a874..213d44fe9c616e 100644 --- a/examples/all-clusters-app/esp32/sdkconfig_m5stack_rpc.defaults +++ b/examples/all-clusters-app/esp32/sdkconfig_m5stack_rpc.defaults @@ -74,3 +74,9 @@ CONFIG_MBEDTLS_HKDF_C=y # Build chip tests CONFIG_BUILD_CHIP_TESTS=y + +# Move functions from IRAM to flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y + +# to avoid dram overflow, reduce the critical loggin buffer to 1K +CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE=1024 diff --git a/examples/all-clusters-app/linux/BUILD.gn b/examples/all-clusters-app/linux/BUILD.gn index 72cd65ba55bc9e..766b482e5a4600 100644 --- a/examples/all-clusters-app/linux/BUILD.gn +++ b/examples/all-clusters-app/linux/BUILD.gn @@ -26,6 +26,7 @@ source_set("chip-all-clusters-common") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/dishwasher-alarm-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/dishwasher-mode.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/laundry-washer-controls-delegate-impl.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/laundry-washer-mode.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/operational-state-delegate-impl.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/operational-state-delegates.cpp", diff --git a/examples/all-clusters-app/linux/main-common.cpp b/examples/all-clusters-app/linux/main-common.cpp index 727bddb955056b..71e86397ce7120 100644 --- a/examples/all-clusters-app/linux/main-common.cpp +++ b/examples/all-clusters-app/linux/main-common.cpp @@ -20,6 +20,7 @@ #include "WindowCoveringManager.h" #include "dishwasher-mode.h" #include "include/tv-callbacks.h" +#include "laundry-washer-controls-delegate-impl.h" #include "laundry-washer-mode.h" #include "rvc-modes.h" #include "tcc-mode.h" @@ -27,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -205,6 +207,12 @@ void ApplicationShutdown() } } +using namespace chip::app::Clusters::LaundryWasherControls; +void emberAfLaundryWasherControlsClusterInitCallback(EndpointId endpoint) +{ + LaundryWasherControlsServer::SetDefaultDelegate(1, &LaundryWasherControlDelegate::getLaundryWasherControlDelegate()); +} + void emberAfLowPowerClusterInitCallback(EndpointId endpoint) { ChipLogProgress(NotSpecified, "Setting LowPower default delegate to global manager"); diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap index 1d03d27c0e24e0..2c6f2767baab80 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -16,12 +16,6 @@ } ], "package": [ - { - "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" - }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl.json", @@ -29,6 +23,12 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" } ], "endpointTypes": [ @@ -2732,7 +2732,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11390,7 +11390,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23137,7 +23137,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/all-clusters-minimal-app/esp32/CMakeLists.txt b/examples/all-clusters-minimal-app/esp32/CMakeLists.txt index 0d6aa7b68931f6..0af660ce2990e2 100644 --- a/examples/all-clusters-minimal-app/esp32/CMakeLists.txt +++ b/examples/all-clusters-minimal-app/esp32/CMakeLists.txt @@ -26,12 +26,11 @@ include(${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/cm set(EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/config/esp32/components" - "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/QRCode" + "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common" ) + if(${IDF_TARGET} STREQUAL "esp32") - list(APPEND EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components/tft" - "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components/spidriver" - "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/screen-framework") + list(APPEND EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components") endif() project(chip-all-clusters-minimal-app) diff --git a/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt b/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt index c445c54d32e370..33582927c19d26 100644 --- a/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt @@ -100,8 +100,14 @@ set(PRIV_INCLUDE_DIRS_LIST "${PRIV_INCLUDE_DIRS_LIST}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/lib/support" - "${IDF_PATH}/components/freertos/include/freertos" ) + +if (${IDF_VERSION_MAJOR} LESS 5) + list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/include/freertos") +else() + list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/FreeRTOS-Kernel/include/freertos") +endif() + set(SRC_DIRS_LIST "${SRC_DIRS_LIST}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" @@ -110,8 +116,9 @@ set(SRC_DIRS_LIST "${SRC_DIRS_LIST}" endif (CONFIG_ENABLE_PW_RPC) set(PRIV_REQUIRES_LIST chip QRCode bt driver app_update nvs_flash spi_flash openthread) -if(CONFIG_HAVE_DISPLAY) - list(APPEND PRIV_REQUIRES_LIST tft spidrier screen-framework) + +if(${IDF_TARGET} STREQUAL "esp32") + list(APPEND PRIV_REQUIRES_LIST spidriver screen-framework) endif() if(CONFIG_DEVICE_TYPE_ESP32_C3_DEVKITM) diff --git a/examples/all-clusters-minimal-app/esp32/partitions.csv b/examples/all-clusters-minimal-app/esp32/partitions.csv index 7d399d0f5dd48e..47172e25774ebb 100644 --- a/examples/all-clusters-minimal-app/esp32/partitions.csv +++ b/examples/all-clusters-minimal-app/esp32/partitions.csv @@ -3,6 +3,6 @@ nvs, data, nvs, , 0xC000, otadata, data, ota, , 0x2000, phy_init, data, phy, , 0x1000, -ota_0, app, ota_0, , 1500K, -ota_1, app, ota_1, , 1500K, +ota_0, app, ota_0, , 1900K, +ota_1, app, ota_1, , 1900K, ot_storage, data, 0x3a, , 0x2000, diff --git a/examples/all-clusters-minimal-app/esp32/sdkconfig.defaults b/examples/all-clusters-minimal-app/esp32/sdkconfig.defaults index dcceac3858cd3e..fda02fbf7c9bae 100644 --- a/examples/all-clusters-minimal-app/esp32/sdkconfig.defaults +++ b/examples/all-clusters-minimal-app/esp32/sdkconfig.defaults @@ -66,3 +66,6 @@ CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +# Move functions from IRAM to flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y diff --git a/examples/all-clusters-minimal-app/esp32/sdkconfig_c3devkit.defaults b/examples/all-clusters-minimal-app/esp32/sdkconfig_c3devkit.defaults index 24d4fe754ebdc8..8d7455d0d7610f 100644 --- a/examples/all-clusters-minimal-app/esp32/sdkconfig_c3devkit.defaults +++ b/examples/all-clusters-minimal-app/esp32/sdkconfig_c3devkit.defaults @@ -50,3 +50,6 @@ CONFIG_ESPTOOLPY_FLASHSIZE="4MB" # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +# Move functions from IRAM to flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y diff --git a/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack.defaults b/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack.defaults index a7d058bc7fe30a..287262d17e57cc 100644 --- a/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack.defaults +++ b/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack.defaults @@ -70,3 +70,6 @@ CONFIG_MBEDTLS_HKDF_C=y # Build chip tests CONFIG_BUILD_CHIP_TESTS=y + +# Move functions from IRAM to flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y diff --git a/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack_rpc.defaults b/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack_rpc.defaults index e0cf1a0f22a874..213d44fe9c616e 100644 --- a/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack_rpc.defaults +++ b/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack_rpc.defaults @@ -74,3 +74,9 @@ CONFIG_MBEDTLS_HKDF_C=y # Build chip tests CONFIG_BUILD_CHIP_TESTS=y + +# Move functions from IRAM to flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y + +# to avoid dram overflow, reduce the critical loggin buffer to 1K +CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE=1024 diff --git a/examples/bridge-app/bridge-common/bridge-app.zap b/examples/bridge-app/bridge-common/bridge-app.zap index 4fd1ae893aaada..51a214d8750447 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7625,5 +7625,6 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap index 05a923ced5d212..9ab03f1604e7fe 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7514,5 +7514,6 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap index 2e1b66115e61f7..0647999f636f36 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap @@ -11136,7 +11136,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11152,7 +11152,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11168,7 +11168,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11184,7 +11184,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11200,7 +11200,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11216,7 +11216,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11232,7 +11232,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11248,7 +11248,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11264,7 +11264,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap index 5cfbf082e43abd..6287c65ac3867c 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap index e89aecd12781ae..8642b2a170521d 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -6319,5 +6319,6 @@ "endpointVersion": 1, "deviceIdentifier": 21 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap index 7fba5c4134daf5..0ab727ecd5abc2 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7539,5 +7539,6 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap index 5a46308f437617..da96d4569de5ef 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -9312,5 +9312,6 @@ "endpointVersion": 1, "deviceIdentifier": 10 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap index 79e9cc632850e1..c38514edfb40ae 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -8609,5 +8609,6 @@ "endpointVersion": 1, "deviceIdentifier": 269 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap index 321bbb3b20bf07..1975bfaf97c3e3 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap index 886a475473db1f..37a010401215f4 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -6367,5 +6367,6 @@ "endpointVersion": 1, "deviceIdentifier": 774 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap index 945ddd6d1e5ce8..b95ce7015634cb 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap index b978f4ec63924f..e7267012c6188a 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -6367,5 +6367,6 @@ "endpointVersion": 1, "deviceIdentifier": 775 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap index f9afc87acb29fe..57b5f0a2cb1180 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -6383,5 +6383,6 @@ "endpointVersion": 1, "deviceIdentifier": 262 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap index 3afbcce18145ec..01c4eefa322d6c 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -6495,5 +6495,6 @@ "endpointVersion": 1, "deviceIdentifier": 263 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap index 936482b5b5f361..f134cca90449a2 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7491,5 +7491,6 @@ "endpointVersion": 1, "deviceIdentifier": 256 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap index 0f1824d8ea2bea..5205af24b4419f 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7491,5 +7491,6 @@ "endpointVersion": 1, "deviceIdentifier": 259 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap index fbecf55ef040e4..e6984ffac25eae 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7167,5 +7167,6 @@ "endpointVersion": 1, "deviceIdentifier": 266 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap index bc3b79d37dc51b..1145564264c61e 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -6447,5 +6447,6 @@ "endpointVersion": 1, "deviceIdentifier": 773 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.zap b/examples/chef/devices/rootnode_pump_a811bb33a0.zap index 3306819f09d72d..a20540b631e664 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.zap +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7538,5 +7538,6 @@ "endpointVersion": 1, "deviceIdentifier": 771 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter new file mode 100644 index 00000000000000..8fb00caaadd6a7 --- /dev/null +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter @@ -0,0 +1,1475 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + +struct ApplicationStruct { + int16u catalogVendorID = 0; + char_string applicationID = 1; +} + +struct ErrorStateStruct { + enum8 errorStateID = 0; + optional char_string<64> errorStateLabel = 1; + optional char_string<64> errorStateDetails = 2; +} + +struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; +} + +struct OperationalStateStruct { + enum8 operationalStateID = 0; + optional char_string<64> operationalStateLabel = 1; +} + +/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ +server cluster Identify = 3 { + enum EffectIdentifierEnum : ENUM8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum EffectVariantEnum : ENUM8 { + kDefault = 0; + } + + enum IdentifyTypeEnum : ENUM8 { + kNone = 0; + kLightOutput = 1; + kVisibleIndicator = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute int16u identifyTime = 0; + readonly attribute IdentifyTypeEnum identifyType = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct IdentifyRequest { + INT16U identifyTime = 0; + } + + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +/** Attributes and commands for group configuration and manipulation. */ +server cluster Groups = 4 { + bitmap Feature : BITMAP32 { + kGroupNames = 0x1; + } + + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AddGroupRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + request struct ViewGroupRequest { + group_id groupID = 0; + } + + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + + request struct RemoveGroupRequest { + group_id groupID = 0; + } + + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + response struct AddGroupResponse = 0 { + ENUM8 status = 0; + group_id groupID = 1; + } + + response struct ViewGroupResponse = 1 { + ENUM8 status = 0; + group_id groupID = 1; + CHAR_STRING groupName = 2; + } + + response struct GetGroupMembershipResponse = 2 { + nullable INT8U capacity = 0; + group_id groupList[] = 1; + } + + response struct RemoveGroupResponse = 3 { + ENUM8 status = 0; + group_id groupID = 1; + } + + fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; +} + +/** Attributes and commands for scene configuration and manipulation. */ +server cluster Scenes = 5 { + bitmap Feature : BITMAP32 { + kSceneNames = 0x1; + } + + bitmap ScenesCopyMode : BITMAP8 { + kCopyAllScenes = 0x1; + } + + struct AttributeValuePair { + attrib_id attributeID = 0; + int32u attributeValue = 1; + } + + struct ExtensionFieldSet { + cluster_id clusterID = 0; + AttributeValuePair attributeValueList[] = 1; + } + + readonly attribute int8u sceneCount = 0; + readonly attribute int8u currentScene = 1; + readonly attribute group_id currentGroup = 2; + readonly attribute boolean sceneValid = 3; + readonly attribute bitmap8 nameSupport = 4; + readonly attribute int16u sceneTableSize = 6; + readonly attribute int8u remainingCapacity = 7; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AddSceneRequest { + group_id groupID = 0; + INT8U sceneID = 1; + INT16U transitionTime = 2; + CHAR_STRING sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + + request struct ViewSceneRequest { + group_id groupID = 0; + INT8U sceneID = 1; + } + + request struct RemoveSceneRequest { + group_id groupID = 0; + INT8U sceneID = 1; + } + + request struct RemoveAllScenesRequest { + group_id groupID = 0; + } + + request struct StoreSceneRequest { + group_id groupID = 0; + INT8U sceneID = 1; + } + + request struct RecallSceneRequest { + group_id groupID = 0; + INT8U sceneID = 1; + optional nullable INT16U transitionTime = 2; + } + + request struct GetSceneMembershipRequest { + group_id groupID = 0; + } + + response struct AddSceneResponse = 0 { + status status = 0; + group_id groupID = 1; + INT8U sceneID = 2; + } + + response struct ViewSceneResponse = 1 { + status status = 0; + group_id groupID = 1; + INT8U sceneID = 2; + optional INT16U transitionTime = 3; + optional CHAR_STRING sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + + response struct RemoveSceneResponse = 2 { + status status = 0; + group_id groupID = 1; + INT8U sceneID = 2; + } + + response struct RemoveAllScenesResponse = 3 { + status status = 0; + group_id groupID = 1; + } + + response struct StoreSceneResponse = 4 { + status status = 0; + group_id groupID = 1; + INT8U sceneID = 2; + } + + response struct GetSceneMembershipResponse = 6 { + status status = 0; + nullable INT8U capacity = 1; + group_id groupID = 2; + optional INT8U sceneList[] = 3; + } + + fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; + fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; + fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; +} + +/** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ +server cluster Descriptor = 29 { + struct DeviceTypeStruct { + devtype_id deviceType = 0; + int16u revision = 1; + } + + struct SemanticTagStruct { + nullable vendor_id mfgCode = 0; + enum8 namespaceID = 1; + enum8 tag = 2; + optional nullable char_string label = 3; + } + + readonly attribute DeviceTypeStruct deviceTypeList[] = 0; + readonly attribute CLUSTER_ID serverList[] = 1; + readonly attribute CLUSTER_ID clientList[] = 2; + readonly attribute ENDPOINT_NO partsList[] = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** The Access Control Cluster exposes a data model view of a + Node's Access Control List (ACL), which codifies the rules used to manage + and enforce Access Control for the Node's endpoints and their associated + cluster instances. */ +server cluster AccessControl = 31 { + enum AccessControlEntryAuthModeEnum : ENUM8 { + kPASE = 1; + kCASE = 2; + kGroup = 3; + } + + enum AccessControlEntryPrivilegeEnum : ENUM8 { + kView = 1; + kProxyView = 2; + kOperate = 3; + kManage = 4; + kAdminister = 5; + } + + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + struct AccessControlTargetStruct { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; + nullable fabric_sensitive int64u subjects[] = 3; + nullable fabric_sensitive AccessControlTargetStruct targets[] = 4; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct AccessControlExtensionStruct { + fabric_sensitive octet_string<128> data = 1; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 { + nullable node_id adminNodeID = 1; + nullable INT16U adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlEntryStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 { + nullable node_id adminNodeID = 1; + nullable INT16U adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlExtensionStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** This cluster provides attributes and events for determining basic information about Nodes, which supports both + Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, + which apply to the whole Node. Also allows setting user device information such as location. */ +server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + + struct CapabilityMinimaStruct { + int16u caseSessionsPerFabric = 0; + int16u subscriptionsPerFabric = 1; + } + + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + fabric_idx fabricIndex = 0; + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + readonly attribute int16u dataModelRevision = 0; + readonly attribute char_string<32> vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string<32> productName = 3; + readonly attribute int16u productID = 4; + attribute access(write: manage) char_string<32> nodeLabel = 5; + attribute access(write: administer) char_string<2> location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string<64> hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute char_string<16> manufacturingDate = 11; + readonly attribute char_string<32> partNumber = 12; + readonly attribute long_char_string<256> productURL = 13; + readonly attribute char_string<64> productLabel = 14; + readonly attribute char_string<32> serialNumber = 15; + attribute access(write: manage) boolean localConfigDisabled = 16; + readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** This cluster is used to manage global aspects of the Commissioning flow. */ +server cluster GeneralCommissioning = 48 { + enum CommissioningErrorEnum : ENUM8 { + kOK = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNoFailSafe = 3; + kBusyWithOtherAdmin = 4; + } + + enum RegulatoryLocationTypeEnum : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfo { + int16u failSafeExpiryLengthSeconds = 0; + int16u maxCumulativeFailsafeSeconds = 1; + } + + attribute access(write: administer) int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; + readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; + readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationTypeEnum newRegulatoryConfig = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + } + + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse = 3 { + CommissioningErrorEnum errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse = 5 { + CommissioningErrorEnum errorCode = 0; + CHAR_STRING debugText = 1; + } + + command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; +} + +/** Functionality to configure, enable, disable network credentials and access on a Matter device. */ +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatusEnum : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBandEnum : ENUM8 { + k2G4 = 0; + k3G65 = 1; + k5G = 2; + k6G = 3; + k60G = 4; + k1G = 5; + } + + bitmap Feature : BITMAP32 { + kWiFiNetworkInterface = 0x1; + kThreadNetworkInterface = 0x2; + kEthernetNetworkInterface = 0x4; + } + + bitmap WiFiSecurityBitmap : BITMAP8 { + kUnencrypted = 0x1; + kWEP = 0x2; + kWPAPersonal = 0x4; + kWPA2Personal = 0x8; + kWPA3Personal = 0x10; + } + + struct NetworkInfoStruct { + octet_string<32> networkID = 0; + boolean connected = 1; + } + + struct ThreadInterfaceScanResultStruct { + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; + } + + struct WiFiInterfaceScanResultStruct { + WiFiSecurityBitmap security = 0; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; + WiFiBandEnum wiFiBand = 4; + int8s rssi = 5; + } + + readonly attribute access(read: administer) int8u maxNetworks = 0; + readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; + readonly attribute int8u scanMaxTimeSeconds = 2; + readonly attribute int8u connectMaxTimeSeconds = 3; + attribute access(write: administer) boolean interfaceEnabled = 4; + readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; + readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; + readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ScanNetworksRequest { + optional nullable OCTET_STRING<32> ssid = 0; + optional INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING<32> ssid = 0; + OCTET_STRING<64> credentials = 1; + optional INT64U breadcrumb = 2; + } + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING<254> operationalDataset = 0; + optional INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING<32> networkID = 0; + optional INT64U breadcrumb = 1; + } + + request struct ConnectNetworkRequest { + OCTET_STRING<32> networkID = 0; + optional INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING<32> networkID = 0; + INT8U networkIndex = 1; + optional INT64U breadcrumb = 2; + } + + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional CHAR_STRING<512> debugText = 1; + optional INT8U networkIndex = 2; + } + + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional CHAR_STRING debugText = 1; + nullable INT32S errorValue = 2; + } + + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; +} + +/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ +server cluster DiagnosticLogs = 50 { + enum IntentEnum : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum TransferProtocolEnum : ENUM8 { + kResponsePayload = 0; + kBDX = 1; + } + + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct RetrieveLogsRequestRequest { + IntentEnum intent = 0; + TransferProtocolEnum requestedProtocol = 1; + optional CHAR_STRING<32> transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +/** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +server cluster GeneralDiagnostics = 51 { + enum BootReasonEnum : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultEnum : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceTypeEnum : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultEnum : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultEnum : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterface { + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; + InterfaceTypeEnum type = 7; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultEnum current[] = 0; + HardwareFaultEnum previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultEnum current[] = 0; + RadioFaultEnum previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonEnum bootReason = 0; + } + + readonly attribute NetworkInterface networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute int64u upTime = 2; + readonly attribute int32u totalOperationalHours = 3; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute boolean testEventTriggersEnabled = 8; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct TestEventTriggerRequest { + OCTET_STRING<16> enableKey = 0; + INT64U eventTrigger = 1; + } + + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; +} + +/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. +Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. +Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ +server cluster Switch = 59 { + bitmap Feature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + + info event SwitchLatched = 0 { + INT8U newPosition = 0; + } + + info event InitialPress = 1 { + INT8U newPosition = 0; + } + + info event LongPress = 2 { + INT8U newPosition = 0; + } + + info event ShortRelease = 3 { + INT8U previousPosition = 0; + } + + info event LongRelease = 4 { + INT8U previousPosition = 0; + } + + info event MultiPressOngoing = 5 { + INT8U newPosition = 0; + INT8U currentNumberOfPressesCounted = 1; + } + + info event MultiPressComplete = 6 { + INT8U previousPosition = 0; + INT8U totalNumberOfPressesCounted = 1; + } + + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** Commands to trigger a Node to allow a new Administrator to commission it. */ +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatusEnum : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; + } + + readonly attribute CommissioningWindowStatusEnum windowStatus = 0; + readonly attribute nullable fabric_idx adminFabricIndex = 1; + readonly attribute nullable int16u adminVendorId = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEPasscodeVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + } + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; +} + +/** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ +server cluster OperationalCredentials = 62 { + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOK = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInvalidAdminSubject = 6; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + fabric_scoped struct FabricDescriptorStruct { + octet_string<65> rootPublicKey = 1; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; + char_string<32> label = 5; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct NOCStruct { + fabric_sensitive octet_string noc = 1; + nullable fabric_sensitive octet_string icac = 2; + fabric_idx fabricIndex = 254; + } + + readonly attribute access(read: administer) NOCStruct NOCs[] = 0; + readonly attribute FabricDescriptorStruct fabrics[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute OCTET_STRING trustedRootCertificates[] = 4; + readonly attribute int8u currentFabricIndex = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + CertificateChainTypeEnum certificateType = 0; + } + + request struct CSRRequestRequest { + OCTET_STRING CSRNonce = 0; + optional boolean isForUpdateNOC = 1; + } + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + Int64u caseAdminSubject = 3; + VENDOR_ID adminVendorId = 4; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING<32> label = 0; + } + + request struct RemoveFabricRequest { + fabric_idx fabricIndex = 0; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCACertificate = 0; + } + + response struct AttestationResponse = 1 { + OCTET_STRING attestationElements = 0; + OCTET_STRING attestationSignature = 1; + } + + response struct CertificateChainResponse = 3 { + OCTET_STRING certificate = 0; + } + + response struct CSRResponse = 5 { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional CHAR_STRING debugText = 2; + } + + command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; +} + +/** The Group Key Management Cluster is the mechanism by which group keys are managed. */ +server cluster GroupKeyManagement = 63 { + enum GroupKeySecurityPolicyEnum : ENUM8 { + kTrustFirst = 0; + kCacheAndSync = 1; + } + + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + + fabric_scoped struct GroupInfoMapStruct { + group_id groupId = 1; + endpoint_no endpoints[] = 2; + optional char_string<16> groupName = 3; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct GroupKeyMapStruct { + group_id groupId = 1; + int16u groupKeySetID = 2; + fabric_idx fabricIndex = 254; + } + + struct GroupKeySetStruct { + int16u groupKeySetID = 0; + GroupKeySecurityPolicyEnum groupKeySecurityPolicy = 1; + nullable octet_string<16> epochKey0 = 2; + nullable epoch_us epochStartTime0 = 3; + nullable octet_string<16> epochKey1 = 4; + nullable epoch_us epochStartTime1 = 5; + nullable octet_string<16> epochKey2 = 6; + nullable epoch_us epochStartTime2 = 7; + } + + attribute access(write: manage) GroupKeyMapStruct groupKeyMap[] = 0; + readonly attribute GroupInfoMapStruct groupTable[] = 1; + readonly attribute int16u maxGroupsPerFabric = 2; + readonly attribute int16u maxGroupKeysPerFabric = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct KeySetWriteRequest { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetReadRequest { + INT16U groupKeySetID = 0; + } + + request struct KeySetRemoveRequest { + INT16U groupKeySetID = 0; + } + + response struct KeySetReadResponse = 2 { + GroupKeySetStruct groupKeySet = 0; + } + + response struct KeySetReadAllIndicesResponse = 5 { + INT16U groupKeySetIDs[] = 0; + } + + fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; +} + +/** Attributes and commands for selecting a mode from a list of supported options. */ +server cluster RvcRunMode = 84 { + enum ModeTag : ENUM16 { + kIdle = 16384; + kCleaning = 16385; + } + + enum StatusCode : ENUM8 { + kStuck = 65; + kDustBinMissing = 66; + kDustBinFull = 67; + kWaterTankEmpty = 68; + kWaterTankMissing = 69; + kWaterTankLidOpen = 70; + kMopCleaningPadMissing = 71; + kBatteryLow = 72; + } + + bitmap Feature : BITMAP32 { + kOnOff = 0x1; + } + + struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + } + + struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; + } + + readonly attribute ModeOptionStruct supportedModes[] = 0; + readonly attribute int8u currentMode = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ChangeToModeRequest { + INT8U newMode = 0; + } + + response struct ChangeToModeResponse = 1 { + ENUM8 status = 0; + optional CHAR_STRING statusText = 1; + } + + command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; +} + +/** Attributes and commands for selecting a mode from a list of supported options. */ +server cluster RvcCleanMode = 85 { + enum ModeTag : ENUM16 { + kDeepClean = 16384; + kVacuum = 16385; + kMop = 16386; + } + + enum StatusCode : ENUM8 { + kCleaningInProgress = 64; + } + + bitmap Feature : BITMAP32 { + kOnOff = 0x1; + } + + struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + } + + struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; + } + + readonly attribute ModeOptionStruct supportedModes[] = 0; + readonly attribute int8u currentMode = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ChangeToModeRequest { + INT8U newMode = 0; + } + + response struct ChangeToModeResponse = 1 { + ENUM8 status = 0; + optional CHAR_STRING statusText = 1; + } + + command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; +} + +/** This cluster supports remotely monitoring and, where supported, changing the operational state of a Robotic Vacuum. */ +server cluster RvcOperationalState = 97 { + enum ErrorStateEnum : ENUM8 { + kFailedToFindChargingDock = 64; + kStuck = 65; + kDustBinMissing = 66; + kDustBinFull = 67; + kWaterTankEmpty = 68; + kWaterTankMissing = 69; + kWaterTankLidOpen = 70; + kMopCleaningPadMissing = 71; + } + + enum OperationalStateEnum : ENUM8 { + kSeekingCharger = 64; + kCharging = 65; + kDocked = 66; + } + + struct ErrorStateStruct { + enum8 errorStateID = 0; + optional char_string<64> errorStateLabel = 1; + optional char_string<64> errorStateDetails = 2; + } + + struct OperationalStateStruct { + enum8 operationalStateID = 0; + optional char_string<64> operationalStateLabel = 1; + } + + critical event OperationalError = 0 { + ErrorStateStruct errorState = 0; + } + + info event OperationCompletion = 1 { + ENUM8 completionErrorCode = 0; + optional nullable elapsed_s totalOperationalTime = 1; + optional nullable elapsed_s pausedTime = 2; + } + + readonly attribute nullable CHAR_STRING phaseList[] = 0; + readonly attribute nullable int8u currentPhase = 1; + readonly attribute OperationalStateStruct operationalStateList[] = 3; + readonly attribute enum8 operationalState = 4; + readonly attribute ErrorStateStruct operationalError = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + response struct OperationalCommandResponse = 4 { + ErrorStateStruct commandResponseState = 0; + } + + command Pause(): OperationalCommandResponse = 0; + command Resume(): OperationalCommandResponse = 3; +} + +endpoint 0 { + device type rootdevice = 22, version 1; + + server cluster Groups { + ram attribute nameSupport; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + ram attribute featureMap default = 0; + callback attribute clusterRevision default = 1; + } + + server cluster AccessControl { + emits event AccessControlEntryChanged; + emits event AccessControlExtensionChanged; + callback attribute acl; + callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster BasicInformation { + emits event StartUp; + emits event ShutDown; + emits event Leave; + callback attribute dataModelRevision default = 10; + callback attribute vendorName; + callback attribute vendorID; + callback attribute productName; + callback attribute productID; + persist attribute nodeLabel; + callback attribute location default = "XX"; + callback attribute hardwareVersion default = 0; + callback attribute hardwareVersionString; + callback attribute softwareVersion default = 0; + callback attribute softwareVersionString; + callback attribute manufacturingDate default = "20210614123456ZZ"; + callback attribute partNumber; + callback attribute productURL; + callback attribute productLabel; + callback attribute serialNumber; + persist attribute localConfigDisabled default = 0; + callback attribute uniqueID; + callback attribute capabilityMinima; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralCommissioning { + ram attribute breadcrumb default = 0x0000000000000000; + callback attribute basicCommissioningInfo; + callback attribute regulatoryConfig default = 0; + callback attribute locationCapability default = 0; + callback attribute supportsConcurrentConnection default = 1; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + } + + server cluster NetworkCommissioning { + ram attribute maxNetworks; + callback attribute networks; + ram attribute scanMaxTimeSeconds; + ram attribute connectMaxTimeSeconds; + ram attribute interfaceEnabled; + ram attribute lastNetworkingStatus; + ram attribute lastNetworkID; + ram attribute lastConnectErrorValue; + ram attribute featureMap default = 1; + ram attribute clusterRevision default = 0x0001; + } + + server cluster DiagnosticLogs { + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralDiagnostics { + emits event BootReason; + callback attribute networkInterfaces; + callback attribute rebootCount default = 0x0000; + callback attribute upTime default = 0x0000000000000000; + callback attribute totalOperationalHours default = 0x00000000; + callback attribute bootReason; + callback attribute activeHardwareFaults; + callback attribute activeRadioFaults; + callback attribute activeNetworkFaults; + callback attribute testEventTriggersEnabled default = false; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + } + + server cluster Switch { + ram attribute numberOfPositions default = 2; + ram attribute currentPosition; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus default = 0; + callback attribute adminFabricIndex default = 1; + callback attribute adminVendorId default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + } + + server cluster OperationalCredentials { + callback attribute NOCs; + callback attribute fabrics; + callback attribute supportedFabrics; + callback attribute commissionedFabrics; + callback attribute trustedRootCertificates; + callback attribute currentFabricIndex; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} +endpoint 1 { + device type anonymousEndpointType = 116, version 1; + + server cluster Identify { + ram attribute identifyTime default = 0x0; + ram attribute identifyType default = 0x0; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute eventList; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 2; + } + + server cluster Groups { + ram attribute nameSupport; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster Scenes { + callback attribute sceneCount default = 0x00; + ram attribute currentScene default = 0x00; + ram attribute currentGroup default = 0x0000; + ram attribute sceneValid default = 0x00; + ram attribute nameSupport default = 0x00; + ram attribute sceneTableSize; + callback attribute remainingCapacity; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 5; + } + + server cluster Descriptor { + callback attribute deviceTypeList default = 0; + callback attribute serverList default = 0; + callback attribute clientList default = 0; + callback attribute partsList default = 0; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute eventList; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster RvcRunMode { + callback attribute supportedModes; + callback attribute currentMode; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster RvcCleanMode { + callback attribute supportedModes; + callback attribute currentMode; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster RvcOperationalState { + emits event OperationalError; + emits event OperationCompletion; + callback attribute phaseList; + callback attribute currentPhase; + callback attribute operationalStateList; + callback attribute operationalState; + callback attribute operationalError; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} + + diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap new file mode 100644 index 00000000000000..746259df3636b6 --- /dev/null +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap @@ -0,0 +1,10848 @@ +{ + "featureLevel": 97, + "creator": "zap", + "keyValuePairs": [ + { + "key": "commandDiscovery", + "value": "1" + }, + { + "key": "defaultResponsePolicy", + "value": "always" + }, + { + "key": "manufacturerCodes", + "value": "0x1002" + } + ], + "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/zcl/zcl.json", + "type": "zcl-properties", + "category": "matter", + "version": 1, + "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" + } + ], + "endpointTypes": [ + { + "name": "MA-rootdevice", + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "NameSupportBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SceneCount", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentScene", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentGroup", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "group_id", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SceneValid", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NameSupport", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "OnOff", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/off Switch Configuration", + "code": 7, + "mfgCode": null, + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/off Switch Configuration", + "code": 7, + "mfgCode": null, + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "switch type", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "switch actions", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToLevel", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Move", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Step", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Stop", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveToLevelWithOnOff", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StopWithOnOff", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "CurrentLevel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ACL", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Extension", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "AccessControlEntryChanged", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AccessControlExtensionChanged", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DataModelRevision", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductName", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NodeLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Location", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "XX", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersion", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersionString", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersion", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersionString", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "20210614123456ZZ", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductLabel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LocalConfigDisabled", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Reachable", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UniqueID", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StartUp", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ShutDown", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "Leave", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "OTA Software Update Provider", + "code": 41, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "QueryImage", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ApplyUpdateRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "NotifyUpdateApplied", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Provider", + "code": 41, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "QueryImageResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ApplyUpdateResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AnnounceOTAProvider", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "DefaultOTAProviders", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UpdatePossible", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpdateState", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "OTAUpdateStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpdateStateProgress", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StateTransition", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "VersionApplied", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "DownloadError", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "HourFormat", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "HourFormatEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveCalendarType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "CalendarTypeEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedCalendarTypes", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "TemperatureUnit", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "TempUnitEnum", + "included": 0, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "Breadcrumb", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BasicCommissioningInfo", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "BasicCommissioningInfo", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RegulatoryConfig", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocationCapability", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "MaxNetworks", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Networks", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ScanMaxTimeSeconds", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ConnectMaxTimeSeconds", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InterfaceEnabled", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkingStatus", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "NetworkCommissioningStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkID", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastConnectErrorValue", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "RetrieveLogsRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RebootCount", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TotalOperationalHours", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BootReason", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "BootReasonEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveHardwareFaults", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveRadioFaults", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TestEventTriggersEnabled", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "false", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "BootReason", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetWatermarks", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "ThreadMetrics", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapFree", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapUsed", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapHighWatermark", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Channel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RoutingRole", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "RoutingRoleEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NetworkName", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PanId", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ExtendedPanId", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MeshLocalPrefix", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NeighborTable", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RouteTable", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartitionId", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Weighting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DataVersion", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StableDataVersion", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LeaderRouterId", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DetachedRoleCount", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChildRoleCount", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RouterRoleCount", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LeaderRoleCount", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "AttachAttemptCount", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartitionIdChangeCount", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BetterPartitionAttachAttemptCount", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ParentChangeCount", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxTotalCount", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxUnicastCount", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBroadcastCount", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxAckRequestedCount", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxAckedCount", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxNoAckRequestedCount", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDataCount", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDataPollCount", + "code": 29, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBeaconCount", + "code": 30, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBeaconRequestCount", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxOtherCount", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxRetryCount", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDirectMaxRetryExpiryCount", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxIndirectMaxRetryExpiryCount", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCcaCount", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrAbortCount", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrBusyChannelCount", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxTotalCount", + "code": 39, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxUnicastCount", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBroadcastCount", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDataCount", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDataPollCount", + "code": 43, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBeaconCount", + "code": 44, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBeaconRequestCount", + "code": 45, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxOtherCount", + "code": 46, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxAddressFilteredCount", + "code": 47, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDestAddrFilteredCount", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDuplicatedCount", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrNoFrameCount", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrUnknownNeighborCount", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrInvalidSrcAddrCount", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrSecCount", + "code": 53, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrFcsCount", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrOtherCount", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveTimestamp", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PendingTimestamp", + "code": 57, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Delay", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SecurityPolicy", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "SecurityPolicy", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelPage0Mask", + "code": 60, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OperationalDatasetComponents", + "code": 61, + "mfgCode": null, + "side": "server", + "type": "OperationalDatasetComponents", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaultsList", + "code": 62, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x000F", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "BSSID", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SecurityType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "SecurityTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "WiFiVersion", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "WiFiVersionEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelNumber", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RSSI", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BeaconLostCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BeaconRxCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastRxCount", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastTxCount", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastRxCount", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastTxCount", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMaxRate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "PHYRate", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PHYRateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FullDuplex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketRxCount", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PacketTxCount", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCount", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CollisionCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CarrierDetect", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TimeSinceReset", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Switch", + "code": 59, + "mfgCode": null, + "define": "SWITCH_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Switch", + "code": 59, + "mfgCode": null, + "define": "SWITCH_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "OpenBasicCommissioningWindow", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminFabricIndex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "fabric_idx", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Fabrics", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedFabrics", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CommissionedFabrics", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TrustedRootCertificates", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentFabricIndex", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetRead", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetRemove", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetReadResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "KeySetReadAllIndicesResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "GroupKeyMap", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GroupTable", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupsPerFabric", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupKeysPerFabric", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "name": "Anonymous Endpoint Type", + "deviceTypeName": "MA-robotic-vacuum-cleaner", + "deviceTypeCode": 116, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "NameSupportBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SceneCount", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentScene", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentGroup", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "group_id", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SceneValid", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NameSupport", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastConfiguredBy", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "node_id", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SceneTableSize", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingCapacity", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "OnOff", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GlobalSceneControl", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnTime", + "code": 16385, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OffWaitTime", + "code": 16386, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpOnOff", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "OnOffStartUpOnOff", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToLevel", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Move", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Step", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Stop", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToLevelWithOnOff", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StopWithOnOff", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "CurrentLevel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingTime", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinLevel", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxLevel", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFE", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentFrequency", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinFrequency", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxFrequency", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Options", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "LevelControlOptions", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnOffTransitionTime", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnLevel", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnTransitionTime", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OffTransitionTime", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DefaultMoveRate", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpCurrentLevel", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TagList", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Binding", + "code": 30, + "mfgCode": null, + "define": "BINDING_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Binding", + "code": 30, + "mfgCode": null, + "define": "BINDING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Binding", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "RVC Run Mode", + "code": 84, + "mfgCode": null, + "define": "RVC_RUN_MODE_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ChangeToMode", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "RVC Run Mode", + "code": 84, + "mfgCode": null, + "define": "RVC_RUN_MODE_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ChangeToModeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SupportedModes", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMode", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpMode", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnMode", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "RVC Clean Mode", + "code": 85, + "mfgCode": null, + "define": "RVC_CLEAN_MODE_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ChangeToMode", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "RVC Clean Mode", + "code": 85, + "mfgCode": null, + "define": "RVC_CLEAN_MODE_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ChangeToModeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SupportedModes", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMode", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpMode", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnMode", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "RVC Operational State", + "code": 97, + "mfgCode": null, + "define": "OPERATIONAL_STATE_RVC_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Pause", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Resume", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "RVC Operational State", + "code": 97, + "mfgCode": null, + "define": "OPERATIONAL_STATE_RVC_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "OperationalCommandResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "PhaseList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPhase", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CountdownTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalStateList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalState", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalError", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "ErrorStateStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "OperationalError", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "OperationCompletion", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Door Lock", + "code": 257, + "mfgCode": null, + "define": "DOOR_LOCK_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "LockDoor", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UnlockDoor", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetUser", + "code": 26, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetUser", + "code": 27, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearUser", + "code": 29, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetCredential", + "code": 34, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearCredential", + "code": 38, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "7", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Door Lock", + "code": 257, + "mfgCode": null, + "define": "DOOR_LOCK_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "GetUserResponse", + "code": 28, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetCredentialResponse", + "code": 35, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "LockState", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "DlLockState", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LockType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "DlLockType", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActuatorEnabled", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DoorState", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "DoorStateEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DoorOpenEvents", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DoorClosedEvents", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OpenPeriod", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfTotalUsersSupported", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPINUsersSupported", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfRFIDUsersSupported", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfWeekDaySchedulesSupportedPerUser", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfYearDaySchedulesSupportedPerUser", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfHolidaySchedulesSupported", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxPINCodeLength", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinPINCodeLength", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxRFIDCodeLength", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinRFIDCodeLength", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CredentialRulesSupport", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "DlCredentialRuleMask", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfCredentialsSupportedPerUser", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Language", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LEDSettings", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AutoRelockTime", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SoundVolume", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperatingMode", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "OperatingModeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedOperatingModes", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "DlSupportedOperatingModes", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFFF6", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DefaultConfigurationRegister", + "code": 39, + "mfgCode": null, + "side": "server", + "type": "DlDefaultConfigurationRegister", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnableLocalProgramming", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnableOneTouchLocking", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnableInsideStatusLED", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnablePrivacyModeButton", + "code": 43, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocalProgrammingFeatures", + "code": 44, + "mfgCode": null, + "side": "server", + "type": "DlLocalProgrammingFeatures", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WrongCodeEntryLimit", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UserCodeTemporaryDisableTime", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SendPINOverTheAir", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RequirePINforRemoteOperation", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ExpiringUserTimeout", + "code": 53, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "7", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Barrier Control", + "code": 259, + "mfgCode": null, + "define": "BARRIER_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "BarrierControlGoToPercent", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "BarrierControlStop", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Barrier Control", + "code": 259, + "mfgCode": null, + "define": "BARRIER_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "barrier moving state", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier safety status", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "bitmap16", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier capabilities", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier open events", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier close events", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier command open events", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier command close events", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier open period", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier close period", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier position", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Color Control", + "code": 768, + "mfgCode": null, + "define": "COLOR_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToHue", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveHue", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepHue", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToSaturation", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveSaturation", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepSaturation", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToHueAndSaturation", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToColor", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveColor", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepColor", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToColorTemperature", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StopMoveStep", + "code": 71, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveColorTemperature", + "code": 75, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepColorTemperature", + "code": 76, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Color Control", + "code": 768, + "mfgCode": null, + "define": "COLOR_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "CurrentHue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentSaturation", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentX", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x616B", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentY", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x607D", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DriftCompensation", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CompensationText", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorTemperatureMireds", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00FA", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorMode", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Options", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPrimaries", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary1X", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary1Y", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary1Intensity", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary2X", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary2Y", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary2Intensity", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary3X", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary3Y", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary3Intensity", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary4X", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary4Y", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary4Intensity", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary5X", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary5Y", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary5Intensity", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6X", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6Y", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6Intensity", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WhitePointX", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WhitePointY", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointRX", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointRY", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointRIntensity", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointGX", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointGY", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointGIntensity", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointBX", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointBY", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointBIntensity", + "code": 60, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnhancedCurrentHue", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnhancedColorMode", + "code": 16385, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopActive", + "code": 16386, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopDirection", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopTime", + "code": 16388, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0019", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopStartEnhancedHue", + "code": 16389, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x2300", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopStoredEnhancedHue", + "code": 16390, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorCapabilities", + "code": 16394, + "mfgCode": null, + "side": "server", + "type": "bitmap16", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorTempPhysicalMinMireds", + "code": 16395, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorTempPhysicalMaxMireds", + "code": 16396, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFEFF", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CoupleColorTempToLevelMinMireds", + "code": 16397, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpColorTemperatureMireds", + "code": 16400, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMPERATURE_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMPERATURE_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Tolerance", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Occupancy Sensing", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Occupancy Sensing", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Occupancy", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "OccupancyBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupancySensorType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupancySensorTypeBitmap", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PIROccupiedToUnoccupiedDelay", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PIRUnoccupiedToOccupiedDelay", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PIRUnoccupiedToOccupiedThreshold", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UltrasonicOccupiedToUnoccupiedDelay", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UltrasonicUnoccupiedToOccupiedDelay", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UltrasonicUnoccupiedToOccupiedThreshold", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PhysicalContactOccupiedToUnoccupiedDelay", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PhysicalContactUnoccupiedToOccupiedDelay", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PhysicalContactUnoccupiedToOccupiedThreshold", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0, + "endpointVersion": 1, + "deviceIdentifier": 22 + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0, + "endpointVersion": 1, + "deviceIdentifier": 116 + } + ], + "log": [] +} \ No newline at end of file diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter new file mode 100644 index 00000000000000..4d2c91b819da14 --- /dev/null +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter @@ -0,0 +1,1335 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + +struct ApplicationStruct { + int16u catalogVendorID = 0; + char_string applicationID = 1; +} + +struct ErrorStateStruct { + enum8 errorStateID = 0; + optional char_string<64> errorStateLabel = 1; + optional char_string<64> errorStateDetails = 2; +} + +struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; +} + +struct OperationalStateStruct { + enum8 operationalStateID = 0; + optional char_string<64> operationalStateLabel = 1; +} + +/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ +server cluster Identify = 3 { + enum EffectIdentifierEnum : ENUM8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum EffectVariantEnum : ENUM8 { + kDefault = 0; + } + + enum IdentifyTypeEnum : ENUM8 { + kNone = 0; + kLightOutput = 1; + kVisibleIndicator = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute int16u identifyTime = 0; + readonly attribute IdentifyTypeEnum identifyType = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct IdentifyRequest { + INT16U identifyTime = 0; + } + + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +/** Attributes and commands for group configuration and manipulation. */ +server cluster Groups = 4 { + bitmap Feature : BITMAP32 { + kGroupNames = 0x1; + } + + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AddGroupRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + request struct ViewGroupRequest { + group_id groupID = 0; + } + + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + + request struct RemoveGroupRequest { + group_id groupID = 0; + } + + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + response struct AddGroupResponse = 0 { + ENUM8 status = 0; + group_id groupID = 1; + } + + response struct ViewGroupResponse = 1 { + ENUM8 status = 0; + group_id groupID = 1; + CHAR_STRING groupName = 2; + } + + response struct GetGroupMembershipResponse = 2 { + nullable INT8U capacity = 0; + group_id groupList[] = 1; + } + + response struct RemoveGroupResponse = 3 { + ENUM8 status = 0; + group_id groupID = 1; + } + + fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; +} + +/** Attributes and commands for switching devices between 'On' and 'Off' states. */ +server cluster OnOff = 6 { + enum OnOffDelayedAllOffEffectVariant : ENUM8 { + kFadeToOffIn0p8Seconds = 0; + kNoFade = 1; + k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; + } + + enum OnOffDyingLightEffectVariant : ENUM8 { + k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; + } + + enum OnOffEffectIdentifier : ENUM8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + enum OnOffStartUpOnOff : ENUM8 { + kOff = 0; + kOn = 1; + kTogglePreviousOnOff = 2; + } + + bitmap Feature : BITMAP32 { + kLighting = 0x1; + kDeadFront = 0x2; + } + + bitmap OnOffControl : BITMAP8 { + kAcceptOnlyWhenOn = 0x1; + } + + readonly nosubscribe attribute boolean onOff = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + command Off(): DefaultSuccess = 0; + command On(): DefaultSuccess = 1; + command Toggle(): DefaultSuccess = 2; +} + +/** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ +server cluster Descriptor = 29 { + struct DeviceTypeStruct { + devtype_id deviceType = 0; + int16u revision = 1; + } + + struct SemanticTagStruct { + nullable vendor_id mfgCode = 0; + enum8 namespaceID = 1; + enum8 tag = 2; + optional nullable char_string label = 3; + } + + readonly attribute DeviceTypeStruct deviceTypeList[] = 0; + readonly attribute CLUSTER_ID serverList[] = 1; + readonly attribute CLUSTER_ID clientList[] = 2; + readonly attribute ENDPOINT_NO partsList[] = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** The Access Control Cluster exposes a data model view of a + Node's Access Control List (ACL), which codifies the rules used to manage + and enforce Access Control for the Node's endpoints and their associated + cluster instances. */ +server cluster AccessControl = 31 { + enum AccessControlEntryAuthModeEnum : ENUM8 { + kPASE = 1; + kCASE = 2; + kGroup = 3; + } + + enum AccessControlEntryPrivilegeEnum : ENUM8 { + kView = 1; + kProxyView = 2; + kOperate = 3; + kManage = 4; + kAdminister = 5; + } + + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + struct AccessControlTargetStruct { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; + nullable fabric_sensitive int64u subjects[] = 3; + nullable fabric_sensitive AccessControlTargetStruct targets[] = 4; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct AccessControlExtensionStruct { + fabric_sensitive octet_string<128> data = 1; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 { + nullable node_id adminNodeID = 1; + nullable INT16U adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlEntryStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 { + nullable node_id adminNodeID = 1; + nullable INT16U adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlExtensionStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** This cluster provides attributes and events for determining basic information about Nodes, which supports both + Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, + which apply to the whole Node. Also allows setting user device information such as location. */ +server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + + struct CapabilityMinimaStruct { + int16u caseSessionsPerFabric = 0; + int16u subscriptionsPerFabric = 1; + } + + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + fabric_idx fabricIndex = 0; + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + readonly attribute int16u dataModelRevision = 0; + readonly attribute char_string<32> vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string<32> productName = 3; + readonly attribute int16u productID = 4; + attribute access(write: manage) char_string<32> nodeLabel = 5; + attribute access(write: administer) char_string<2> location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string<64> hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute char_string<16> manufacturingDate = 11; + readonly attribute char_string<32> partNumber = 12; + readonly attribute long_char_string<256> productURL = 13; + readonly attribute char_string<64> productLabel = 14; + readonly attribute char_string<32> serialNumber = 15; + attribute access(write: manage) boolean localConfigDisabled = 16; + readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** This cluster is used to manage global aspects of the Commissioning flow. */ +server cluster GeneralCommissioning = 48 { + enum CommissioningErrorEnum : ENUM8 { + kOK = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNoFailSafe = 3; + kBusyWithOtherAdmin = 4; + } + + enum RegulatoryLocationTypeEnum : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfo { + int16u failSafeExpiryLengthSeconds = 0; + int16u maxCumulativeFailsafeSeconds = 1; + } + + attribute access(write: administer) int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; + readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; + readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationTypeEnum newRegulatoryConfig = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + } + + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse = 3 { + CommissioningErrorEnum errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse = 5 { + CommissioningErrorEnum errorCode = 0; + CHAR_STRING debugText = 1; + } + + command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; +} + +/** Functionality to configure, enable, disable network credentials and access on a Matter device. */ +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatusEnum : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBandEnum : ENUM8 { + k2G4 = 0; + k3G65 = 1; + k5G = 2; + k6G = 3; + k60G = 4; + k1G = 5; + } + + bitmap Feature : BITMAP32 { + kWiFiNetworkInterface = 0x1; + kThreadNetworkInterface = 0x2; + kEthernetNetworkInterface = 0x4; + } + + bitmap WiFiSecurityBitmap : BITMAP8 { + kUnencrypted = 0x1; + kWEP = 0x2; + kWPAPersonal = 0x4; + kWPA2Personal = 0x8; + kWPA3Personal = 0x10; + } + + struct NetworkInfoStruct { + octet_string<32> networkID = 0; + boolean connected = 1; + } + + struct ThreadInterfaceScanResultStruct { + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; + } + + struct WiFiInterfaceScanResultStruct { + WiFiSecurityBitmap security = 0; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; + WiFiBandEnum wiFiBand = 4; + int8s rssi = 5; + } + + readonly attribute access(read: administer) int8u maxNetworks = 0; + readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; + readonly attribute int8u scanMaxTimeSeconds = 2; + readonly attribute int8u connectMaxTimeSeconds = 3; + attribute access(write: administer) boolean interfaceEnabled = 4; + readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; + readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; + readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ScanNetworksRequest { + optional nullable OCTET_STRING<32> ssid = 0; + optional INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING<32> ssid = 0; + OCTET_STRING<64> credentials = 1; + optional INT64U breadcrumb = 2; + } + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING<254> operationalDataset = 0; + optional INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING<32> networkID = 0; + optional INT64U breadcrumb = 1; + } + + request struct ConnectNetworkRequest { + OCTET_STRING<32> networkID = 0; + optional INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING<32> networkID = 0; + INT8U networkIndex = 1; + optional INT64U breadcrumb = 2; + } + + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional CHAR_STRING<512> debugText = 1; + optional INT8U networkIndex = 2; + } + + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional CHAR_STRING debugText = 1; + nullable INT32S errorValue = 2; + } + + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; +} + +/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ +server cluster DiagnosticLogs = 50 { + enum IntentEnum : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum TransferProtocolEnum : ENUM8 { + kResponsePayload = 0; + kBDX = 1; + } + + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct RetrieveLogsRequestRequest { + IntentEnum intent = 0; + TransferProtocolEnum requestedProtocol = 1; + optional CHAR_STRING<32> transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +/** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +server cluster GeneralDiagnostics = 51 { + enum BootReasonEnum : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultEnum : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceTypeEnum : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultEnum : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultEnum : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterface { + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; + InterfaceTypeEnum type = 7; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultEnum current[] = 0; + HardwareFaultEnum previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultEnum current[] = 0; + RadioFaultEnum previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonEnum bootReason = 0; + } + + readonly attribute NetworkInterface networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute int64u upTime = 2; + readonly attribute int32u totalOperationalHours = 3; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute boolean testEventTriggersEnabled = 8; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct TestEventTriggerRequest { + OCTET_STRING<16> enableKey = 0; + INT64U eventTrigger = 1; + } + + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; +} + +/** Commands to trigger a Node to allow a new Administrator to commission it. */ +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatusEnum : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; + } + + readonly attribute CommissioningWindowStatusEnum windowStatus = 0; + readonly attribute nullable fabric_idx adminFabricIndex = 1; + readonly attribute nullable int16u adminVendorId = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEPasscodeVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + } + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; +} + +/** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ +server cluster OperationalCredentials = 62 { + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOK = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInvalidAdminSubject = 6; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + fabric_scoped struct FabricDescriptorStruct { + octet_string<65> rootPublicKey = 1; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; + char_string<32> label = 5; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct NOCStruct { + fabric_sensitive octet_string noc = 1; + nullable fabric_sensitive octet_string icac = 2; + fabric_idx fabricIndex = 254; + } + + readonly attribute access(read: administer) NOCStruct NOCs[] = 0; + readonly attribute FabricDescriptorStruct fabrics[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute OCTET_STRING trustedRootCertificates[] = 4; + readonly attribute int8u currentFabricIndex = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + CertificateChainTypeEnum certificateType = 0; + } + + request struct CSRRequestRequest { + OCTET_STRING CSRNonce = 0; + optional boolean isForUpdateNOC = 1; + } + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + Int64u caseAdminSubject = 3; + VENDOR_ID adminVendorId = 4; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING<32> label = 0; + } + + request struct RemoveFabricRequest { + fabric_idx fabricIndex = 0; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCACertificate = 0; + } + + response struct AttestationResponse = 1 { + OCTET_STRING attestationElements = 0; + OCTET_STRING attestationSignature = 1; + } + + response struct CertificateChainResponse = 3 { + OCTET_STRING certificate = 0; + } + + response struct CSRResponse = 5 { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional CHAR_STRING debugText = 2; + } + + command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; +} + +/** The Group Key Management Cluster is the mechanism by which group keys are managed. */ +server cluster GroupKeyManagement = 63 { + enum GroupKeySecurityPolicyEnum : ENUM8 { + kTrustFirst = 0; + kCacheAndSync = 1; + } + + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + + fabric_scoped struct GroupInfoMapStruct { + group_id groupId = 1; + endpoint_no endpoints[] = 2; + optional char_string<16> groupName = 3; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct GroupKeyMapStruct { + group_id groupId = 1; + int16u groupKeySetID = 2; + fabric_idx fabricIndex = 254; + } + + struct GroupKeySetStruct { + int16u groupKeySetID = 0; + GroupKeySecurityPolicyEnum groupKeySecurityPolicy = 1; + nullable octet_string<16> epochKey0 = 2; + nullable epoch_us epochStartTime0 = 3; + nullable octet_string<16> epochKey1 = 4; + nullable epoch_us epochStartTime1 = 5; + nullable octet_string<16> epochKey2 = 6; + nullable epoch_us epochStartTime2 = 7; + } + + attribute access(write: manage) GroupKeyMapStruct groupKeyMap[] = 0; + readonly attribute GroupInfoMapStruct groupTable[] = 1; + readonly attribute int16u maxGroupsPerFabric = 2; + readonly attribute int16u maxGroupKeysPerFabric = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct KeySetWriteRequest { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetReadRequest { + INT16U groupKeySetID = 0; + } + + request struct KeySetRemoveRequest { + INT16U groupKeySetID = 0; + } + + response struct KeySetReadResponse = 2 { + GroupKeySetStruct groupKeySet = 0; + } + + response struct KeySetReadAllIndicesResponse = 5 { + INT16U groupKeySetIDs[] = 0; + } + + fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; +} + +/** An interface for configuring and controlling the functionality of a thermostat. */ +server cluster Thermostat = 513 { + enum SetpointAdjustMode : ENUM8 { + kHeat = 0; + kCool = 1; + kBoth = 2; + } + + enum ThermostatControlSequence : ENUM8 { + kCoolingOnly = 0; + kCoolingWithReheat = 1; + kHeatingOnly = 2; + kHeatingWithReheat = 3; + kCoolingAndHeating = 4; + kCoolingAndHeatingWithReheat = 5; + } + + enum ThermostatRunningMode : ENUM8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + enum ThermostatSystemMode : ENUM8 { + kOff = 0; + kAuto = 1; + kCool = 3; + kHeat = 4; + kEmergencyHeat = 5; + kPrecooling = 6; + kFanOnly = 7; + kDry = 8; + kSleep = 9; + } + + bitmap DayOfWeek : BITMAP8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap Feature : BITMAP32 { + kHeating = 0x1; + kCooling = 0x2; + kOccupancy = 0x4; + kScheduleConfiguration = 0x8; + kSetback = 0x10; + kAutoMode = 0x20; + kLocalTemperatureNotExposed = 0x40; + } + + bitmap ModeForSequence : BITMAP8 { + kHeatSetpointPresent = 0x1; + kCoolSetpointPresent = 0x2; + } + + struct ThermostatScheduleTransition { + int16u transitionTime = 0; + nullable int16s heatSetpoint = 1; + nullable int16s coolSetpoint = 2; + } + + readonly attribute nullable int16s localTemperature = 0; + readonly attribute int16s absMinCoolSetpointLimit = 5; + readonly attribute int16s absMaxCoolSetpointLimit = 6; + attribute int16s occupiedCoolingSetpoint = 17; + attribute access(write: manage) int16s minCoolSetpointLimit = 23; + attribute access(write: manage) int16s maxCoolSetpointLimit = 24; + attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; + attribute access(write: manage) enum8 systemMode = 28; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct SetpointRaiseLowerRequest { + SetpointAdjustMode mode = 0; + INT8S amount = 1; + } + + command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; +} + +/** An interface for controlling a fan in a heating/cooling system. */ +server cluster FanControl = 514 { + enum AirflowDirectionEnum : ENUM8 { + kForward = 0; + kReverse = 1; + } + + enum FanModeEnum : ENUM8 { + kOff = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kOn = 4; + kAuto = 5; + kSmart = 6; + } + + enum FanModeSequenceEnum : ENUM8 { + kOffLowMedHigh = 0; + kOffLowHigh = 1; + kOffLowMedHighAuto = 2; + kOffLowHighAuto = 3; + kOffOnAuto = 4; + kOffOn = 5; + } + + enum StepDirectionEnum : ENUM8 { + kIncrease = 0; + kDecrease = 1; + } + + bitmap Feature : BITMAP32 { + kMultiSpeed = 0x1; + kAuto = 0x2; + kRocking = 0x4; + kWind = 0x8; + kStep = 0x10; + kAirflowDirection = 0x20; + } + + bitmap RockBitmap : BITMAP8 { + kRockLeftRight = 0x1; + kRockUpDown = 0x2; + kRockRound = 0x4; + } + + bitmap WindBitmap : BITMAP8 { + kSleepWind = 0x1; + kNaturalWind = 0x2; + } + + attribute FanModeEnum fanMode = 0; + attribute FanModeSequenceEnum fanModeSequence = 1; + attribute nullable Percent percentSetting = 2; + readonly attribute Percent percentCurrent = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ +server cluster ThermostatUserInterfaceConfiguration = 516 { + attribute enum8 temperatureDisplayMode = 0; + attribute access(write: manage) enum8 keypadLockout = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +endpoint 0 { + device type rootdevice = 22, version 1; + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + ram attribute featureMap default = 0; + callback attribute clusterRevision default = 1; + } + + server cluster AccessControl { + emits event AccessControlEntryChanged; + emits event AccessControlExtensionChanged; + callback attribute acl; + callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster BasicInformation { + emits event StartUp; + emits event ShutDown; + emits event Leave; + callback attribute dataModelRevision default = 10; + callback attribute vendorName; + callback attribute vendorID; + callback attribute productName; + callback attribute productID; + persist attribute nodeLabel; + callback attribute location default = "XX"; + callback attribute hardwareVersion default = 0; + callback attribute hardwareVersionString; + callback attribute softwareVersion default = 0; + callback attribute softwareVersionString; + callback attribute manufacturingDate default = "20210614123456ZZ"; + callback attribute partNumber; + callback attribute productURL; + callback attribute productLabel; + callback attribute serialNumber; + persist attribute localConfigDisabled default = 0; + callback attribute uniqueID; + callback attribute capabilityMinima; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralCommissioning { + ram attribute breadcrumb default = 0x0000000000000000; + callback attribute basicCommissioningInfo; + callback attribute regulatoryConfig default = 0; + callback attribute locationCapability default = 0; + callback attribute supportsConcurrentConnection default = 1; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + } + + server cluster NetworkCommissioning { + ram attribute maxNetworks; + callback attribute networks; + ram attribute scanMaxTimeSeconds; + ram attribute connectMaxTimeSeconds; + ram attribute interfaceEnabled; + ram attribute lastNetworkingStatus; + ram attribute lastNetworkID; + ram attribute lastConnectErrorValue; + ram attribute featureMap default = 1; + ram attribute clusterRevision default = 0x0001; + } + + server cluster DiagnosticLogs { + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralDiagnostics { + emits event BootReason; + callback attribute networkInterfaces; + callback attribute rebootCount default = 0x0000; + callback attribute upTime default = 0x0000000000000000; + callback attribute totalOperationalHours default = 0x00000000; + callback attribute bootReason; + callback attribute activeHardwareFaults; + callback attribute activeRadioFaults; + callback attribute activeNetworkFaults; + callback attribute testEventTriggersEnabled default = false; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus default = 0; + callback attribute adminFabricIndex default = 1; + callback attribute adminVendorId default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + } + + server cluster OperationalCredentials { + callback attribute NOCs; + callback attribute fabrics; + callback attribute supportedFabrics; + callback attribute commissionedFabrics; + callback attribute trustedRootCertificates; + callback attribute currentFabricIndex; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} +endpoint 1 { + device type anonymousEndpointType = 114, version 1; + + server cluster Identify { + ram attribute identifyTime default = 0x0; + ram attribute identifyType default = 0x0; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute eventList; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 2; + } + + server cluster Groups { + ram attribute nameSupport; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster OnOff { + ram attribute onOff default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 5; + } + + server cluster Descriptor { + callback attribute deviceTypeList default = 0; + callback attribute serverList default = 0; + callback attribute clientList default = 0; + callback attribute partsList default = 0; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute eventList; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster Thermostat { + ram attribute localTemperature; + ram attribute absMinCoolSetpointLimit default = 1600; + ram attribute absMaxCoolSetpointLimit default = 3000; + ram attribute occupiedCoolingSetpoint default = 2600; + ram attribute minCoolSetpointLimit default = 1600; + ram attribute maxCoolSetpointLimit default = 3000; + ram attribute controlSequenceOfOperation default = 0x00; + ram attribute systemMode default = 0x03; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 6; + } + + server cluster FanControl { + ram attribute fanMode default = 0; + ram attribute fanModeSequence default = 2; + ram attribute percentSetting default = 0; + ram attribute percentCurrent default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster ThermostatUserInterfaceConfiguration { + ram attribute temperatureDisplayMode default = 0x01; + ram attribute keypadLockout default = 0x00; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 2; + } +} + + diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap new file mode 100644 index 00000000000000..e050bc914a2c61 --- /dev/null +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap @@ -0,0 +1,11622 @@ +{ + "featureLevel": 97, + "creator": "zap", + "keyValuePairs": [ + { + "key": "commandDiscovery", + "value": "1" + }, + { + "key": "defaultResponsePolicy", + "value": "always" + }, + { + "key": "manufacturerCodes", + "value": "0x1002" + } + ], + "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/zcl/zcl.json", + "type": "zcl-properties", + "category": "matter", + "version": 1, + "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" + } + ], + "endpointTypes": [ + { + "id": 1, + "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "NameSupportBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SceneCount", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentScene", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentGroup", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "group_id", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SceneValid", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NameSupport", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "OnOff", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/off Switch Configuration", + "code": 7, + "mfgCode": null, + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/off Switch Configuration", + "code": 7, + "mfgCode": null, + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "switch type", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "switch actions", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToLevel", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Move", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Step", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Stop", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveToLevelWithOnOff", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StopWithOnOff", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "CurrentLevel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ACL", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Extension", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "AccessControlEntryChanged", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AccessControlExtensionChanged", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DataModelRevision", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductName", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NodeLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Location", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "XX", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersion", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersionString", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersion", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersionString", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "20210614123456ZZ", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductLabel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LocalConfigDisabled", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Reachable", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UniqueID", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StartUp", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ShutDown", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "Leave", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "OTA Software Update Provider", + "code": 41, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "QueryImage", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ApplyUpdateRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "NotifyUpdateApplied", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Provider", + "code": 41, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "QueryImageResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ApplyUpdateResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AnnounceOTAProvider", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "DefaultOTAProviders", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UpdatePossible", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpdateState", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "OTAUpdateStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpdateStateProgress", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StateTransition", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "VersionApplied", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "DownloadError", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "HourFormat", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "HourFormatEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveCalendarType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "CalendarTypeEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedCalendarTypes", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "TemperatureUnit", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "TempUnitEnum", + "included": 0, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "Breadcrumb", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BasicCommissioningInfo", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "BasicCommissioningInfo", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RegulatoryConfig", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocationCapability", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "MaxNetworks", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Networks", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ScanMaxTimeSeconds", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ConnectMaxTimeSeconds", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InterfaceEnabled", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkingStatus", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "NetworkCommissioningStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkID", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastConnectErrorValue", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "RetrieveLogsRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RebootCount", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TotalOperationalHours", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BootReason", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "BootReasonEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveHardwareFaults", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveRadioFaults", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TestEventTriggersEnabled", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "false", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "BootReason", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetWatermarks", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "ThreadMetrics", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapFree", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapUsed", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapHighWatermark", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Channel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RoutingRole", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "RoutingRoleEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NetworkName", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PanId", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ExtendedPanId", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MeshLocalPrefix", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NeighborTable", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RouteTable", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartitionId", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Weighting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DataVersion", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StableDataVersion", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LeaderRouterId", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DetachedRoleCount", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChildRoleCount", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RouterRoleCount", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LeaderRoleCount", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "AttachAttemptCount", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartitionIdChangeCount", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BetterPartitionAttachAttemptCount", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ParentChangeCount", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxTotalCount", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxUnicastCount", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBroadcastCount", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxAckRequestedCount", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxAckedCount", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxNoAckRequestedCount", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDataCount", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDataPollCount", + "code": 29, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBeaconCount", + "code": 30, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBeaconRequestCount", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxOtherCount", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxRetryCount", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDirectMaxRetryExpiryCount", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxIndirectMaxRetryExpiryCount", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCcaCount", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrAbortCount", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrBusyChannelCount", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxTotalCount", + "code": 39, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxUnicastCount", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBroadcastCount", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDataCount", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDataPollCount", + "code": 43, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBeaconCount", + "code": 44, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBeaconRequestCount", + "code": 45, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxOtherCount", + "code": 46, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxAddressFilteredCount", + "code": 47, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDestAddrFilteredCount", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDuplicatedCount", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrNoFrameCount", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrUnknownNeighborCount", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrInvalidSrcAddrCount", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrSecCount", + "code": 53, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrFcsCount", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrOtherCount", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveTimestamp", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PendingTimestamp", + "code": 57, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Delay", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SecurityPolicy", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "SecurityPolicy", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelPage0Mask", + "code": 60, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OperationalDatasetComponents", + "code": 61, + "mfgCode": null, + "side": "server", + "type": "OperationalDatasetComponents", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaultsList", + "code": 62, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x000F", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "BSSID", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SecurityType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "SecurityTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "WiFiVersion", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "WiFiVersionEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelNumber", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RSSI", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BeaconLostCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BeaconRxCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastRxCount", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastTxCount", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastRxCount", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastTxCount", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMaxRate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "PHYRate", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PHYRateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FullDuplex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketRxCount", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PacketTxCount", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCount", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CollisionCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CarrierDetect", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TimeSinceReset", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Switch", + "code": 59, + "mfgCode": null, + "define": "SWITCH_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Switch", + "code": 59, + "mfgCode": null, + "define": "SWITCH_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "OpenBasicCommissioningWindow", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminFabricIndex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "fabric_idx", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Fabrics", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedFabrics", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CommissionedFabrics", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TrustedRootCertificates", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentFabricIndex", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetRead", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetRemove", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetReadResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "KeySetReadAllIndicesResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "GroupKeyMap", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GroupTable", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupsPerFabric", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupKeysPerFabric", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 2, + "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 43, + "code": 114, + "profileId": 259, + "label": "MA-room-airconditioner", + "name": "MA-room-airconditioner" + }, + "deviceTypes": [ + { + "id": 43, + "code": 114, + "profileId": 259, + "label": "MA-room-airconditioner", + "name": "MA-room-airconditioner" + } + ], + "deviceTypeRefs": [ + 43 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 114 + ], + "deviceTypeName": "MA-room-airconditioner", + "deviceTypeCode": 114, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "NameSupportBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SceneCount", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentScene", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentGroup", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "group_id", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SceneValid", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NameSupport", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastConfiguredBy", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "node_id", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SceneTableSize", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingCapacity", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "OnOff", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GlobalSceneControl", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnTime", + "code": 16385, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OffWaitTime", + "code": 16386, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpOnOff", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "OnOffStartUpOnOff", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToLevel", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Move", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Step", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Stop", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToLevelWithOnOff", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StopWithOnOff", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "CurrentLevel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingTime", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinLevel", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxLevel", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFE", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentFrequency", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinFrequency", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxFrequency", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Options", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "LevelControlOptions", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnOffTransitionTime", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnLevel", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnTransitionTime", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OffTransitionTime", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DefaultMoveRate", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpCurrentLevel", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TagList", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Binding", + "code": 30, + "mfgCode": null, + "define": "BINDING_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Binding", + "code": 30, + "mfgCode": null, + "define": "BINDING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Binding", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Door Lock", + "code": 257, + "mfgCode": null, + "define": "DOOR_LOCK_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "LockDoor", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UnlockDoor", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetUser", + "code": 26, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetUser", + "code": 27, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearUser", + "code": 29, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetCredential", + "code": 34, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearCredential", + "code": 38, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "7", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Door Lock", + "code": 257, + "mfgCode": null, + "define": "DOOR_LOCK_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "GetUserResponse", + "code": 28, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetCredentialResponse", + "code": 35, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "LockState", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "DlLockState", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LockType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "DlLockType", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActuatorEnabled", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DoorState", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "DoorStateEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DoorOpenEvents", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DoorClosedEvents", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OpenPeriod", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfTotalUsersSupported", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPINUsersSupported", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfRFIDUsersSupported", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfWeekDaySchedulesSupportedPerUser", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfYearDaySchedulesSupportedPerUser", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfHolidaySchedulesSupported", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxPINCodeLength", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinPINCodeLength", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxRFIDCodeLength", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinRFIDCodeLength", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CredentialRulesSupport", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "DlCredentialRuleMask", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfCredentialsSupportedPerUser", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Language", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LEDSettings", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AutoRelockTime", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SoundVolume", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperatingMode", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "OperatingModeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedOperatingModes", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "DlSupportedOperatingModes", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFFF6", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DefaultConfigurationRegister", + "code": 39, + "mfgCode": null, + "side": "server", + "type": "DlDefaultConfigurationRegister", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnableLocalProgramming", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnableOneTouchLocking", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnableInsideStatusLED", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnablePrivacyModeButton", + "code": 43, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocalProgrammingFeatures", + "code": 44, + "mfgCode": null, + "side": "server", + "type": "DlLocalProgrammingFeatures", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WrongCodeEntryLimit", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UserCodeTemporaryDisableTime", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SendPINOverTheAir", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RequirePINforRemoteOperation", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ExpiringUserTimeout", + "code": 53, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "7", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Barrier Control", + "code": 259, + "mfgCode": null, + "define": "BARRIER_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "BarrierControlGoToPercent", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "BarrierControlStop", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Barrier Control", + "code": 259, + "mfgCode": null, + "define": "BARRIER_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "barrier moving state", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier safety status", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "bitmap16", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier capabilities", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier open events", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier close events", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier command open events", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier command close events", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier open period", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier close period", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier position", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Thermostat", + "code": 513, + "mfgCode": null, + "define": "THERMOSTAT_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "SetpointRaiseLower", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Thermostat", + "code": 513, + "mfgCode": null, + "define": "THERMOSTAT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "LocalTemperature", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OutdoorTemperature", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Occupancy", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AbsMinHeatSetpointLimit", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "700", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AbsMaxHeatSetpointLimit", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AbsMinCoolSetpointLimit", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1600", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AbsMaxCoolSetpointLimit", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PICoolingDemand", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PIHeatingDemand", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "HVACSystemTypeConfiguration", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocalTemperatureCalibration", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupiedCoolingSetpoint", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2600", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupiedHeatingSetpoint", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UnoccupiedCoolingSetpoint", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2600", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UnoccupiedHeatingSetpoint", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinHeatSetpointLimit", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "700", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxHeatSetpointLimit", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinCoolSetpointLimit", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1600", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxCoolSetpointLimit", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinSetpointDeadBand", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "25", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemoteSensing", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ControlSequenceOfOperation", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "ThermostatControlSequence", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SystemMode", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x03", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ThermostatRunningMode", + "code": 30, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartOfWeek", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfWeeklyTransitions", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfDailyTransitions", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TemperatureSetpointHold", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TemperatureSetpointHoldDuration", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFFFF", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ThermostatProgrammingOperationMode", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ThermostatRunningState", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "bitmap16", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SetpointChangeSource", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SetpointChangeAmount", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SetpointChangeSourceTimestamp", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "epoch_s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupiedSetback", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupiedSetbackMin", + "code": 53, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupiedSetbackMax", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UnoccupiedSetback", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UnoccupiedSetbackMin", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UnoccupiedSetbackMax", + "code": 57, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EmergencyHeatDelta", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACType", + "code": 64, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACCapacity", + "code": 65, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACRefrigerantType", + "code": 66, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACCompressorType", + "code": 67, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACErrorCode", + "code": 68, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACLouverPosition", + "code": 69, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACCoilTemperature", + "code": 70, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACCapacityformat", + "code": 71, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "6", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Fan Control", + "code": 514, + "mfgCode": null, + "define": "FAN_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Fan Control", + "code": 514, + "mfgCode": null, + "define": "FAN_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "FanMode", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "FanModeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FanModeSequence", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "FanModeSequenceEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PercentSetting", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "Percent", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PercentCurrent", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "Percent", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpeedMax", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpeedSetting", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpeedCurrent", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RockSupport", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "RockBitmap", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RockSetting", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "RockBitmap", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WindSupport", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "WindBitmap", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WindSetting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "WindBitmap", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AirflowDirection", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "AirflowDirectionEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Thermostat User Interface Configuration", + "code": 516, + "mfgCode": null, + "define": "THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Thermostat User Interface Configuration", + "code": 516, + "mfgCode": null, + "define": "THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "TemperatureDisplayMode", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "KeypadLockout", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ScheduleProgrammingVisibility", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Color Control", + "code": 768, + "mfgCode": null, + "define": "COLOR_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToHue", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveHue", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepHue", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToSaturation", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveSaturation", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepSaturation", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToHueAndSaturation", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToColor", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveColor", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepColor", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToColorTemperature", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StopMoveStep", + "code": 71, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveColorTemperature", + "code": 75, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepColorTemperature", + "code": 76, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Color Control", + "code": 768, + "mfgCode": null, + "define": "COLOR_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "CurrentHue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentSaturation", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentX", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x616B", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentY", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x607D", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DriftCompensation", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CompensationText", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorTemperatureMireds", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00FA", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorMode", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Options", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPrimaries", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary1X", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary1Y", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary1Intensity", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary2X", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary2Y", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary2Intensity", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary3X", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary3Y", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary3Intensity", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary4X", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary4Y", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary4Intensity", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary5X", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary5Y", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary5Intensity", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6X", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6Y", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6Intensity", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WhitePointX", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WhitePointY", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointRX", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointRY", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointRIntensity", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointGX", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointGY", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointGIntensity", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointBX", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointBY", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointBIntensity", + "code": 60, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnhancedCurrentHue", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnhancedColorMode", + "code": 16385, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopActive", + "code": 16386, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopDirection", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopTime", + "code": 16388, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0019", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopStartEnhancedHue", + "code": 16389, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x2300", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopStoredEnhancedHue", + "code": 16390, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorCapabilities", + "code": 16394, + "mfgCode": null, + "side": "server", + "type": "bitmap16", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorTempPhysicalMinMireds", + "code": 16395, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorTempPhysicalMaxMireds", + "code": 16396, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFEFF", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CoupleColorTempToLevelMinMireds", + "code": 16397, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpColorTemperatureMireds", + "code": 16400, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMPERATURE_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMPERATURE_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Tolerance", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Occupancy Sensing", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Occupancy Sensing", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Occupancy", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "OccupancyBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupancySensorType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupancySensorTypeBitmap", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PIROccupiedToUnoccupiedDelay", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PIRUnoccupiedToOccupiedDelay", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PIRUnoccupiedToOccupiedThreshold", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UltrasonicOccupiedToUnoccupiedDelay", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UltrasonicUnoccupiedToOccupiedDelay", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UltrasonicUnoccupiedToOccupiedThreshold", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PhysicalContactOccupiedToUnoccupiedDelay", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PhysicalContactUnoccupiedToOccupiedDelay", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PhysicalContactUnoccupiedToOccupiedThreshold", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0 + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0 + } + ], + "log": [] +} \ No newline at end of file diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap index 2a6dbf5b9ce81d..3e9137e4de49c1 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -6599,5 +6599,6 @@ "endpointVersion": 1, "deviceIdentifier": 34 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap index f1dbfdd711a930..ec498c5a4cb846 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -6367,5 +6367,6 @@ "endpointVersion": 1, "deviceIdentifier": 770 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap index 4ab16c9f1ee7b1..e71fbc336eceaf 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7847,5 +7847,6 @@ "endpointVersion": 1, "deviceIdentifier": 769 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap index df025f16b7344f..2ed25d1db597e8 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7049,5 +7049,6 @@ "endpointVersion": 1, "deviceIdentifier": 514 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/template.zap b/examples/chef/devices/template.zap index 4112ca37d54124..3df60484a7fb27 100644 --- a/examples/chef/devices/template.zap +++ b/examples/chef/devices/template.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -5478,7 +5478,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5494,7 +5494,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5538,7 +5538,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5742,7 +5742,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5786,7 +5786,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6010,11 +6010,11 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6030,7 +6030,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6046,7 +6046,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6062,7 +6062,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6078,7 +6078,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6122,7 +6122,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6138,7 +6138,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6154,7 +6154,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6170,7 +6170,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6186,7 +6186,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6392,7 +6392,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6408,7 +6408,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6424,7 +6424,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6440,7 +6440,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6610,7 +6610,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6830,7 +6830,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6846,7 +6846,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6862,7 +6862,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6878,7 +6878,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6998,7 +6998,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7014,7 +7014,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7030,7 +7030,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7074,7 +7074,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7238,7 +7238,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8006,7 +8006,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8022,7 +8022,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8038,7 +8038,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8054,7 +8054,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8332,7 +8332,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8348,7 +8348,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8364,7 +8364,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8380,7 +8380,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8630,7 +8630,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8678,7 +8678,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8694,7 +8694,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8726,7 +8726,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x01", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8742,7 +8742,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8758,7 +8758,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8774,7 +8774,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8790,7 +8790,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8806,7 +8806,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8822,7 +8822,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8838,7 +8838,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8854,7 +8854,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8870,7 +8870,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8886,7 +8886,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8902,7 +8902,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8918,7 +8918,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8934,7 +8934,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8950,7 +8950,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8966,7 +8966,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8982,7 +8982,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8998,7 +8998,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9014,7 +9014,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9030,7 +9030,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9046,7 +9046,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9062,7 +9062,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9078,7 +9078,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9094,7 +9094,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9110,7 +9110,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9126,7 +9126,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9142,7 +9142,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9158,7 +9158,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9174,7 +9174,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9190,7 +9190,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9206,7 +9206,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9222,7 +9222,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9238,7 +9238,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9254,7 +9254,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x01", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9270,7 +9270,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9286,7 +9286,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9302,7 +9302,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0019", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9350,7 +9350,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9366,7 +9366,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9382,7 +9382,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0xFEFF", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9398,7 +9398,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9414,7 +9414,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9426,7 +9426,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9442,7 +9442,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9458,7 +9458,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9474,7 +9474,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9638,7 +9638,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9654,7 +9654,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9670,7 +9670,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9686,7 +9686,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/chef/esp32/sdkconfig.defaults b/examples/chef/esp32/sdkconfig.defaults index ca2cd09fcd1541..bd714ab0202833 100644 --- a/examples/chef/esp32/sdkconfig.defaults +++ b/examples/chef/esp32/sdkconfig.defaults @@ -59,3 +59,6 @@ CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +# IRAM optimizations +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y diff --git a/examples/chef/esp32/sdkconfig_rpc.defaults b/examples/chef/esp32/sdkconfig_rpc.defaults index caac0212b3b17a..a1506dd52891bc 100644 --- a/examples/chef/esp32/sdkconfig_rpc.defaults +++ b/examples/chef/esp32/sdkconfig_rpc.defaults @@ -58,3 +58,6 @@ CONFIG_ESPTOOLPY_FLASHSIZE="4MB" # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +# IRAM optimizations +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y diff --git a/examples/chef/sample_app_util/matter_device_types.json b/examples/chef/sample_app_util/matter_device_types.json index b09cbf7fe26778..53b418e1fc916d 100644 --- a/examples/chef/sample_app_util/matter_device_types.json +++ b/examples/chef/sample_app_util/matter_device_types.json @@ -41,5 +41,7 @@ "Video Remote Control": 42, "Mode Select": 39, "Air Purifier": 45, - "Air Quality Sensor": 44 + "Air Quality Sensor": 44, + "Robotic Vacuum Cleaner": 116, + "Room Air Conditioner": 114 } diff --git a/examples/common/m5stack-tft/repo b/examples/common/m5stack-tft/repo index 3344a8105f8dfe..a6299b6c7c0b2e 160000 --- a/examples/common/m5stack-tft/repo +++ b/examples/common/m5stack-tft/repo @@ -1 +1 @@ -Subproject commit 3344a8105f8dfecb95832f369733cf6f863a1662 +Subproject commit a6299b6c7c0b2e3eb62fa08ee4bf7155c39bad1f diff --git a/examples/common/screen-framework/CMakeLists.txt b/examples/common/screen-framework/CMakeLists.txt index 5b5739e12c2df5..af304459ea69e3 100644 --- a/examples/common/screen-framework/CMakeLists.txt +++ b/examples/common/screen-framework/CMakeLists.txt @@ -1,6 +1,12 @@ +set(require_list chip driver) + +if(${IDF_TARGET} STREQUAL "esp32") + list(APPEND require_list tft) +endif() + idf_component_register(SRCS "Display.cpp" "ScreenManager.cpp" "Screen.cpp" "ListScreen.cpp" INCLUDE_DIRS "include" - PRIV_REQUIRES tft chip driver) + REQUIRES ${require_list}) diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap index fc310d97ca9bdd..cbc839b2f547a2 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -8785,5 +8785,6 @@ "endpointVersion": 1, "deviceIdentifier": 21 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.h b/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.h index 334d2339536b15..04d65bdf565db0 100644 --- a/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.h +++ b/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.h @@ -28,6 +28,7 @@ @property MTRDeviceController * commissioner; @property MTRCommissioningParameters * params; +- (void)controller:(MTRDeviceController *)controller statusUpdate:(MTRCommissioningStatus)status; - (void)controller:(MTRDeviceController *)controller commissioningSessionEstablishmentDone:(NSError *)error; - (void)controller:(MTRDeviceController *)controller commissioningComplete:(NSError *)error; diff --git a/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.mm b/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.mm index b5166d8b707b54..b3476119c224b5 100644 --- a/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.mm +++ b/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.mm @@ -23,7 +23,7 @@ @interface CHIPToolDeviceControllerDelegate () @end @implementation CHIPToolDeviceControllerDelegate -- (void)onStatusUpdate:(MTRCommissioningStatus)status +- (void)controller:(MTRDeviceController *)controller statusUpdate:(MTRCommissioningStatus)status { NSLog(@"Pairing Status Update: %tu", status); switch (status) { diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap b/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap index bcf0f6675a4cad..ecf62fc64b33d5 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -16,12 +16,6 @@ } ], "package": [ - { - "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" - }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl.json", @@ -29,6 +23,12 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" } ], "endpointTypes": [ @@ -8900,7 +8900,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8932,7 +8932,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.zap b/examples/light-switch-app/light-switch-common/light-switch-app.zap index 21e9efcf621d77..fd8e23449ecf4e 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.zap +++ b/examples/light-switch-app/light-switch-common/light-switch-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -4879,7 +4879,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3", @@ -4895,7 +4895,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/light-switch-app/silabs/README.md b/examples/light-switch-app/silabs/README.md index 9ca79a80e2bd41..197a2ae7ea424c 100644 --- a/examples/light-switch-app/silabs/README.md +++ b/examples/light-switch-app/silabs/README.md @@ -131,9 +131,9 @@ Silicon Labs platform. ./scripts/examples/gn_silabs_example.sh examples/light-switch-app/silabs/efr32/ out/light-switch-app BRD4187C chip_build_libshell=true -* Build the example as Sleepy End Device (SED) +* Build the example as Intermittently Connected Device (ICD) - $ ./scripts/examples/gn_silabs_example.sh ./examples/light-switch-app/silabs/efr32/ ./out/light-switch-app_SED BRD4187C --sed + $ ./scripts/examples/gn_silabs_example.sh ./examples/light-switch-app/silabs/efr32/ ./out/light-switch-app_ICD BRD4187C --icd or use gn as previously mentioned but adding the following arguments: diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap index 55e2476e6c87ad..f70ddb258429ec 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap index f5c6ce65b0d768..181fd612155a8a 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { diff --git a/examples/lighting-app/esp32/CMakeLists.txt b/examples/lighting-app/esp32/CMakeLists.txt index b37c8154a45208..356a3cd14d6b64 100644 --- a/examples/lighting-app/esp32/CMakeLists.txt +++ b/examples/lighting-app/esp32/CMakeLists.txt @@ -26,15 +26,14 @@ include(${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/cm set(EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/config/esp32/components" - "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/QRCode" + "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common" ) if(${IDF_TARGET} STREQUAL "esp32") - list(APPEND EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components/tft" - "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components/spidriver" - "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/screen-framework") + list(APPEND EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components") endif() + project(chip-lighting-app) # WARNING: This is just an example for using key for decrypting the encrypted OTA image diff --git a/examples/lighting-app/esp32/main/CMakeLists.txt b/examples/lighting-app/esp32/main/CMakeLists.txt index b6e29691bacd23..fcb0121d9f6d78 100644 --- a/examples/lighting-app/esp32/main/CMakeLists.txt +++ b/examples/lighting-app/esp32/main/CMakeLists.txt @@ -69,6 +69,10 @@ set(SRC_DIRS_LIST set(PRIV_REQUIRES_LIST chip QRCode bt led_strip app_update openthread driver nvs_flash spi_flash) +if(${IDF_TARGET} STREQUAL "esp32") + list(APPEND PRIV_REQUIRES_LIST spidriver screen-framework) +endif() + if (CONFIG_ENABLE_PW_RPC) # Append additional directories for RPC build set(PRIV_INCLUDE_DIRS_LIST "${PRIV_INCLUDE_DIRS_LIST}" @@ -77,8 +81,14 @@ set(PRIV_INCLUDE_DIRS_LIST "${PRIV_INCLUDE_DIRS_LIST}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/lib/support" - "${IDF_PATH}/components/freertos/include/freertos" ) + +if (${IDF_VERSION_MAJOR} LESS 5) + list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/include/freertos") +else() + list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/FreeRTOS-Kernel/include/freertos") +endif() + set(SRC_DIRS_LIST "${SRC_DIRS_LIST}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" @@ -86,10 +96,6 @@ set(SRC_DIRS_LIST "${SRC_DIRS_LIST}" ) endif (CONFIG_ENABLE_PW_RPC) -if (CONFIG_HAVE_DISPLAY) - list(APPEND PRIV_REQUIRES_LIST tft screen-framework) -endif() - idf_component_register(PRIV_INCLUDE_DIRS ${PRIV_INCLUDE_DIRS_LIST} SRC_DIRS ${SRC_DIRS_LIST} PRIV_REQUIRES ${PRIV_REQUIRES_LIST}) diff --git a/examples/lighting-app/esp32/sdkconfig.defaults b/examples/lighting-app/esp32/sdkconfig.defaults index 59c0af656896f0..f87a164ae41dd2 100644 --- a/examples/lighting-app/esp32/sdkconfig.defaults +++ b/examples/lighting-app/esp32/sdkconfig.defaults @@ -58,3 +58,6 @@ CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +# Disable Read Client +CONFIG_DISABLE_READ_CLIENT=y diff --git a/examples/lighting-app/esp32/sdkconfig_m5stack.defaults b/examples/lighting-app/esp32/sdkconfig_m5stack.defaults index 95d805aa75b55e..be4c85a9c4bb14 100644 --- a/examples/lighting-app/esp32/sdkconfig_m5stack.defaults +++ b/examples/lighting-app/esp32/sdkconfig_m5stack.defaults @@ -65,3 +65,7 @@ CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +# Optimize IRAM +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y + diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index c3bb8210d8447e..b972b176452241 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7758,5 +7758,6 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/lighting-app/linux/args.gni b/examples/lighting-app/linux/args.gni index d07e8c87cdb15c..4c205a5cef34a5 100644 --- a/examples/lighting-app/linux/args.gni +++ b/examples/lighting-app/linux/args.gni @@ -27,3 +27,5 @@ chip_project_config_include_dirs = chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] matter_enable_tracing_support = true + +chip_enable_read_client = false diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.zap b/examples/lighting-app/nxp/zap/lighting-on-off.zap index c21d9c92bbd394..80af441b327af0 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.zap +++ b/examples/lighting-app/nxp/zap/lighting-on-off.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -9113,5 +9113,6 @@ "endpointVersion": 1, "deviceIdentifier": 256 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/lighting-app/qpg/zap/light.zap b/examples/lighting-app/qpg/zap/light.zap index 856776883b1037..d1924fe594705d 100644 --- a/examples/lighting-app/qpg/zap/light.zap +++ b/examples/lighting-app/qpg/zap/light.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { diff --git a/examples/lighting-app/silabs/README.md b/examples/lighting-app/silabs/README.md index 4d7c873aeff09a..4834ef56a9ac1c 100644 --- a/examples/lighting-app/silabs/README.md +++ b/examples/lighting-app/silabs/README.md @@ -123,9 +123,9 @@ Silicon Labs platform. $ cd ~/connectedhomeip/examples/lighting-app/silabs/efr32 $ rm -rf out/ -* Build the example as Sleepy End Device (SED) +* Build the example as Intermittently Connected Device (ICD) - $ ./scripts/examples/gn_silabs_example.sh ./examples/lighting-app/silabs/efr32/ ./out/lighting-app_SED BRD4187C --sed + $ ./scripts/examples/gn_silabs_example.sh ./examples/lighting-app/silabs/efr32/ ./out/lighting-app_ICD BRD4187C --icd or use gn as previously mentioned but adding the following arguments: diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap index 233178fe4f6ced..978b68609f1e6d 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -5574,7 +5574,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "500", @@ -5590,7 +5590,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "300", @@ -5606,7 +5606,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "300", @@ -5638,7 +5638,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5654,7 +5654,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -7760,7 +7760,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap index b300942fd346eb..048d6ef499fe67 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7854,7 +7854,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/lock-app/esp32/main/CMakeLists.txt b/examples/lock-app/esp32/main/CMakeLists.txt index bf9edad36d7f7e..a6aded6af0065c 100644 --- a/examples/lock-app/esp32/main/CMakeLists.txt +++ b/examples/lock-app/esp32/main/CMakeLists.txt @@ -19,6 +19,13 @@ get_filename_component(CHIP_ROOT ${CMAKE_SOURCE_DIR}/third_party/connectedhomeip REALPATH) if (CONFIG_ENABLE_PW_RPC) + +if (${IDF_VERSION_MAJOR} LESS 5) + set(freertos_include_path "${IDF_PATH}/components/freertos/include/freertos") +else() + set(freertos_include_path "${IDF_PATH}/components/freertos/FreeRTOS-Kernel/include/freertos") +endif() + idf_component_register(INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/pw_sys_io/public" @@ -30,7 +37,7 @@ idf_component_register(INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/lib/support" "${CMAKE_CURRENT_LIST_DIR}/include" - "${IDF_PATH}/components/freertos/include/freertos" + "${freertos_include_path}" SRC_DIRS "${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" @@ -43,6 +50,7 @@ idf_component_register(INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/icd" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/access-control-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/administrator-commissioning-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/basic-information" @@ -67,6 +75,7 @@ idf_component_register(INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/door-lock-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/identify-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/groups-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/icd-management-server" PRIV_REQUIRES bt chip QRCode nvs_flash driver) add_dependencies(${COMPONENT_LIB} app-codegen) @@ -155,6 +164,7 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/icd" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/access-control-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/administrator-commissioning-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/basic-information" @@ -182,7 +192,8 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/door-lock-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/identify-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/groups-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/lock" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/icd-management-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/lock" PRIV_REQUIRES chip QRCode bt nvs_flash driver) add_dependencies(${COMPONENT_LIB} app-codegen) diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 1fda0929962ee8..61dbeb11e226af 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -1662,6 +1662,30 @@ server cluster UserLabel = 65 { readonly attribute int16u clusterRevision = 65533; } +/** Allows servers to ensure that listed clients are notified when a server is available for communication. */ +server cluster IcdManagement = 70 { + bitmap Feature : BITMAP32 { + kCheckInProtocolSupport = 0x1; + } + + fabric_scoped struct MonitoringRegistrationStruct { + fabric_sensitive node_id checkInNodeID = 1; + fabric_sensitive int64u monitoredSubject = 2; + fabric_sensitive octet_string<16> key = 3; + fabric_idx fabricIndex = 254; + } + + readonly attribute int32u idleModeInterval = 0; + readonly attribute int32u activeModeInterval = 1; + readonly attribute int16u activeModeThreshold = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + /** An interface to a generic way to secure a door */ server cluster DoorLock = 257 { enum AlarmCodeEnum : ENUM8 { @@ -2541,6 +2565,14 @@ endpoint 0 { ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } + + server cluster IcdManagement { + callback attribute idleModeInterval default = 500; + callback attribute activeModeInterval default = 300; + callback attribute activeModeThreshold default = 300; + ram attribute featureMap default = 0x0000; + ram attribute clusterRevision default = 1; + } } endpoint 1 { device type doorlock = 10, version 1; diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index 12eaaaa40f4a66..c097b1b20df20b 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -5322,6 +5322,260 @@ } ] }, + { + "name": "ICD Management", + "code": 70, + "mfgCode": null, + "define": "ICD_MANAGEMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "ICD Management", + "code": 70, + "mfgCode": null, + "define": "ICD_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "RegisterClientResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "IdleModeInterval", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "500", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveModeInterval", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "300", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveModeThreshold", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "300", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RegisteredClients", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ICDCounter", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientsSupportedPerFabric", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Occupancy Sensing", "code": 1030, diff --git a/examples/lock-app/nxp/zap/lock-app.zap b/examples/lock-app/nxp/zap/lock-app.zap index 3503d6e3b35e36..e570feec238688 100644 --- a/examples/lock-app/nxp/zap/lock-app.zap +++ b/examples/lock-app/nxp/zap/lock-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -6720,5 +6720,6 @@ "endpointVersion": 1, "deviceIdentifier": 10 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/lock-app/qpg/zap/lock.zap b/examples/lock-app/qpg/zap/lock.zap index 56923296c6210a..b51392cfaf1cc6 100644 --- a/examples/lock-app/qpg/zap/lock.zap +++ b/examples/lock-app/qpg/zap/lock.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { diff --git a/examples/lock-app/silabs/README.md b/examples/lock-app/silabs/README.md index 2d6cb8722a8dce..67fb889b41eb7e 100644 --- a/examples/lock-app/silabs/README.md +++ b/examples/lock-app/silabs/README.md @@ -130,10 +130,10 @@ Mac OS X $ rm -rf out/ ``` -* Build the example as Sleepy End Device (SED) +* Build the example as Intermittently Connected Device (ICD) ``` - $ ./scripts/examples/gn_silabs_example.sh ./examples/lock-app/silabs/efr32/ ./out/lock-app_SED BRD4187C --sed + $ ./scripts/examples/gn_silabs_example.sh ./examples/lock-app/silabs/efr32/ ./out/lock-app_ICD BRD4187C --icd ``` or use gn as previously mentioned but adding the following arguments: diff --git a/examples/lock-app/silabs/openthread.gn b/examples/lock-app/silabs/openthread.gn index b05216fc9d7eae..27aa6c766a17e6 100644 --- a/examples/lock-app/silabs/openthread.gn +++ b/examples/lock-app/silabs/openthread.gn @@ -23,7 +23,7 @@ check_system_includes = true default_args = { target_cpu = "arm" target_os = "freertos" - chip_openthread_ftd = true + chip_openthread_ftd = false import("//openthread.gni") } diff --git a/examples/lock-app/silabs/openthread.gni b/examples/lock-app/silabs/openthread.gni index 9d7fbf28634308..570d5e804f6c4d 100644 --- a/examples/lock-app/silabs/openthread.gni +++ b/examples/lock-app/silabs/openthread.gni @@ -24,3 +24,17 @@ chip_enable_openthread = true openthread_external_platform = "${chip_root}/third_party/openthread/platforms/efr32:libopenthread-efr32" + +# ICD Default configurations +chip_enable_icd_server = true +chip_subscription_timeout_resumption = false +sl_use_subscription_synching = true + +# Openthread Configuration flags +sl_ot_idle_interval_ms = 5000 # 5s Idle Intervals +sl_ot_active_interval_ms = 500 # 500ms Active Intervals + +# ICD Matter Configuration flags +sl_idle_mode_interval_ms = 600000 # 10min Idle Mode Interval +sl_active_mode_interval_ms = 10000 # 10s Active Mode Interval +sl_active_mode_threshold_ms = 1000 # 1s Active Mode Threshold diff --git a/examples/log-source-app/log-source-common/log-source-app.matter b/examples/log-source-app/log-source-common/log-source-app.matter index ee666599859620..7308cbab74cd68 100644 --- a/examples/log-source-app/log-source-common/log-source-app.matter +++ b/examples/log-source-app/log-source-common/log-source-app.matter @@ -498,6 +498,7 @@ server cluster OperationalCredentials = 62 { } endpoint 0 { + device type anonymousEndpointType = 0, version 1; binding cluster DiagnosticLogs; server cluster AccessControl { diff --git a/examples/log-source-app/log-source-common/log-source-app.zap b/examples/log-source-app/log-source-common/log-source-app.zap index 81fc0a96b3a020..471aecc6982341 100644 --- a/examples/log-source-app/log-source-common/log-source-app.zap +++ b/examples/log-source-app/log-source-common/log-source-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -3527,5 +3527,6 @@ "endpointVersion": 1, "deviceIdentifier": null } - ] + ], + "log": [] } \ No newline at end of file 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 f8dd677884022c..ecce96b7a0caab 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 @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -4991,5 +4991,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 6a3633f442ac64..10c61e162900f2 100644 --- a/examples/ota-requestor-app/esp32/main/CMakeLists.txt +++ b/examples/ota-requestor-app/esp32/main/CMakeLists.txt @@ -72,8 +72,14 @@ set(PRIV_INCLUDE_DIRS_LIST "${PRIV_INCLUDE_DIRS_LIST}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/lib/support" - "${IDF_PATH}/components/freertos/include/freertos" ) + +if (${IDF_VERSION_MAJOR} LESS 5) + list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/include/freertos") +else() + list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/FreeRTOS-Kernel/include/freertos") +endif() + set(SRC_DIRS_LIST "${SRC_DIRS_LIST}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" 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 5fbd879ead4619..5a2b1f80a99eef 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 @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7468,5 +7468,6 @@ "endpointVersion": 1, "deviceIdentifier": 61442 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/pigweed-app/esp32/main/CMakeLists.txt b/examples/pigweed-app/esp32/main/CMakeLists.txt index 005f587b70b50c..e06bb5a5296a14 100644 --- a/examples/pigweed-app/esp32/main/CMakeLists.txt +++ b/examples/pigweed-app/esp32/main/CMakeLists.txt @@ -14,6 +14,12 @@ # See the License for the specific language governing permissions and # limitations under the License. +if (${IDF_VERSION_MAJOR} LESS 5) + set(freertos_include_path "${IDF_PATH}/components/freertos/include/freertos") +else() + set(freertos_include_path "${IDF_PATH}/components/freertos/FreeRTOS-Kernel/include/freertos") +endif() + idf_component_register(INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/pw_sys_io/public" @@ -21,7 +27,7 @@ idf_component_register(INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/lib/support" - "${IDF_PATH}/components/freertos/include/freertos" + "${freertos_include_path}" SRC_DIRS "${CMAKE_CURRENT_LIST_DIR}" diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index 3ad0e22790dde0..a13f3c1ac90309 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -1708,7 +1708,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14553,7 +14553,7 @@ ], "endpoints": [ { - "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeName": "MA-rootdevice", "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap index 40723d94cd9583..28aee033676628 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -14579,7 +14579,7 @@ ], "endpoints": [ { - "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeName": "MA-rootdevice", "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, diff --git a/examples/platform/esp32/PigweedLogger.cpp b/examples/platform/esp32/PigweedLogger.cpp index e7bb260f9da034..d10b89bcd9f69f 100644 --- a/examples/platform/esp32/PigweedLogger.cpp +++ b/examples/platform/esp32/PigweedLogger.cpp @@ -138,7 +138,7 @@ extern "C" void __wrap_esp_log_writev(esp_log_level_t level, const char * tag, c PigweedLogger::putString(logColor, strlen(logColor)); char formattedMsg[CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE]; - size_t len = snprintf(formattedMsg, sizeof formattedMsg, " (%u) %s: ", esp_log_timestamp(), tag); + size_t len = snprintf(formattedMsg, sizeof formattedMsg, " (%" PRIu32 ") %s: ", esp_log_timestamp(), tag); PigweedLogger::putString(formattedMsg, len); memset(formattedMsg, 0, sizeof formattedMsg); diff --git a/examples/platform/silabs/ICDSubscriptionCallback.cpp b/examples/platform/silabs/ICDSubscriptionCallback.cpp deleted file mode 100644 index eba28968085d60..00000000000000 --- a/examples/platform/silabs/ICDSubscriptionCallback.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - * - * Copyright (c) 2023 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 "ICDSubscriptionCallback.h" -#include - -CHIP_ERROR ICDSubscriptionCallback::OnSubscriptionRequested(chip::app::ReadHandler & aReadHandler, - chip::Transport::SecureSession & aSecureSession) -{ - using namespace chip::System::Clock; - - Seconds32 interval_s32 = std::chrono::duration_cast(CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL); - - if (interval_s32 > Seconds16::max()) - { - interval_s32 = Seconds16::max(); - } - uint32_t decidedMaxInterval = interval_s32.count(); - - uint16_t requestedMinInterval = 0; - uint16_t requestedMaxInterval = 0; - aReadHandler.GetReportingIntervals(requestedMinInterval, requestedMaxInterval); - - // If requestedMinInterval is greater than IdleTimeInterval, select next wake up time as max interval - if (requestedMinInterval > decidedMaxInterval) - { - uint16_t ratio = requestedMinInterval / decidedMaxInterval; - if (requestedMinInterval % decidedMaxInterval) - { - ratio++; - } - - decidedMaxInterval *= ratio; - } - - // Verify that decidedMaxInterval is an acceptable value - if (decidedMaxInterval > Seconds16::max().count()) - { - decidedMaxInterval = Seconds16::max().count(); - } - - // Verify that the decidedMaxInterval respects MAX(SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT, MaxIntervalCeiling) - uint16_t maximumMaxInterval = std::max(kSubscriptionMaxIntervalPublisherLimit, requestedMaxInterval); - if (decidedMaxInterval > maximumMaxInterval) - { - decidedMaxInterval = maximumMaxInterval; - } - - return aReadHandler.SetMaxReportingInterval(decidedMaxInterval); -} diff --git a/examples/platform/silabs/ICDSubscriptionCallback.h b/examples/platform/silabs/ICDSubscriptionCallback.h deleted file mode 100644 index c9f77e6df2a3c6..00000000000000 --- a/examples/platform/silabs/ICDSubscriptionCallback.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * - * Copyright (c) 2023 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 - -/** - * @brief The goal of the ICDSubscriptionCallback class is to negotiate the max interval subscription to match the idle interval of - * the IC device. When a subscription is requested, the device will change the requested max interval to match its idle time - * interval through the OnSubscriptionRequested function. - */ -class ICDSubscriptionCallback : public chip::app::ReadHandler::ApplicationCallback -{ - /** - * @brief Function called when a subscription is requested. - * An ICD will use this function to negotiate the subscription max interval to match its idle time interval - */ - CHIP_ERROR OnSubscriptionRequested(chip::app::ReadHandler & aReadHandler, - chip::Transport::SecureSession & aSecureSession) override; -}; diff --git a/examples/platform/silabs/MatterConfig.cpp b/examples/platform/silabs/MatterConfig.cpp index 9c2253233f79e7..836e2a777c3699 100644 --- a/examples/platform/silabs/MatterConfig.cpp +++ b/examples/platform/silabs/MatterConfig.cpp @@ -58,10 +58,6 @@ static chip::DeviceLayer::Internal::Efr32PsaOperationalKeystore gOperationalKeys #include #include -#ifdef CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS -ICDSubscriptionCallback SilabsMatterConfig::mICDSubscriptionHandler; -#endif // CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS - #if CHIP_ENABLE_OPENTHREAD #include #include @@ -222,11 +218,6 @@ CHIP_ERROR SilabsMatterConfig::InitMatter(const char * appName) // Init Matter Server and Start Event Loop err = chip::Server::GetInstance().Init(initParams); -#ifdef CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS - // Register ICD subscription callback to match subscription max intervals to its idle time interval - chip::app::InteractionModelEngine::GetInstance()->RegisterReadHandlerAppCallback(&mICDSubscriptionHandler); -#endif // CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS - chip::DeviceLayer::PlatformMgr().UnlockChipStack(); ReturnErrorOnFailure(err); diff --git a/examples/platform/silabs/MatterConfig.h b/examples/platform/silabs/MatterConfig.h index 4983abac4189b1..2c565f7caa7321 100644 --- a/examples/platform/silabs/MatterConfig.h +++ b/examples/platform/silabs/MatterConfig.h @@ -22,10 +22,6 @@ #include #include -#ifdef CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS -#include "ICDSubscriptionCallback.h" -#endif // CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS - class SilabsMatterConfig { public: @@ -36,8 +32,4 @@ class SilabsMatterConfig static void InitWiFi(void); static void ConnectivityEventCallback(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg); static void InitOTARequestorHandler(chip::System::Layer * systemLayer, void * appState); - -#ifdef CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS - static ICDSubscriptionCallback mICDSubscriptionHandler; -#endif // CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS }; diff --git a/examples/platform/silabs/efr32/BUILD.gn b/examples/platform/silabs/efr32/BUILD.gn index 3a965cb01185b1..5bb628ad4f99e6 100644 --- a/examples/platform/silabs/efr32/BUILD.gn +++ b/examples/platform/silabs/efr32/BUILD.gn @@ -40,9 +40,6 @@ declare_args() { #default Wifi Password chip_default_wifi_psk = "" - # Use default handler to negotiate subscription max interval - chip_config_use_icd_subscription_callbacks = chip_enable_icd_server - # Enable TestEventTrigger in GeneralDiagnostics cluster silabs_test_event_trigger_enabled = false @@ -197,21 +194,6 @@ source_set("silabs-factory-data-provider") { ] } -config("ICD-subscription-callback-config") { - defines = [ "CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS=1" ] -} - -source_set("efr32-ICD-subscription-callback") { - sources = [ - "${silabs_common_plat_dir}/ICDSubscriptionCallback.cpp", - "${silabs_common_plat_dir}/ICDSubscriptionCallback.h", - ] - - public_deps = [ "${chip_root}/src/app:app" ] - - public_configs = [ ":ICD-subscription-callback-config" ] -} - config("efr32-common-config") { defines = [ "OTA_PERIODIC_TIMEOUT=${ota_periodic_query_timeout_sec}" ] @@ -356,10 +338,6 @@ source_set("efr32-common") { public_deps += [ ":silabs-factory-data-provider" ] } - if (chip_config_use_icd_subscription_callbacks) { - public_deps += [ ":efr32-ICD-subscription-callback" ] - } - if (silabs_test_event_trigger_enabled) { sources += [ "${silabs_common_plat_dir}/SilabsTestEventTriggerDelegate.cpp" ] diff --git a/examples/platform/silabs/efr32/project_include/OpenThreadConfig.h b/examples/platform/silabs/efr32/project_include/OpenThreadConfig.h index 90ecfcbf712718..339142894f5e61 100644 --- a/examples/platform/silabs/efr32/project_include/OpenThreadConfig.h +++ b/examples/platform/silabs/efr32/project_include/OpenThreadConfig.h @@ -36,8 +36,7 @@ // Enable use of external heap allocator (calloc/free) for OpenThread. #define OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE 1 -#if CHIP_CONFIG_ENABLE_ICD_SERVER - +#ifdef SL_ICD_ENABLED #define OPENTHREAD_CONFIG_PARENT_SEARCH_ENABLE 0 // In seconds @@ -46,7 +45,7 @@ // Timeout after 2 missed checkin or 4 mins if sleep interval is too short. #define OPENTHREAD_CONFIG_MLE_CHILD_TIMEOUT_DEFAULT ((SL_MLE_TIMEOUT_s < 120) ? 240 : ((SL_MLE_TIMEOUT_s * 2) + 1)) -#endif // CHIP_CONFIG_ENABLE_ICD_SERVER +#endif // SL_ICD_ENABLED /****Uncomment below section for OpenThread Debug logs*/ // #define OPENTHREAD_CONFIG_LOG_LEVEL OT_LOG_LEVEL_DEBG diff --git a/examples/pump-app/pump-common/pump-app.zap b/examples/pump-app/pump-common/pump-app.zap index 2ba4c43e611618..40391d5bb8d29a 100644 --- a/examples/pump-app/pump-common/pump-app.zap +++ b/examples/pump-app/pump-common/pump-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7985,5 +7985,6 @@ "endpointVersion": 1, "deviceIdentifier": 771 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/pump-app/silabs/README.md b/examples/pump-app/silabs/README.md index 51306b7dd24ea4..f2fc51840965a8 100644 --- a/examples/pump-app/silabs/README.md +++ b/examples/pump-app/silabs/README.md @@ -122,9 +122,9 @@ Labs platform. $ cd ~/connectedhomeip/examples/pump-app/silabs/efr32 $ rm -rf out/ -* Build the example as Sleepy End Device (SED) +* Build the example as Intermittently Connected Device (ICD) - $ ./scripts/examples/gn_silabs_example.sh ./examples/pump-app/silabs/efr32/ ./out/pump-app_SED BRD4187C --sed + $ ./scripts/examples/gn_silabs_example.sh ./examples/pump-app/silabs/efr32/ ./out/pump-app_ICD BRD4187C --icd or use gn as previously mentioned but adding the following arguments: diff --git a/examples/pump-app/silabs/data_model/pump-thread-app.zap b/examples/pump-app/silabs/data_model/pump-thread-app.zap index 2fabb6f0cc219e..3adcc3fa7ff8e9 100644 --- a/examples/pump-app/silabs/data_model/pump-thread-app.zap +++ b/examples/pump-app/silabs/data_model/pump-thread-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { diff --git a/examples/pump-app/silabs/data_model/pump-wifi-app.zap b/examples/pump-app/silabs/data_model/pump-wifi-app.zap index 2fabb6f0cc219e..3adcc3fa7ff8e9 100644 --- a/examples/pump-app/silabs/data_model/pump-wifi-app.zap +++ b/examples/pump-app/silabs/data_model/pump-wifi-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { 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 83b5113b422d07..6523e9ff34941f 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 @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -6813,5 +6813,6 @@ "endpointVersion": 1, "deviceIdentifier": 772 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.zap b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.zap index 6a841dec856d2a..edf84a1839d9fe 100644 --- a/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.zap +++ b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -16,12 +16,6 @@ } ], "package": [ - { - "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" - }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl.json", @@ -29,6 +23,12 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" } ], "endpointTypes": [ @@ -6609,2386 +6609,6 @@ } ] }, - { - "name": "Ceramic Filter Monitoring", - "code": 115, - "mfgCode": null, - "define": "CERAMIC_FILTER_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCondition", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Ceramic Filter Monitoring", - "code": 115, - "mfgCode": null, - "define": "CERAMIC_FILTER_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Condition", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DegradationDirection", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "DegradationDirectionEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ChangeIndication", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "ChangeIndicationEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InPlaceIndicator", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastChangedTime", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "epoch_s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Electrostatic Filter Monitoring", - "code": 116, - "mfgCode": null, - "define": "ELECTROSTATIC_FILTER_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCondition", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Electrostatic Filter Monitoring", - "code": 116, - "mfgCode": null, - "define": "ELECTROSTATIC_FILTER_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Condition", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DegradationDirection", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "DegradationDirectionEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ChangeIndication", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "ChangeIndicationEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InPlaceIndicator", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastChangedTime", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "epoch_s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "UV Filter Monitoring", - "code": 117, - "mfgCode": null, - "define": "UV_FILTER_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCondition", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "UV Filter Monitoring", - "code": 117, - "mfgCode": null, - "define": "UV_FILTER_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Condition", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DegradationDirection", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "DegradationDirectionEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ChangeIndication", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "ChangeIndicationEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InPlaceIndicator", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastChangedTime", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "epoch_s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Ionizing Filter Monitoring", - "code": 118, - "mfgCode": null, - "define": "IONIZING_FILTER_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCondition", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Ionizing Filter Monitoring", - "code": 118, - "mfgCode": null, - "define": "IONIZING_FILTER_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Condition", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DegradationDirection", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "DegradationDirectionEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ChangeIndication", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "ChangeIndicationEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InPlaceIndicator", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastChangedTime", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "epoch_s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Zeolite Filter Monitoring", - "code": 119, - "mfgCode": null, - "define": "ZEOLITE_FILTER_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCondition", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Zeolite Filter Monitoring", - "code": 119, - "mfgCode": null, - "define": "ZEOLITE_FILTER_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Condition", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DegradationDirection", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "DegradationDirectionEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ChangeIndication", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "ChangeIndicationEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InPlaceIndicator", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastChangedTime", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "epoch_s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Ozone Filter Monitoring", - "code": 120, - "mfgCode": null, - "define": "OZONE_FILTER_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCondition", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Ozone Filter Monitoring", - "code": 120, - "mfgCode": null, - "define": "OZONE_FILTER_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Condition", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DegradationDirection", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "DegradationDirectionEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ChangeIndication", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "ChangeIndicationEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InPlaceIndicator", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastChangedTime", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "epoch_s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Water Tank Monitoring", - "code": 121, - "mfgCode": null, - "define": "WATER_TANK_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCondition", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Water Tank Monitoring", - "code": 121, - "mfgCode": null, - "define": "WATER_TANK_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Condition", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DegradationDirection", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "DegradationDirectionEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ChangeIndication", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "ChangeIndicationEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InPlaceIndicator", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastChangedTime", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "epoch_s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Fuel Tank Monitoring", - "code": 122, - "mfgCode": null, - "define": "FUEL_TANK_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCondition", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Fuel Tank Monitoring", - "code": 122, - "mfgCode": null, - "define": "FUEL_TANK_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Condition", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DegradationDirection", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "DegradationDirectionEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ChangeIndication", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "ChangeIndicationEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InPlaceIndicator", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastChangedTime", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "epoch_s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Ink Cartridge Monitoring", - "code": 123, - "mfgCode": null, - "define": "INK_CARTRIDGE_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCondition", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Ink Cartridge Monitoring", - "code": 123, - "mfgCode": null, - "define": "INK_CARTRIDGE_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Condition", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DegradationDirection", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "DegradationDirectionEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ChangeIndication", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "ChangeIndicationEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InPlaceIndicator", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastChangedTime", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "epoch_s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Toner Cartridge Monitoring", - "code": 124, - "mfgCode": null, - "define": "TONER_CARTRIDGE_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCondition", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Toner Cartridge Monitoring", - "code": 124, - "mfgCode": null, - "define": "TONER_CARTRIDGE_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Condition", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DegradationDirection", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "DegradationDirectionEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ChangeIndication", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "ChangeIndicationEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InPlaceIndicator", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastChangedTime", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "epoch_s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "Fan Control", "code": 514, diff --git a/examples/shell/esp32/main/CMakeLists.txt b/examples/shell/esp32/main/CMakeLists.txt index 8fac15167812f5..5a565edb90a6d5 100644 --- a/examples/shell/esp32/main/CMakeLists.txt +++ b/examples/shell/esp32/main/CMakeLists.txt @@ -23,4 +23,4 @@ idf_component_register(SRCS main.cpp "${CHIP_SHELL_DIR}/shell_common/globals.cpp" PRIV_INCLUDE_DIRS "${CHIP_SHELL_DIR}/shell_common/include" - PRIV_REQUIRES chip nvs_flash bt console) + PRIV_REQUIRES chip nvs_flash bt) diff --git a/examples/smoke-co-alarm-app/silabs/README.md b/examples/smoke-co-alarm-app/silabs/README.md index 2aec36eb0cb6c9..fc858977604897 100644 --- a/examples/smoke-co-alarm-app/silabs/README.md +++ b/examples/smoke-co-alarm-app/silabs/README.md @@ -126,10 +126,10 @@ Silicon Labs platform. $ rm -rf out/ ``` -* Build the example as Sleepy End Device (SED) +* Build the example as Intermittently Connected Device (ICD) ``` - $ ./scripts/examples/gn_silabs_example.sh ./examples/smoke-co-alarm-app/silabs ./out/smoke-co-alarm-app_SED BRD4187C --sed + $ ./scripts/examples/gn_silabs_example.sh ./examples/smoke-co-alarm-app/silabs ./out/smoke-co-alarm-app_ICD BRD4187C --icd ``` or use gn as previously mentioned but adding the following arguments: diff --git a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap index 6cc1ffff0a93fa..542005ce91a4c8 100644 --- a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap +++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -5355,7 +5355,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "500", @@ -5371,7 +5371,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "300", @@ -5387,7 +5387,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "300", @@ -5419,7 +5419,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5435,7 +5435,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -6902,7 +6902,7 @@ "reportableChange": 0 }, { - "name": "SensitivityLevel", + "name": "SmokeSensitivityLevel", "code": 11, "mfgCode": null, "side": "server", diff --git a/examples/temperature-measurement-app/esp32/main/CMakeLists.txt b/examples/temperature-measurement-app/esp32/main/CMakeLists.txt index 6136d1583709bb..06b274e8d4bade 100644 --- a/examples/temperature-measurement-app/esp32/main/CMakeLists.txt +++ b/examples/temperature-measurement-app/esp32/main/CMakeLists.txt @@ -64,8 +64,14 @@ set(PRIV_INCLUDE_DIRS_LIST "${PRIV_INCLUDE_DIRS_LIST}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/lib/support" - "${IDF_PATH}/components/freertos/include/freertos" ) + +if (${IDF_VERSION_MAJOR} LESS 5) + list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/include/freertos") +else() + list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/FreeRTOS-Kernel/include/freertos") +endif() + set(SRC_DIRS_LIST "${SRC_DIRS_LIST}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" diff --git a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap index d0a7ed84d45d63..d854c4a8e0b201 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -4207,5 +4207,6 @@ "endpointVersion": 1, "deviceIdentifier": 770 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/thermostat/silabs/README.md b/examples/thermostat/silabs/README.md index 6dc53dc6b2ca2d..cc76d71c1fc083 100644 --- a/examples/thermostat/silabs/README.md +++ b/examples/thermostat/silabs/README.md @@ -131,9 +131,9 @@ Silicon Labs platform. ./scripts/examples/gn_silabs_example.sh examples/thermostat/silabs/efr32/ out/thermostat-app BRD4187C chip_build_libshell=true -* Build the example as Sleepy End Device (SED) +* Build the example as Intermittently Connected Device (ICD) - $ ./scripts/examples/gn_silabs_example.sh ./examples/thermostat/silabs/efr32/ ./out/thermostat-app_SED BRD4187C --sed + $ ./scripts/examples/gn_silabs_example.sh ./examples/thermostat/silabs/efr32/ ./out/thermostat-app_ICD BRD4187C --icd or use gn as previously mentioned but adding the following arguments: diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index 49567e9fc56f5a..8931cd7a4d07c9 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -14782,5 +14782,6 @@ "endpointVersion": 1, "deviceIdentifier": 769 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index 4db12ffd11259e..3474a5f8be8f29 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -12460,5 +12460,6 @@ "endpointVersion": 1, "deviceIdentifier": 36 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/ConnectionFragment.java b/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/ConnectionFragment.java index 2dfa712b7753c2..d2a0f7952b6485 100644 --- a/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/ConnectionFragment.java +++ b/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/ConnectionFragment.java @@ -8,6 +8,7 @@ import android.widget.TextView; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; +import com.chip.casting.CommissioningCallbacks; import com.chip.casting.ContentApp; import com.chip.casting.DiscoveredNodeData; import com.chip.casting.FailureCallback; @@ -120,15 +121,59 @@ private void beginCommissioning( FailureCallback onConnectionFailure, SuccessCallback onNewOrUpdatedEndpoints) { Log.d(TAG, "Running commissioning"); + MatterCallbackHandler commissioningCompleteCallback = + new MatterCallbackHandler() { + @Override + public void handle(MatterError error) { + Log.d(TAG, "handle() called on CommissioningComplete event with " + error); + } + }; + + SuccessCallback sessionEstablishmentStartedCallback = + new SuccessCallback() { + @Override + public void handle(Void response) { + Log.d(TAG, "handle() called on SessionEstablishmentStartedCallback"); + } + }; + + SuccessCallback sessionEstablishedCallback = + new SuccessCallback() { + @Override + public void handle(Void response) { + Log.d(TAG, "handle() called on SessionEstablishedCallback"); + } + }; + + FailureCallback sessionEstablishmentErrorCallback = + new FailureCallback() { + @Override + public void handle(MatterError error) { + Log.d(TAG, "handle() called on SessionEstablishmentError event with " + error); + } + }; + + FailureCallback sessionEstablishmentStoppedCallback = + new FailureCallback() { + @Override + public void handle(MatterError error) { + Log.d(TAG, "handle() called on SessionEstablishmentStopped event with " + error); + } + }; + + CommissioningCallbacks commissioningCallbacks = + new CommissioningCallbacks.Builder() + .commissioningComplete(commissioningCompleteCallback) + .sessionEstablishmentStarted(sessionEstablishmentStartedCallback) + .sessionEstablished(sessionEstablishedCallback) + .sessionEstablishmentError(sessionEstablishmentErrorCallback) + .sessionEstablishmentStopped(sessionEstablishmentStoppedCallback) + .build(); + this.openCommissioningWindowSuccess = tvCastingApp.openBasicCommissioningWindow( GlobalCastingConstants.CommissioningWindowDurationSecs, - new MatterCallbackHandler() { - @Override - public void handle(MatterError error) { - Log.d(TAG, "handle() called on CommissioningComplete event with " + error); - } - }, + commissioningCallbacks, onConnectionSuccess, onConnectionFailure, onNewOrUpdatedEndpoints); diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/CommissioningCallbacks.java b/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/CommissioningCallbacks.java new file mode 100644 index 00000000000000..9a44aba792f18b --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/CommissioningCallbacks.java @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2023 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. + * + */ +package com.chip.casting; + +public class CommissioningCallbacks { + /** + * This is called when the PBKDFParamRequest is received and indicates the start of the session + * establishment process + */ + private SuccessCallback sessionEstablishmentStarted; + + /** This is called when the commissioning session has been established */ + private SuccessCallback sessionEstablished; + + /** + * This is called when the PASE establishment failed (such as, when an invalid passcode is + * provided) or PASE was established fine but then the fail-safe expired (including being expired + * by the commissioner). The error param indicates the error that occurred during session + * establishment or the error accompanying the fail-safe timeout. + */ + private FailureCallback sessionEstablishmentError; + + /** + * This is called when the PASE establishment failed or PASE was established fine but then the + * fail-safe expired (including being expired by the commissioner) AND the commissioning window is + * closed. The window may be closed because the commissioning attempts limit was reached or + * advertising/listening for PASE failed. + */ + private FailureCallback sessionEstablishmentStopped; + + /** This is called when the commissioning has been completed */ + private Object commissioningComplete; + + private CommissioningCallbacks(Builder builder) { + this.sessionEstablishmentStarted = builder.sessionEstablishmentStarted; + this.sessionEstablished = builder.sessionEstablished; + this.sessionEstablishmentError = builder.sessionEstablishmentError; + this.sessionEstablishmentStopped = builder.sessionEstablishmentStopped; + this.commissioningComplete = builder.commissioningComplete; + } + + public SuccessCallback getSessionEstablishmentStarted() { + return sessionEstablishmentStarted; + } + + public SuccessCallback getSessionEstablished() { + return sessionEstablished; + } + + public FailureCallback getSessionEstablishmentError() { + return sessionEstablishmentError; + } + + public FailureCallback getSessionEstablishmentStopped() { + return sessionEstablishmentStopped; + } + + public Object getCommissioningComplete() { + return commissioningComplete; + } + + public static class Builder { + private SuccessCallback sessionEstablishmentStarted; + private SuccessCallback sessionEstablished; + private FailureCallback sessionEstablishmentError; + private FailureCallback sessionEstablishmentStopped; + private Object commissioningComplete; + + public Builder sessionEstablishmentStarted(SuccessCallback sessionEstablishmentStarted) { + this.sessionEstablishmentStarted = sessionEstablishmentStarted; + return this; + } + + public Builder sessionEstablished(SuccessCallback sessionEstablished) { + this.sessionEstablished = sessionEstablished; + return this; + } + + public Builder sessionEstablishmentError(FailureCallback sessionEstablishmentError) { + this.sessionEstablishmentError = sessionEstablishmentError; + return this; + } + + public Builder sessionEstablishmentStopped(FailureCallback sessionEstablishmentStopped) { + this.sessionEstablishmentStopped = sessionEstablishmentStopped; + return this; + } + + public Builder commissioningComplete(Object commissioningComplete) { + this.commissioningComplete = commissioningComplete; + return this; + } + + public CommissioningCallbacks build() { + return new CommissioningCallbacks(this); + } + } +} diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/TvCastingApp.java b/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/TvCastingApp.java index 7fc9d44da14186..f30132ffc9a6ea 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/TvCastingApp.java +++ b/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/TvCastingApp.java @@ -180,7 +180,7 @@ public void stopVideoPlayerDiscovery() { public native boolean openBasicCommissioningWindow( int duration, - Object commissioningCompleteHandler, + CommissioningCallbacks commissioningCallbacks, SuccessCallback onConnectionSuccess, FailureCallback onConnectionFailure, SuccessCallback onNewOrUpdatedEndpointCallback); diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/MatterCallbackHandler-JNI.h b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/MatterCallbackHandler-JNI.h index 749f5e873ee074..c05eef016f32b3 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/MatterCallbackHandler-JNI.h +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/MatterCallbackHandler-JNI.h @@ -104,6 +104,30 @@ template SuccessHandlerJNI::~SuccessHandlerJNI(){}; // COMMISSIONING AND CONNECTION +class SessionEstablishmentStartedHandlerJNI : public SuccessHandlerJNI +{ +public: + SessionEstablishmentStartedHandlerJNI() : SuccessHandlerJNI("(Ljava/lang/Object;)V") {} + jobject ConvertToJObject(void * responseData) + { + // return nullptr because the Java callback extends SuccessCallback and its handle() expects a Void param. + // It expects a Void becauase no value is passed as part of this callback. + return nullptr; + } +}; + +class SessionEstablishedHandlerJNI : public SuccessHandlerJNI +{ +public: + SessionEstablishedHandlerJNI() : SuccessHandlerJNI("(Ljava/lang/Object;)V") {} + jobject ConvertToJObject(void * responseData) + { + // return nullptr because the Java callback extends SuccessCallback and its handle() expects a Void param. + // It expects a Void becauase no value is passed as part of this callback. + return nullptr; + } +}; + class OnConnectionSuccessHandlerJNI : public SuccessHandlerJNI { public: diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.cpp b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.cpp index c4af2c37add85c..5293cc31305fd5 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.cpp +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.cpp @@ -113,15 +113,82 @@ JNI_METHOD(void, setDACProvider)(JNIEnv *, jobject, jobject provider) } JNI_METHOD(jboolean, openBasicCommissioningWindow) -(JNIEnv * env, jobject, jint duration, jobject jCommissioningCompleteHandler, jobject jOnConnectionSuccessHandler, +(JNIEnv * env, jobject, jint duration, jobject jCommissioningCallbacks, jobject jOnConnectionSuccessHandler, jobject jOnConnectionFailureHandler, jobject jOnNewOrUpdatedEndpointHandler) { chip::DeviceLayer::StackLock lock; ChipLogProgress(AppServer, "JNI_METHOD openBasicCommissioningWindow called with duration %d", duration); - CHIP_ERROR err = TvCastingAppJNIMgr().getCommissioningCompleteHandler().SetUp(env, jCommissioningCompleteHandler); - VerifyOrExit(CHIP_NO_ERROR == err, - ChipLogError(AppServer, "MatterCallbackHandlerJNI::SetUp failed %" CHIP_ERROR_FORMAT, err.Format())); + + CHIP_ERROR err = CHIP_NO_ERROR; + + CommissioningCallbacks commissioningCallbacks; + jclass jCommissioningCallbacksClass; + chip::JniReferences::GetInstance().GetClassRef(env, "com/chip/casting/CommissioningCallbacks", jCommissioningCallbacksClass); + + jfieldID jCommissioningCompleteField = + env->GetFieldID(jCommissioningCallbacksClass, "commissioningComplete", "Ljava/lang/Object;"); + jobject jCommissioningComplete = env->GetObjectField(jCommissioningCallbacks, jCommissioningCompleteField); + if (jCommissioningComplete != nullptr) + { + err = TvCastingAppJNIMgr().getCommissioningCompleteHandler().SetUp(env, jCommissioningComplete); + VerifyOrReturnValue(err == CHIP_NO_ERROR, false, + ChipLogError(AppServer, "MatterCallbackHandlerJNI::SetUp failed %" CHIP_ERROR_FORMAT, err.Format())); + commissioningCallbacks.commissioningComplete = [](CHIP_ERROR err) { + TvCastingAppJNIMgr().getCommissioningCompleteHandler().Handle(err); + }; + } + + jfieldID jSessionEstablishmentStartedField = + env->GetFieldID(jCommissioningCallbacksClass, "sessionEstablishmentStarted", "Lcom/chip/casting/SuccessCallback;"); + jobject jSessionEstablishmentStarted = env->GetObjectField(jCommissioningCallbacks, jSessionEstablishmentStartedField); + if (jSessionEstablishmentStarted != nullptr) + { + err = TvCastingAppJNIMgr().getSessionEstablishmentStartedHandler().SetUp(env, jSessionEstablishmentStarted); + VerifyOrReturnValue( + err == CHIP_NO_ERROR, false, + ChipLogError(AppServer, "SessionEstablishmentStartedHandler.SetUp failed %" CHIP_ERROR_FORMAT, err.Format())); + commissioningCallbacks.sessionEstablishmentStarted = []() { + TvCastingAppJNIMgr().getSessionEstablishmentStartedHandler().Handle(nullptr); + }; + } + + jfieldID jSessionEstablishedField = + env->GetFieldID(jCommissioningCallbacksClass, "sessionEstablished", "Lcom/chip/casting/SuccessCallback;"); + jobject jSessionEstablished = env->GetObjectField(jCommissioningCallbacks, jSessionEstablishedField); + if (jSessionEstablished != nullptr) + { + err = TvCastingAppJNIMgr().getSessionEstablishedHandler().SetUp(env, jSessionEstablished); + VerifyOrReturnValue(err == CHIP_NO_ERROR, false, + ChipLogError(AppServer, "SessionEstablishedHandler.SetUp failed %" CHIP_ERROR_FORMAT, err.Format())); + commissioningCallbacks.sessionEstablished = []() { TvCastingAppJNIMgr().getSessionEstablishedHandler().Handle(nullptr); }; + } + + jfieldID jSessionEstablishmentErrorField = + env->GetFieldID(jCommissioningCallbacksClass, "sessionEstablishmentError", "Lcom/chip/casting/FailureCallback;"); + jobject jSessionEstablishmentError = env->GetObjectField(jCommissioningCallbacks, jSessionEstablishmentErrorField); + if (jSessionEstablishmentError != nullptr) + { + err = TvCastingAppJNIMgr().getSessionEstablishmentErrorHandler().SetUp(env, jSessionEstablishmentError); + VerifyOrReturnValue(err == CHIP_NO_ERROR, false); + commissioningCallbacks.sessionEstablishmentError = [](CHIP_ERROR err) { + TvCastingAppJNIMgr().getSessionEstablishmentErrorHandler().Handle(err); + }; + } + + jfieldID jSessionEstablishmentStoppedField = + env->GetFieldID(jCommissioningCallbacksClass, "sessionEstablishmentStopped", "Lcom/chip/casting/FailureCallback;"); + jobject jSessionEstablishmentStopped = env->GetObjectField(jCommissioningCallbacks, jSessionEstablishmentStoppedField); + if (jSessionEstablishmentStopped != nullptr) + { + err = TvCastingAppJNIMgr().getSessionEstablishmentStoppedHandler().SetUp(env, jSessionEstablishmentStopped); + VerifyOrReturnValue( + err == CHIP_NO_ERROR, false, + ChipLogError(AppServer, "SessionEstablishmentStoppedHandler.SetUp failed %" CHIP_ERROR_FORMAT, err.Format())); + commissioningCallbacks.sessionEstablishmentStopped = []() { + TvCastingAppJNIMgr().getSessionEstablishmentStoppedHandler().Handle(CHIP_NO_ERROR); + }; + } err = TvCastingAppJNIMgr().getOnConnectionSuccessHandler(false).SetUp(env, jOnConnectionSuccessHandler); VerifyOrExit(CHIP_NO_ERROR == err, @@ -136,7 +203,7 @@ JNI_METHOD(jboolean, openBasicCommissioningWindow) ChipLogError(AppServer, "OnNewOrUpdatedEndpointHandler.SetUp failed %" CHIP_ERROR_FORMAT, err.Format())); err = CastingServer::GetInstance()->OpenBasicCommissioningWindow( - [](CHIP_ERROR err) { TvCastingAppJNIMgr().getCommissioningCompleteHandler().Handle(err); }, + commissioningCallbacks, [](TargetVideoPlayerInfo * videoPlayer) { TvCastingAppJNIMgr().getOnConnectionSuccessHandler(false).Handle(videoPlayer); }, [](CHIP_ERROR err) { TvCastingAppJNIMgr().getOnConnectionFailureHandler(false).Handle(err); }, [](TargetEndpointInfo * endpoint) { TvCastingAppJNIMgr().getOnNewOrUpdatedEndpointHandler(false).Handle(endpoint); }); diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.h b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.h index d77f3a7eac8cce..863e2691c44a52 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.h +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.h @@ -27,10 +27,20 @@ class TvCastingAppJNI { public: MatterCallbackHandlerJNI & getCommissioningCompleteHandler() { return mCommissioningCompleteHandler; } + + SessionEstablishmentStartedHandlerJNI & getSessionEstablishmentStartedHandler() { return mSessionEstablishmentStartedHandler; } + + SessionEstablishedHandlerJNI & getSessionEstablishedHandler() { return mSessionEstablishedHandler; } + + FailureHandlerJNI & getSessionEstablishmentErrorHandler() { return mSessionEstablishmentErrorHandler; } + + FailureHandlerJNI & getSessionEstablishmentStoppedHandler() { return mSessionEstablishmentStoppedHandler; } + OnConnectionSuccessHandlerJNI & getOnConnectionSuccessHandler(bool preCommissioned) { return preCommissioned ? mPreCommissionedOnConnectionSuccessHandler : mCommissioningOnConnectionSuccessHandler; } + FailureHandlerJNI & getOnConnectionFailureHandler(bool preCommissioned) { return preCommissioned ? mPreCommissionedOnConnectionFailureHandler : mCommissioningOnConnectionFailureHandler; @@ -100,6 +110,10 @@ class TvCastingAppJNI static TvCastingAppJNI sInstance; MatterCallbackHandlerJNI mCommissioningCompleteHandler; + SessionEstablishmentStartedHandlerJNI mSessionEstablishmentStartedHandler; + SessionEstablishedHandlerJNI mSessionEstablishedHandler; + FailureHandlerJNI mSessionEstablishmentErrorHandler; + FailureHandlerJNI mSessionEstablishmentStoppedHandler; OnConnectionSuccessHandlerJNI mCommissioningOnConnectionSuccessHandler; FailureHandlerJNI mCommissioningOnConnectionFailureHandler; OnNewOrUpdatedEndpointHandlerJNI mCommissioningOnNewOrUpdatedEndpointHandler; diff --git a/examples/tv-casting-app/android/BUILD.gn b/examples/tv-casting-app/android/BUILD.gn index 7a12b9a9a3efa3..d072dd4c088e95 100644 --- a/examples/tv-casting-app/android/BUILD.gn +++ b/examples/tv-casting-app/android/BUILD.gn @@ -65,6 +65,7 @@ android_library("java") { sources = [ "App/app/src/main/jni/com/chip/casting/AppParameters.java", + "App/app/src/main/jni/com/chip/casting/CommissioningCallbacks.java", "App/app/src/main/jni/com/chip/casting/ContentApp.java", "App/app/src/main/jni/com/chip/casting/ContentLauncherTypes.java", "App/app/src/main/jni/com/chip/casting/DACProvider.java", diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj index 1591df3729aa04..cbc52e427053d4 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj @@ -27,6 +27,8 @@ 3CCB8743286A593700771BAD /* CastingServerBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3CCB873D286A593700771BAD /* CastingServerBridge.mm */; }; 3CCB8744286A593700771BAD /* ConversionUtils.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3CCB873E286A593700771BAD /* ConversionUtils.mm */; }; 3CD6D01A298CDA2100D7569A /* CommissionerDiscoveryDelegateImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 3CD6D019298CDA2100D7569A /* CommissionerDiscoveryDelegateImpl.h */; }; + 3CE5ECCE2A673B30007CF331 /* CommissioningCallbackHandlers.h in Headers */ = {isa = PBXBuildFile; fileRef = 3CE5ECCD2A673B30007CF331 /* CommissioningCallbackHandlers.h */; }; + 3CE5ECD02A673E2C007CF331 /* CommissioningCallbackHandlers.m in Sources */ = {isa = PBXBuildFile; fileRef = 3CE5ECCF2A673E2C007CF331 /* CommissioningCallbackHandlers.m */; }; 3CE868F42946D76200FCB92B /* CommissionableDataProviderImpl.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3CE868F32946D76200FCB92B /* CommissionableDataProviderImpl.mm */; }; 3CF8532728E37F1000F07B9F /* MatterError.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3CF8532628E37F1000F07B9F /* MatterError.mm */; }; /* End PBXBuildFile section */ @@ -62,6 +64,8 @@ 3CCB873D286A593700771BAD /* CastingServerBridge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CastingServerBridge.mm; sourceTree = ""; }; 3CCB873E286A593700771BAD /* ConversionUtils.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ConversionUtils.mm; sourceTree = ""; }; 3CD6D019298CDA2100D7569A /* CommissionerDiscoveryDelegateImpl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CommissionerDiscoveryDelegateImpl.h; sourceTree = ""; }; + 3CE5ECCD2A673B30007CF331 /* CommissioningCallbackHandlers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CommissioningCallbackHandlers.h; sourceTree = ""; }; + 3CE5ECCF2A673E2C007CF331 /* CommissioningCallbackHandlers.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CommissioningCallbackHandlers.m; sourceTree = ""; }; 3CE868F32946D76200FCB92B /* CommissionableDataProviderImpl.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = CommissionableDataProviderImpl.mm; sourceTree = ""; }; 3CF8532528E37ED800F07B9F /* MatterError.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MatterError.h; sourceTree = ""; }; 3CF8532628E37F1000F07B9F /* MatterError.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MatterError.mm; sourceTree = ""; }; @@ -131,6 +135,8 @@ 3C0D9CDF2920A30C00D3332B /* CommissionableDataProviderImpl.hpp */, 3CE868F32946D76200FCB92B /* CommissionableDataProviderImpl.mm */, 3CD6D019298CDA2100D7569A /* CommissionerDiscoveryDelegateImpl.h */, + 3CE5ECCD2A673B30007CF331 /* CommissioningCallbackHandlers.h */, + 3CE5ECCF2A673E2C007CF331 /* CommissioningCallbackHandlers.m */, ); path = MatterTvCastingBridge; sourceTree = ""; @@ -145,6 +151,7 @@ 3CD6D01A298CDA2100D7569A /* CommissionerDiscoveryDelegateImpl.h in Headers */, 3C26AC8C2926FE0C00BA6881 /* DeviceAttestationCredentialsProviderImpl.hpp in Headers */, 3CCB8740286A593700771BAD /* CastingServerBridge.h in Headers */, + 3CE5ECCE2A673B30007CF331 /* CommissioningCallbackHandlers.h in Headers */, 3CCB8742286A593700771BAD /* ConversionUtils.hpp in Headers */, 3CCB8741286A593700771BAD /* DiscoveredNodeData.h in Headers */, 3CCB87212869085400771BAD /* MatterTvCastingBridge.h in Headers */, @@ -249,6 +256,7 @@ files = ( 3CCB8743286A593700771BAD /* CastingServerBridge.mm in Sources */, 3C4E53B228E5184C00F293E8 /* TargetNavigatorTypes.mm in Sources */, + 3CE5ECD02A673E2C007CF331 /* CommissioningCallbackHandlers.m in Sources */, 3CF8532728E37F1000F07B9F /* MatterError.mm in Sources */, 3C4E53B628E5595A00F293E8 /* ContentLauncherTypes.mm in Sources */, 3C81C75028F7A7D3001CB9D1 /* VideoPlayer.m in Sources */, @@ -419,9 +427,6 @@ "$(CHIP_ROOT)/third_party/nlassert/repo/include", "$(CHIP_ROOT)/third_party/nlio/repo/include", "$(TEMP_DIR)/out/gen/include", - /* Compile time codegen would need this: - "$(TEMP_DIR)/out/gen/src/controller/data_model/zapgen/", - */ "$(CHIP_ROOT)/zzz_generated/app-common", ); INFOPLIST_KEY_NSHumanReadableCopyright = ""; @@ -502,9 +507,6 @@ "$(CHIP_ROOT)/third_party/nlassert/repo/include", "$(CHIP_ROOT)/third_party/nlio/repo/include", "$(TEMP_DIR)/out/gen/include", - /* Compile time codegen would need this: - "$(TEMP_DIR)/out/gen/src/controller/data_model/zapgen/", - */ "$(CHIP_ROOT)/zzz_generated/app-common", ); INFOPLIST_KEY_NSHumanReadableCopyright = ""; diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.h index d90e4db486156b..2489f982fb0645 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.h +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.h @@ -16,6 +16,7 @@ */ #import "AppParameters.h" +#import "CommissioningCallbackHandlers.h" #import "ContentApp.h" #import "ContentLauncherTypes.h" #import "DiscoveredNodeData.h" @@ -109,8 +110,7 @@ @param clientQueue Queue to dispatch the call to the commissioningWindowRequestedHandler on - @param commissioningCompleteCallback Callback for when commissioning of this app has been completed via a call to the general - commissioning cluster (by usually an on-network TV/Media device acting as a Matter commissioner) + @param commissioningCallbackHandlers Optional parameter to specific handlers for callbacks during commissioning @param onConnectionSuccessCallback Handles a VideoPlayer * once connection is successfully established @@ -118,15 +118,12 @@ @param onNewOrUpdatedEndpointCallback Handles a ContentApp * for each new ContentApp is found. May be called multiple times based on the number of ContentApp - - @param commissioningWindowRequestedHandler Handler to call on requesting the opening of a commissioning window */ - (void)openBasicCommissioningWindow:(dispatch_queue_t _Nonnull)clientQueue - commissioningWindowRequestedHandler:(void (^_Nonnull)(bool))commissioningWindowRequestedHandler - commissioningCompleteCallback:(void (^_Nonnull)(bool))commissioningCompleteCallback - onConnectionSuccessCallback:(void (^_Nonnull)(VideoPlayer * _Nonnull))onConnectionSuccessCallback - onConnectionFailureCallback:(void (^_Nonnull)(MatterError * _Nonnull))onConnectionFailureCallback - onNewOrUpdatedEndpointCallback:(void (^_Nonnull)(ContentApp * _Nonnull))onNewOrUpdatedEndpointCallback; + commissioningCallbackHandlers:(CommissioningCallbackHandlers * _Nullable)commissioningCallbackHandlers + onConnectionSuccessCallback:(void (^_Nonnull)(VideoPlayer * _Nonnull))onConnectionSuccessCallback + onConnectionFailureCallback:(void (^_Nonnull)(MatterError * _Nonnull))onConnectionFailureCallback + onNewOrUpdatedEndpointCallback:(void (^_Nonnull)(ContentApp * _Nonnull))onNewOrUpdatedEndpointCallback; /*! @brief Gets the list of VideoPlayers currently connected diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm index 50c2467b85be3f..3f4dbce0700bb7 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm @@ -565,24 +565,89 @@ - (OnboardingPayload *)getOnboardingPayload } - (void)openBasicCommissioningWindow:(dispatch_queue_t _Nonnull)clientQueue - commissioningWindowRequestedHandler:(void (^_Nonnull)(bool))commissioningWindowRequestedHandler - commissioningCompleteCallback:(void (^_Nonnull)(bool))commissioningCompleteCallback - onConnectionSuccessCallback:(void (^_Nonnull)(VideoPlayer * _Nonnull))onConnectionSuccessCallback - onConnectionFailureCallback:(void (^_Nonnull)(MatterError * _Nonnull))onConnectionFailureCallback - onNewOrUpdatedEndpointCallback:(void (^_Nonnull)(ContentApp * _Nonnull))onNewOrUpdatedEndpointCallback + commissioningCallbackHandlers:(CommissioningCallbackHandlers * _Nullable)commissioningCallbackHandlers + onConnectionSuccessCallback:(void (^_Nonnull)(VideoPlayer * _Nonnull))onConnectionSuccessCallback + onConnectionFailureCallback:(void (^_Nonnull)(MatterError * _Nonnull))onConnectionFailureCallback + onNewOrUpdatedEndpointCallback:(void (^_Nonnull)(ContentApp * _Nonnull))onNewOrUpdatedEndpointCallback { [self dispatchOnMatterSDKQueue:@"openBasicCommissioningWindow(...)" block:^{ + CommissioningCallbacks commissioningCallbacks; + if (commissioningCallbackHandlers != nil) { + if (commissioningCallbackHandlers.commissioningCompleteCallback != nil) { + commissioningCallbacks.commissioningComplete = [clientQueue, commissioningCallbackHandlers]( + CHIP_ERROR err) { + [[CastingServerBridge getSharedInstance] + dispatchOnClientQueue:clientQueue + description: + @"openBasicCommissioningWindow(...) commissioningCompleteCallback" + block:^{ + commissioningCallbackHandlers.commissioningCompleteCallback( + CHIP_NO_ERROR == err); + }]; + }; + } + + if (commissioningCallbackHandlers.sessionEstablishmentStartedCallback != nil) { + commissioningCallbacks.sessionEstablishmentStarted + = [clientQueue, commissioningCallbackHandlers]() { + [[CastingServerBridge getSharedInstance] + dispatchOnClientQueue:clientQueue + description:@"openBasicCommissioningWindow(...) " + @"sessionEstablishmentStartedCallback" + block:^{ + commissioningCallbackHandlers + .sessionEstablishmentStartedCallback(); + }]; + }; + } + + if (commissioningCallbackHandlers.sessionEstablishedCallback != nil) { + commissioningCallbacks.sessionEstablished = [clientQueue, commissioningCallbackHandlers]() { + [[CastingServerBridge getSharedInstance] + dispatchOnClientQueue:clientQueue + description:@"openBasicCommissioningWindow(...) sessionEstablishedCallback" + block:^{ + commissioningCallbackHandlers.sessionEstablishedCallback(); + }]; + }; + } + + if (commissioningCallbackHandlers.sessionEstablishmentErrorCallback != nil) { + commissioningCallbacks.sessionEstablishmentError = [clientQueue, + commissioningCallbackHandlers]( + CHIP_ERROR err) { + [[CastingServerBridge getSharedInstance] + dispatchOnClientQueue:clientQueue + description:@"openBasicCommissioningWindow(...) " + @"sessionEstablishmentErrorCallback" + block:^{ + commissioningCallbackHandlers.sessionEstablishmentErrorCallback( + [[MatterError alloc] + initWithCode:err.AsInteger() + message:[NSString + stringWithUTF8String:err.AsString()]]); + }]; + }; + } + + if (commissioningCallbackHandlers.sessionEstablishmentStoppedCallback != nil) { + commissioningCallbacks.sessionEstablishmentStopped + = [clientQueue, commissioningCallbackHandlers]() { + [[CastingServerBridge getSharedInstance] + dispatchOnClientQueue:clientQueue + description:@"openBasicCommissioningWindow(...) " + @"sessionEstablishmentStoppedCallback" + block:^{ + commissioningCallbackHandlers + .sessionEstablishmentStoppedCallback(); + }]; + }; + } + } CHIP_ERROR err = CastingServer::GetInstance()->OpenBasicCommissioningWindow( - [clientQueue, commissioningCompleteCallback](CHIP_ERROR err) { - [[CastingServerBridge getSharedInstance] - dispatchOnClientQueue:clientQueue - description:@"openBasicCommissioningWindow(...) commissioningCompleteCallback" - block:^{ - commissioningCompleteCallback(CHIP_NO_ERROR == err); - }]; - }, + commissioningCallbacks, [clientQueue, onConnectionSuccessCallback](TargetVideoPlayerInfo * cppTargetVideoPlayerInfo) { VideoPlayer * videoPlayer = [ConversionUtils convertToObjCVideoPlayerFrom:cppTargetVideoPlayerInfo]; @@ -614,10 +679,13 @@ - (void)openBasicCommissioningWindow:(dispatch_queue_t _Nonnull)clientQueue }]; }); - dispatch_async(clientQueue, ^{ - ChipLogProgress(AppServer, "[async] Dispatching commissioningWindowRequestedHandler"); - commissioningWindowRequestedHandler(CHIP_NO_ERROR == err); - }); + if (commissioningCallbackHandlers != nil + && commissioningCallbackHandlers.commissioningWindowRequestedHandler != nil) { + dispatch_async(clientQueue, ^{ + ChipLogProgress(AppServer, "[async] Dispatching commissioningWindowRequestedHandler"); + commissioningCallbackHandlers.commissioningWindowRequestedHandler(CHIP_NO_ERROR == err); + }); + } }]; } @@ -750,6 +818,9 @@ - (void)startMatterServer:(dispatch_queue_t _Nonnull)clientQueue return; } + // Initialize AppDelegation + CastingServer::GetInstance()->InitAppDelegation(); + // Initialize binding handlers err = CastingServer::GetInstance()->InitBindingHandlers(); if (err != CHIP_NO_ERROR) { diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CommissioningCallbackHandlers.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CommissioningCallbackHandlers.h new file mode 100644 index 00000000000000..14288d7ffd6234 --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CommissioningCallbackHandlers.h @@ -0,0 +1,70 @@ +/** + * + * Copyright (c) 2023 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 "MatterError.h" +#import + +#ifndef CommissioningCallbacksHandlers_h +#define CommissioningCallbacksHandlers_h + +@interface CommissioningCallbackHandlers : NSObject + +- (CommissioningCallbackHandlers * _Nonnull) + initWithCommissioningWindowRequestedHandler:(void (^_Nonnull)(bool))commissioningWindowRequestedHandler + commissioningCompleteCallback:(void (^_Nonnull)(bool))commissioningCompleteCallback + sessionEstablishmentStartedCallback:(void (^_Nullable)(void))sessionEstablishmentStartedCallback + sessionEstablishedCallback:(void (^_Nullable)(void))sessionEstablishedCallback + sessionEstablishmentErrorCallback:(void (^_Nullable)(MatterError * _Nonnull))sessionEstablishmentErrorCallback + sessionEstablishmentStoppedCallback:(void (^_Nullable)(void))sessionEstablishmentStoppedCallback; + +/** + * This is called when request to open the commissioning window has been made. + */ +@property void (^_Nullable commissioningWindowRequestedHandler)(bool); + +/** + * This is called when the commissioning has been completed + */ +@property void (^_Nullable commissioningCompleteCallback)(bool); + +/** + * This is called when the PBKDFParamRequest is received and indicates the start of the session establishment process + */ +@property void (^_Nullable sessionEstablishmentStartedCallback)(void); + +/** + * This is called when the commissioning session has been established + */ +@property void (^_Nullable sessionEstablishedCallback)(void); + +/** + * This is called when the PASE establishment failed (such as, when an invalid passcode is provided) or PASE was established + * fine but then the fail-safe expired (including being expired by the commissioner). The error param indicates the error that + * occurred during session establishment or the error accompanying the fail-safe timeout. + */ +@property void (^_Nullable sessionEstablishmentErrorCallback)(MatterError * _Nonnull); + +/** + * This is called when the PASE establishment failed or PASE was established fine but then the fail-safe expired (including + * being expired by the commissioner) AND the commissioning window is closed. The window may be closed because the commissioning + * attempts limit was reached or advertising/listening for PASE failed. + */ +@property void (^_Nullable sessionEstablishmentStoppedCallback)(void); + +@end + +#endif /* CommissioningCallbacksHandlers_h */ diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CommissioningCallbackHandlers.m b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CommissioningCallbackHandlers.m new file mode 100644 index 00000000000000..be79d40793c4c2 --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CommissioningCallbackHandlers.m @@ -0,0 +1,42 @@ +/** + * + * Copyright (c) 2023 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 "CommissioningCallbackHandlers.h" + +@implementation CommissioningCallbackHandlers + +- (CommissioningCallbackHandlers * _Nonnull) + initWithCommissioningWindowRequestedHandler:(void (^_Nonnull)(bool))commissioningWindowRequestedHandler + commissioningCompleteCallback:(void (^_Nonnull)(bool))commissioningCompleteCallback + sessionEstablishmentStartedCallback:(void (^_Nullable)(void))sessionEstablishmentStartedCallback + sessionEstablishedCallback:(void (^_Nullable)(void))sessionEstablishedCallback + sessionEstablishmentErrorCallback:(void (^_Nullable)(MatterError * _Nonnull))sessionEstablishmentErrorCallback + sessionEstablishmentStoppedCallback:(void (^_Nullable)(void))sessionEstablishmentStoppedCallback +{ + self = [super init]; + if (self) { + _commissioningWindowRequestedHandler = commissioningWindowRequestedHandler; + _commissioningCompleteCallback = commissioningCompleteCallback; + _sessionEstablishmentStartedCallback = sessionEstablishmentStartedCallback; + _sessionEstablishedCallback = sessionEstablishedCallback; + _sessionEstablishmentErrorCallback = sessionEstablishmentErrorCallback; + _sessionEstablishmentStoppedCallback = sessionEstablishmentStoppedCallback; + } + return self; +} + +@end diff --git a/examples/tv-casting-app/darwin/TvCasting/TvCasting/CommissioningViewModel.swift b/examples/tv-casting-app/darwin/TvCasting/TvCasting/CommissioningViewModel.swift index a0d41633a750fa..ec0c542d942e38 100644 --- a/examples/tv-casting-app/darwin/TvCasting/TvCasting/CommissioningViewModel.swift +++ b/examples/tv-casting-app/darwin/TvCasting/TvCasting/CommissioningViewModel.swift @@ -58,17 +58,32 @@ class CommissioningViewModel: ObservableObject { if let castingServerBridge = CastingServerBridge.getSharedInstance() { castingServerBridge.openBasicCommissioningWindow(DispatchQueue.main, - commissioningWindowRequestedHandler: { (result: Bool) -> () in - DispatchQueue.main.async { - self.commisisoningWindowOpened = result + commissioningCallbackHandlers: CommissioningCallbackHandlers( + commissioningWindowRequestedHandler: { (result: Bool) -> () in + DispatchQueue.main.async { + self.Log.info("Commissioning Window opening status: \(result)") + self.commisisoningWindowOpened = result + } + }, + commissioningCompleteCallback: { (result: Bool) -> () in + self.Log.info("Commissioning status: \(result)") + DispatchQueue.main.async { + self.commisisoningComplete = result + } + }, + sessionEstablishmentStartedCallback: { + self.Log.info("PASE session establishment started") + }, + sessionEstablishedCallback: { + self.Log.info("PASE session established") + }, + sessionEstablishmentErrorCallback: { (err: MatterError) -> () in + self.Log.info("PASE session establishment error : \(err)") + }, + sessionEstablishmentStoppedCallback: { + self.Log.info("PASE session establishment stopped") } - }, - commissioningCompleteCallback: { (result: Bool) -> () in - self.Log.info("Commissioning status: \(result)") - DispatchQueue.main.async { - self.commisisoningComplete = result - } - }, + ), onConnectionSuccessCallback: { (videoPlayer: VideoPlayer) -> () in DispatchQueue.main.async { self.connectionSuccess = true @@ -92,7 +107,7 @@ class CommissioningViewModel: ObservableObject { } - private func sendUserDirectedCommissioningRequest(selectedCommissioner: DiscoveredNodeData?) { + private func sendUserDirectedCommissioningRequest(selectedCommissioner: DiscoveredNodeData?) { if let castingServerBridge = CastingServerBridge.getSharedInstance() { castingServerBridge.sendUserDirectedCommissioningRequest(selectedCommissioner!, clientQueue: DispatchQueue.main, udcRequestSentHandler: { (result: Bool) -> () in diff --git a/examples/tv-casting-app/linux/CastingUtils.cpp b/examples/tv-casting-app/linux/CastingUtils.cpp index 5e15a2e30e3e17..dca65f54d741b3 100644 --- a/examples/tv-casting-app/linux/CastingUtils.cpp +++ b/examples/tv-casting-app/linux/CastingUtils.cpp @@ -18,6 +18,8 @@ #include "CastingUtils.h" +#include "CommissioningCallbacks.h" + using namespace chip; using namespace chip::System; using namespace chip::DeviceLayer; @@ -62,8 +64,10 @@ void PrepareForCommissioning(const Dnssd::DiscoveredNodeData * selectedCommissio { CastingServer::GetInstance()->Init(); - CastingServer::GetInstance()->OpenBasicCommissioningWindow(HandleCommissioningCompleteCallback, OnConnectionSuccess, - OnConnectionFailure, OnNewOrUpdatedEndpoint); + CommissioningCallbacks commissioningCallbacks; + commissioningCallbacks.commissioningComplete = HandleCommissioningCompleteCallback; + CastingServer::GetInstance()->OpenBasicCommissioningWindow(commissioningCallbacks, OnConnectionSuccess, OnConnectionFailure, + OnNewOrUpdatedEndpoint); // Display onboarding payload chip::DeviceLayer::ConfigurationMgr().LogDeviceConfig(); diff --git a/examples/tv-casting-app/tv-casting-common/include/CastingServer.h b/examples/tv-casting-app/tv-casting-common/include/CastingServer.h index b24fe0fa0ec1c8..fd427afc712639 100644 --- a/examples/tv-casting-app/tv-casting-common/include/CastingServer.h +++ b/examples/tv-casting-app/tv-casting-common/include/CastingServer.h @@ -22,6 +22,7 @@ #include "ApplicationBasic.h" #include "ApplicationLauncher.h" #include "Channel.h" +#include "CommissioningCallbacks.h" #include "ContentLauncher.h" #include "KeypadInput.h" #include "LevelControl.h" @@ -33,6 +34,7 @@ #include "TargetVideoPlayerInfo.h" #include +#include #include #include #include @@ -45,7 +47,7 @@ constexpr chip::System::Clock::Seconds16 kCommissioningWindowTimeout = chip::Sys * and then have it send TV Casting/Media related commands. This is to be instantiated * as a singleton and is to be used across Linux, Android and iOS. */ -class CastingServer +class CastingServer : public AppDelegate { public: CastingServer(CastingServer & other) = delete; @@ -55,11 +57,12 @@ class CastingServer CHIP_ERROR PreInit(AppParams * AppParams = nullptr); CHIP_ERROR Init(AppParams * AppParams = nullptr); CHIP_ERROR InitBindingHandlers(); + void InitAppDelegation(); CHIP_ERROR DiscoverCommissioners(chip::Controller::DeviceDiscoveryDelegate * deviceDiscoveryDelegate = nullptr); const chip::Dnssd::DiscoveredNodeData * GetDiscoveredCommissioner(int index, chip::Optional & outAssociatedConnectableVideoPlayer); - CHIP_ERROR OpenBasicCommissioningWindow(std::function commissioningCompleteCallback, + CHIP_ERROR OpenBasicCommissioningWindow(CommissioningCallbacks commissioningCallbacks, std::function onConnectionSuccess, std::function onConnectionFailure, std::function onNewOrUpdatedEndpoint); @@ -429,6 +432,13 @@ class CastingServer static void DeviceEventCallback(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg); void ReadServerClusters(chip::EndpointId endpointId); + void OnCommissioningSessionEstablishmentStarted() override; + void OnCommissioningSessionStarted() override; + void OnCommissioningSessionEstablishmentError(CHIP_ERROR err) override; + void OnCommissioningSessionStopped() override; + void OnCommissioningWindowOpened() override {} + void OnCommissioningWindowClosed() override {} + /** * @brief Retrieve the IP Address to use for the UDC request. * This function will look for an IPv4 address in the list of IPAddresses passed in if available and return @@ -456,7 +466,8 @@ class CastingServer chip::Inet::IPAddress mTargetVideoPlayerIpAddress[chip::Dnssd::CommonResolutionData::kMaxIPAddresses]; chip::Controller::CommissionableNodeController mCommissionableNodeController; - std::function mCommissioningCompleteCallback; + + CommissioningCallbacks mCommissioningCallbacks; std::function mOnNewOrUpdatedEndpoint; std::function mOnConnectionSuccessClientCallback; diff --git a/examples/tv-casting-app/tv-casting-common/include/CommissioningCallbacks.h b/examples/tv-casting-app/tv-casting-common/include/CommissioningCallbacks.h new file mode 100644 index 00000000000000..06d31eb2b50253 --- /dev/null +++ b/examples/tv-casting-app/tv-casting-common/include/CommissioningCallbacks.h @@ -0,0 +1,53 @@ +/* + * + * Copyright (c) 2023 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 + +struct CommissioningCallbacks +{ + /** + * This is called when the PBKDFParamRequest is received and indicates the start of the session establishment process + */ + std::function sessionEstablishmentStarted = {}; + + /** + * This is called when the commissioning session has been established + */ + std::function sessionEstablished = {}; + + /** + * This is called when the PASE establishment failed (such as, when an invalid passcode is provided) or PASE was established + * fine but then the fail-safe expired (including being expired by the commissioner) + * + * The CHIP_ERROR param indicates the error that occurred during session establishment or the error accompanying the fail-safe + * timeout. + */ + std::function sessionEstablishmentError = {}; + + /** + * This is called when the PASE establishment failed or PASE was established fine but then the fail-safe expired (including + * being expired by the commissioner) AND the commissioning window is closed. The window may be closed because the commissioning + * attempts limit was reached or advertising/listening for PASE failed. + */ + std::function sessionEstablishmentStopped = {}; + + /** + * This is called when the commissioning has been completed + */ + std::function commissioningComplete = {}; +}; diff --git a/examples/tv-casting-app/tv-casting-common/include/TargetVideoPlayerInfo.h b/examples/tv-casting-app/tv-casting-common/include/TargetVideoPlayerInfo.h index 076149f786ed52..bbc086ae64a52d 100644 --- a/examples/tv-casting-app/tv-casting-common/include/TargetVideoPlayerInfo.h +++ b/examples/tv-casting-app/tv-casting-common/include/TargetVideoPlayerInfo.h @@ -110,7 +110,6 @@ class TargetVideoPlayerInfo static void HandleDeviceConnected(void * context, chip::Messaging::ExchangeManager & exchangeMgr, const chip::SessionHandle & sessionHandle) { - ChipLogProgress(AppServer, "tmplog: HandleDeviceConnected called"); VideoPlayerConnectionContext * connectionContext = static_cast(context); if (connectionContext == nullptr || connectionContext->mTargetVideoPlayerInfo == nullptr) { diff --git a/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp b/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp index 313a6dc2e6a6d0..1d40cb500c287e 100644 --- a/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp +++ b/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp @@ -54,6 +54,9 @@ CHIP_ERROR CastingServer::Init(AppParams * AppParams) return CHIP_NO_ERROR; } + // Set CastingServer as AppDelegate + InitAppDelegation(); + // Initialize binding handlers ReturnErrorOnFailure(InitBindingHandlers()); @@ -67,6 +70,11 @@ CHIP_ERROR CastingServer::Init(AppParams * AppParams) return CHIP_NO_ERROR; } +void CastingServer::InitAppDelegation() +{ + chip::Server::Server::GetInstance().GetCommissioningWindowManager().SetAppDelegate(this); +} + CHIP_ERROR CastingServer::SetRotatingDeviceIdUniqueId(chip::Optional rotatingDeviceIdUniqueIdOptional) { #if CHIP_ENABLE_ROTATING_DEVICE_ID @@ -130,18 +138,55 @@ CHIP_ERROR CastingServer::DiscoverCommissioners(DeviceDiscoveryDelegate * device Dnssd::DiscoveryFilter(Dnssd::DiscoveryFilterType::kDeviceType, static_cast(35))); } -CHIP_ERROR CastingServer::OpenBasicCommissioningWindow(std::function commissioningCompleteCallback, +CHIP_ERROR CastingServer::OpenBasicCommissioningWindow(CommissioningCallbacks commissioningCallbacks, std::function onConnectionSuccess, std::function onConnectionFailure, std::function onNewOrUpdatedEndpoint) { - mCommissioningCompleteCallback = commissioningCompleteCallback; + mCommissioningCallbacks = commissioningCallbacks; mOnConnectionSuccessClientCallback = onConnectionSuccess; mOnConnectionFailureClientCallback = onConnectionFailure; mOnNewOrUpdatedEndpoint = onNewOrUpdatedEndpoint; return Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow(kCommissioningWindowTimeout); } +void CastingServer::OnCommissioningSessionStarted() +{ + ChipLogProgress(AppServer, "CastingServer::OnCommissioningSessionStarted"); + if (mCommissioningCallbacks.sessionEstablished) + { + + mCommissioningCallbacks.sessionEstablished(); + } +} + +void CastingServer::OnCommissioningSessionEstablishmentError(CHIP_ERROR err) +{ + ChipLogProgress(AppServer, "CastingServer::OnCommissioningSessionEstablishmentError"); + if (mCommissioningCallbacks.sessionEstablishmentError) + { + mCommissioningCallbacks.sessionEstablishmentError(err); + } +} + +void CastingServer::OnCommissioningSessionStopped() +{ + ChipLogProgress(AppServer, "CastingServer::OnCommissioningSessionStopped"); + if (mCommissioningCallbacks.sessionEstablishmentStopped) + { + mCommissioningCallbacks.sessionEstablishmentStopped(); + } +} + +void CastingServer::OnCommissioningSessionEstablishmentStarted() +{ + ChipLogProgress(AppServer, "CastingServer::OnCommissioningSessionEstablishmentStarted"); + if (mCommissioningCallbacks.sessionEstablishmentStarted) + { + mCommissioningCallbacks.sessionEstablishmentStarted(); + } +} + #if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT CHIP_ERROR CastingServer::SendUserDirectedCommissioningRequest(chip::Transport::PeerAddress commissioner) { @@ -433,7 +478,10 @@ void CastingServer::DeviceEventCallback(const DeviceLayer::ChipDeviceEvent * eve { ChipLogError(AppServer, "CastingServer::DeviceEventCallback accessingFabricIndex: %d did not match bindings", event->BindingsChanged.fabricIndex); - CastingServer::GetInstance()->mCommissioningCompleteCallback(CHIP_ERROR_INCORRECT_STATE); + if (CastingServer::GetInstance()->mCommissioningCallbacks.commissioningComplete) + { + CastingServer::GetInstance()->mCommissioningCallbacks.commissioningComplete(CHIP_ERROR_INCORRECT_STATE); + } return; } } @@ -472,7 +520,10 @@ void CastingServer::DeviceEventCallback(const DeviceLayer::ChipDeviceEvent * eve ChipLogError(AppServer, "AddVideoPlayer(ToCache) error: %" CHIP_ERROR_FORMAT, err.Format()); } - CastingServer::GetInstance()->mCommissioningCompleteCallback(err); + if (CastingServer::GetInstance()->mCommissioningCallbacks.commissioningComplete) + { + CastingServer::GetInstance()->mCommissioningCallbacks.commissioningComplete(err); + } } } 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 1a5e07badae611..8d2b798ea7abbf 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 @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -15429,5 +15429,6 @@ "endpointVersion": 1, "deviceIdentifier": 41 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/DeepLink.kt b/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/DeepLink.kt index 1a84f4a6840cd2..78e6649de44b43 100644 --- a/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/DeepLink.kt +++ b/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/DeepLink.kt @@ -18,4 +18,12 @@ object DeepLink { ) .build() } + + fun getDeepLinkRequestForLoadingFragment(setting: String): NavDeepLinkRequest { + return NavDeepLinkRequest.Builder.fromUri( + "android-app://com.matter.virtual.device.app.feature.main/loadingFragment/${setting}" + .toUri() + ) + .build() + } } diff --git a/examples/virtual-device-app/android/App/feature/control/.gitignore b/examples/virtual-device-app/android/App/feature/control/.gitignore new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/examples/virtual-device-app/android/App/feature/control/build.gradle.kts b/examples/virtual-device-app/android/App/feature/control/build.gradle.kts new file mode 100644 index 00000000000000..a9315f089d25ed --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/control/build.gradle.kts @@ -0,0 +1,63 @@ +import com.matter.buildsrc.Deps +import com.matter.buildsrc.Versions + +plugins { + id("com.android.library") + id("org.jetbrains.kotlin.android") + id("com.google.dagger.hilt.android") + id("androidx.navigation.safeargs.kotlin") + kotlin("kapt") +} + +android { + namespace = "com.matter.virtual.device.app.feature.control" + compileSdk = Versions.compileSdkVersion + + defaultConfig { + minSdk = Versions.minSdkVersion + targetSdk = Versions.targetSdkVersion + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = "1.8" + } + buildFeatures { + viewBinding = true + dataBinding = true + } +} + +dependencies { + + implementation(Deps.AndroidX.core) + implementation(Deps.AndroidX.appcompat) + implementation(Deps.AndroidX.fragment) + + implementation(Deps.Navigation.fragment) + implementation(Deps.Navigation.ui) + + implementation(Deps.Dagger.hiltAndroid) + kapt(Deps.Dagger.hiltAndroidCompiler) + + implementation(Deps.timber) + + testImplementation(Deps.Test.junit) + androidTestImplementation(Deps.Test.junitExt) + androidTestImplementation(Deps.Test.espresso) +} \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/feature/control/proguard-rules.pro b/examples/virtual-device-app/android/App/feature/control/proguard-rules.pro new file mode 100644 index 00000000000000..481bb434814107 --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/control/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/feature/control/src/androidTest/java/com/matter/virtual/device/app/feature/control/ExampleInstrumentedTest.kt b/examples/virtual-device-app/android/App/feature/control/src/androidTest/java/com/matter/virtual/device/app/feature/control/ExampleInstrumentedTest.kt new file mode 100644 index 00000000000000..026c8837f4b6ec --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/control/src/androidTest/java/com/matter/virtual/device/app/feature/control/ExampleInstrumentedTest.kt @@ -0,0 +1,22 @@ +package com.matter.virtual.device.app.feature.control + +import androidx.test.ext.junit.runners.AndroidJUnit4 +import androidx.test.platform.app.InstrumentationRegistry +import org.junit.Assert.* +import org.junit.Test +import org.junit.runner.RunWith + +/** + * Instrumented test, which will execute on an Android device. + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +@RunWith(AndroidJUnit4::class) +class ExampleInstrumentedTest { + @Test + fun useAppContext() { + // Context of the app under test. + val appContext = InstrumentationRegistry.getInstrumentation().targetContext + assertEquals("com.matter.virtual.device.app.feature.control.test", appContext.packageName) + } +} diff --git a/examples/virtual-device-app/android/App/feature/control/src/main/AndroidManifest.xml b/examples/virtual-device-app/android/App/feature/control/src/main/AndroidManifest.xml new file mode 100644 index 00000000000000..a5918e68abcdde --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/control/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/feature/control/src/main/java/com/matter/virtual/device/app/feature/control/OnOffSwitchFragment.kt b/examples/virtual-device-app/android/App/feature/control/src/main/java/com/matter/virtual/device/app/feature/control/OnOffSwitchFragment.kt new file mode 100644 index 00000000000000..5f89d07467ed5f --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/control/src/main/java/com/matter/virtual/device/app/feature/control/OnOffSwitchFragment.kt @@ -0,0 +1,44 @@ +package com.matter.virtual.device.app.feature.control + +import android.os.Bundle +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import androidx.databinding.DataBindingUtil +import androidx.fragment.app.Fragment +import com.matter.virtual.device.app.feature.control.databinding.FragmentOnOffSwitchBinding +import dagger.hilt.android.AndroidEntryPoint +import timber.log.Timber + +@AndroidEntryPoint +class OnOffSwitchFragment : Fragment() { + + private lateinit var binding: FragmentOnOffSwitchBinding + + override fun onCreateView( + inflater: LayoutInflater, + container: ViewGroup?, + savedInstanceState: Bundle? + ): View { + Timber.d("onCreateView()") + binding = DataBindingUtil.inflate(inflater, R.layout.fragment_on_off_switch, container, false) + binding.lifecycleOwner = viewLifecycleOwner + + return binding.root + } + + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + Timber.d("onViewCreated()") + super.onViewCreated(view, savedInstanceState) + } + + override fun onResume() { + Timber.d("onResume()") + super.onResume() + } + + override fun onDestroy() { + Timber.d("onDestroy()") + super.onDestroy() + } +} diff --git a/examples/virtual-device-app/android/App/feature/control/src/main/res/layout/fragment_on_off_switch.xml b/examples/virtual-device-app/android/App/feature/control/src/main/res/layout/fragment_on_off_switch.xml new file mode 100644 index 00000000000000..35d548cddf3cc8 --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/control/src/main/res/layout/fragment_on_off_switch.xml @@ -0,0 +1,10 @@ + + + + + + + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/feature/control/src/main/res/navigation/control_nav_graph.xml b/examples/virtual-device-app/android/App/feature/control/src/main/res/navigation/control_nav_graph.xml new file mode 100644 index 00000000000000..def2abe07888fe --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/control/src/main/res/navigation/control_nav_graph.xml @@ -0,0 +1,18 @@ + + + + + + + + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/feature/control/src/test/java/com/matter/virtual/device/app/feature/control/ExampleUnitTest.kt b/examples/virtual-device-app/android/App/feature/control/src/test/java/com/matter/virtual/device/app/feature/control/ExampleUnitTest.kt new file mode 100644 index 00000000000000..0aabc46fdb7aa0 --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/control/src/test/java/com/matter/virtual/device/app/feature/control/ExampleUnitTest.kt @@ -0,0 +1,16 @@ +package com.matter.virtual.device.app.feature.control + +import org.junit.Assert.* +import org.junit.Test + +/** + * Example local unit test, which will execute on the development machine (host). + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +class ExampleUnitTest { + @Test + fun addition_isCorrect() { + assertEquals(4, 2 + 2) + } +} diff --git a/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/LoadingFragment.kt b/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/LoadingFragment.kt new file mode 100644 index 00000000000000..8c81bd26429433 --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/LoadingFragment.kt @@ -0,0 +1,95 @@ +package com.matter.virtual.device.app.feature.main + +import android.content.Context +import android.os.Bundle +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import androidx.activity.OnBackPressedCallback +import androidx.appcompat.app.AppCompatActivity +import androidx.databinding.DataBindingUtil +import androidx.fragment.app.Fragment +import androidx.navigation.fragment.findNavController +import androidx.navigation.fragment.navArgs +import com.matter.virtual.device.app.core.common.MatterSettings +import com.matter.virtual.device.app.feature.main.databinding.FragmentLoadingBinding +import dagger.hilt.android.AndroidEntryPoint +import kotlin.math.abs +import kotlinx.serialization.ExperimentalSerializationApi +import kotlinx.serialization.decodeFromString +import kotlinx.serialization.json.Json +import timber.log.Timber + +@AndroidEntryPoint +class LoadingFragment : Fragment() { + + private lateinit var binding: FragmentLoadingBinding + + private lateinit var matterSettings: MatterSettings + private lateinit var onBackPressedCallback: OnBackPressedCallback + + override fun onCreateView( + inflater: LayoutInflater, + container: ViewGroup?, + savedInstanceState: Bundle? + ): View { + Timber.d("Hit") + binding = DataBindingUtil.inflate(inflater, R.layout.fragment_loading, container, false) + binding.lifecycleOwner = viewLifecycleOwner + + return binding.root + } + + @OptIn(ExperimentalSerializationApi::class) + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + Timber.d("Hit") + super.onViewCreated(view, savedInstanceState) + + (activity as AppCompatActivity).setSupportActionBar(binding.toolbar) + (activity as AppCompatActivity).supportActionBar?.setDisplayHomeAsUpEnabled(true) + + binding.appBarLayout.addOnOffsetChangedListener { appBarLayout, verticalOffset -> + var ratio = 0F + if (abs(verticalOffset) != 0) { + ratio = abs(verticalOffset).toFloat() / appBarLayout.totalScrollRange.toFloat() + } + + binding.collapseTitle.alpha = 1f - ratio * 2f + 0.1f + binding.toolbarTitle.alpha = (ratio - 0.5f) * 2f + 0.1f + } + + val args: LoadingFragmentArgs by navArgs() + this.matterSettings = Json.decodeFromString(args.setting) + } + + override fun onResume() { + Timber.d("Hit") + super.onResume() + } + + override fun onAttach(context: Context) { + Timber.d("Hit") + super.onAttach(context) + + onBackPressedCallback = + object : OnBackPressedCallback(true) { + override fun handleOnBackPressed() { + Timber.d("handleOnBackPressed()") + findNavController().popBackStack() + } + } + + requireActivity().onBackPressedDispatcher.addCallback(this, onBackPressedCallback) + } + + override fun onDetach() { + Timber.d("Hit") + super.onDetach() + onBackPressedCallback.remove() + } + + override fun onDestroy() { + Timber.d("Hit") + super.onDestroy() + } +} diff --git a/examples/virtual-device-app/android/App/feature/main/src/main/res/layout/fragment_loading.xml b/examples/virtual-device-app/android/App/feature/main/src/main/res/layout/fragment_loading.xml new file mode 100644 index 00000000000000..852207c49e1b6f --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/main/src/main/res/layout/fragment_loading.xml @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/feature/main/src/main/res/navigation/main_nav_graph.xml b/examples/virtual-device-app/android/App/feature/main/src/main/res/navigation/main_nav_graph.xml index c3f66c3f7c5bbe..81cbc65fbec062 100644 --- a/examples/virtual-device-app/android/App/feature/main/src/main/res/navigation/main_nav_graph.xml +++ b/examples/virtual-device-app/android/App/feature/main/src/main/res/navigation/main_nav_graph.xml @@ -10,4 +10,15 @@ android:name="com.matter.virtual.device.app.feature.main.MainFragment" android:label="MainFragment" tools:layout="@layout/fragment_main" /> + + + + + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/feature/main/src/main/res/values/strings.xml b/examples/virtual-device-app/android/App/feature/main/src/main/res/values/strings.xml index 22caae70477e41..23e5916e74f482 100644 --- a/examples/virtual-device-app/android/App/feature/main/src/main/res/values/strings.xml +++ b/examples/virtual-device-app/android/App/feature/main/src/main/res/values/strings.xml @@ -1,4 +1,6 @@ Matter Virtual Device + Loading + Commissioning in process. \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/settings.gradle.kts b/examples/virtual-device-app/android/App/settings.gradle.kts index 0ae5b79223eba3..78cbf5ec8af59d 100644 --- a/examples/virtual-device-app/android/App/settings.gradle.kts +++ b/examples/virtual-device-app/android/App/settings.gradle.kts @@ -19,6 +19,7 @@ include(":core:data") include(":core:domain") include(":core:matter") include(":core:model") +include(":feature:control") include(":feature:main") include(":feature:qrcode") include(":feature:setup") diff --git a/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap b/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap index 939b94dae34954..8b7302ca6b3172 100644 --- a/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap +++ b/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7699,7 +7699,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8627,7 +8627,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/window-app/common/window-app.zap b/examples/window-app/common/window-app.zap index ca5e685bad2d7e..8c4fcc8066c736 100644 --- a/examples/window-app/common/window-app.zap +++ b/examples/window-app/common/window-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { diff --git a/examples/window-app/silabs/README.md b/examples/window-app/silabs/README.md index 6152acb87a5503..a7555003b8dc93 100644 --- a/examples/window-app/silabs/README.md +++ b/examples/window-app/silabs/README.md @@ -120,9 +120,9 @@ Silicon Labs platform. $ cd ~/connectedhomeip/examples/window-app/silabs/efr32 $ rm -rf out/ -* Build the example as Sleepy End Device (SED) +* Build the example as Intermittently Connected Device (ICD) - $ ./scripts/examples/gn_silabs_example.sh ./examples/window-app/silabs/efr32/ ./out/window-app_SED BRD4187C --sed + $ ./scripts/examples/gn_silabs_example.sh ./examples/window-app/silabs/efr32/ ./out/window-app_ICD BRD4187C --icd or use gn as previously mentioned but adding the following arguments: diff --git a/integrations/cloudbuild/build-all.yaml b/integrations/cloudbuild/build-all.yaml index 82031d7d8ca77c..a1a8a1832d8726 100644 --- a/integrations/cloudbuild/build-all.yaml +++ b/integrations/cloudbuild/build-all.yaml @@ -6,7 +6,7 @@ steps: - "--init" - "--recursive" id: Submodules - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -21,7 +21,7 @@ steps: path: /pwenv timeout: 900s - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -85,7 +85,7 @@ steps: --target k32w-shell build --create-archives /workspace/artifacts/ - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" env: - PW_ENVIRONMENT_ROOT=/pwenv args: diff --git a/integrations/cloudbuild/chef.yaml b/integrations/cloudbuild/chef.yaml index d725de837b0fb2..eeb87bd3821b17 100644 --- a/integrations/cloudbuild/chef.yaml +++ b/integrations/cloudbuild/chef.yaml @@ -1,5 +1,5 @@ steps: - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -12,7 +12,7 @@ steps: path: /pwenv timeout: 2700s - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -27,7 +27,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" env: - PW_ENVIRONMENT_ROOT=/pwenv args: diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml index a745ee172004cc..9d5a85f5f4acab 100644 --- a/integrations/cloudbuild/smoke-test.yaml +++ b/integrations/cloudbuild/smoke-test.yaml @@ -1,5 +1,5 @@ steps: - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" entrypoint: "bash" args: - "-c" @@ -7,7 +7,7 @@ steps: git config --global --add safe.directory "*" git submodule update --init --recursive id: Submodules - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -22,7 +22,7 @@ steps: path: /pwenv timeout: 900s - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" id: ESP32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -43,7 +43,7 @@ steps: volumes: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" id: NRFConnect env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -64,7 +64,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" id: EFR32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -86,7 +86,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" id: Linux env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -139,7 +139,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" id: Android env: - PW_ENVIRONMENT_ROOT=/pwenv diff --git a/integrations/docker/images/base/chip-build/Dockerfile b/integrations/docker/images/base/chip-build/Dockerfile index 60f8cd9a1e015a..a3c4e23fb11210 100644 --- a/integrations/docker/images/base/chip-build/Dockerfile +++ b/integrations/docker/images/base/chip-build/Dockerfile @@ -41,7 +41,7 @@ RUN set -x \ clang-tidy \ curl \ flex \ - g++ \ + g++-10 \ git \ git-lfs \ gperf \ @@ -98,6 +98,16 @@ RUN set -x \ && git lfs install \ && : # last line +# Set gcc 10 as a default compiler to work with TSAN +RUN set -x \ + && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10 \ + && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10 \ + && update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30 \ + && update-alternatives --set cc /usr/bin/gcc \ + && update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30 \ + && update-alternatives --set c++ /usr/bin/g++ \ + && : # last line + # Cmake v3.23.1 ENV CMAKE_PLATFORM_VERSION= RUN case ${TARGETPLATFORM} in \ @@ -206,7 +216,7 @@ RUN case ${TARGETPLATFORM} in \ && export CCACHE_DISABLE=1 PYTHONDONTWRITEBYTECODE=1 \ && GLIB_VERSION=$(pkg-config --modversion glib-2.0) \ && git clone --depth=1 --branch=$GLIB_VERSION https://github.com/GNOME/glib.git \ - && CFLAGS="-O2 -g -fsanitize=thread" meson glib/build glib \ + && CFLAGS="-O2 -g -fsanitize=thread" meson glib/build glib -Dtests=false \ && DESTDIR=../build-image ninja -C glib/build install \ && mv glib/build-image/usr/local/lib/x86_64-linux-gnu/lib* $LD_LIBRARY_PATH_TSAN \ && rm -rf glib \ diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version index b582892cadd6e1..17e40cdd356a3d 100644 --- a/integrations/docker/images/base/chip-build/version +++ b/integrations/docker/images/base/chip-build/version @@ -1 +1 @@ -3 : [Ameba] Upgrade to c++17 +4 : [Ameba] Upgrade to c++17 diff --git a/scripts/examples/gn_silabs_example.sh b/scripts/examples/gn_silabs_example.sh index f966cebed9dd62..90adc9f9b9ed25 100755 --- a/scripts/examples/gn_silabs_example.sh +++ b/scripts/examples/gn_silabs_example.sh @@ -114,12 +114,12 @@ if [ "$#" == "0" ]; then siwx917_commissionable_data Build with the commissionable data given in DeviceConfig.h (only for SiWx917) Presets - --sed - enable sleepy end device, set thread mtd + --icd + enable ICD features, set thread mtd For minimum consumption, add --low-power --low-power disables all power consuming features for the most power efficient build - This flag is to be used with --sed + This flag is to be used with --icd --wifi build wifi example variant for given exansion board --additional_data_advertising @@ -181,7 +181,7 @@ else shift shift ;; - --sed) + --icd) optArgs+="chip_enable_icd_server=true chip_openthread_ftd=false " shift ;; diff --git a/scripts/py_matter_yamltests/matter_yamltests/hooks.py b/scripts/py_matter_yamltests/matter_yamltests/hooks.py index 6017dd68ad8f2f..b68ae35fd6ce94 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/hooks.py +++ b/scripts/py_matter_yamltests/matter_yamltests/hooks.py @@ -18,6 +18,8 @@ class TestParserHooks(): + __test__ = False + def start(self, count: int): """ This method is called when the parser starts parsing a set of files. @@ -77,6 +79,8 @@ def test_success(self, duration: int): class TestRunnerHooks(): + __test__ = False + def start(self, count: int): """ This method is called when the runner starts running a set of tests. diff --git a/scripts/setup/constraints.txt b/scripts/setup/constraints.txt index 5573d0bc48221f..fa15e9d94ab800 100644 --- a/scripts/setup/constraints.txt +++ b/scripts/setup/constraints.txt @@ -248,7 +248,7 @@ pykwalify==1.8.0 # via west pylink-square==0.5.0 # via bflb-iot-tool -pyparsing==2.3.1 +pyparsing==3.0.9 # via -r requirements.esp32.txt pypng==0.0.21 # via -r requirements.telink.txt diff --git a/scripts/setup/requirements.esp32.txt b/scripts/setup/requirements.esp32.txt index f688b17b1a521b..d0d6d924ff8ddb 100644 --- a/scripts/setup/requirements.esp32.txt +++ b/scripts/setup/requirements.esp32.txt @@ -1,18 +1,15 @@ click>=7.0 future>=0.15.2 -pyparsing>=2.0.3,<2.4.0 +# pyparsing: Min version was set based on https://github.com/pyparsing/pyparsing/issues/319 +# pyparsing: Max version was set to avoid breaking changes +pyparsing>=3.0.3,<3.1 idf-component-manager pygdbmi<=0.9.0.2 reedsolo>=1.5.3,<=1.5.4 bitstring>=3.1.6,<4 ecdsa>=0.16.0 -kconfiglib==13.7.1 construct==2.10.54 python-socketio<5 itsdangerous<2.1 ; python_version < "3.11" -# -# gdbgui pulls in gevent which fails to compile due to cython updates. -# Could not find a good way to fix this dependency, so commenting it -# out here. -# -# gdbgui==0.13.2.0 ; python_version < "3.11" and platform_machine != 'aarch64' and sys_platform == 'linux' +esp_idf_monitor==1.1.1 +esp-idf-kconfig==1.2.0 diff --git a/scripts/setup/zap.json b/scripts/setup/zap.json index 74901d88faf06b..95b8b0a56c4495 100644 --- a/scripts/setup/zap.json +++ b/scripts/setup/zap.json @@ -8,13 +8,13 @@ "mac-amd64", "windows-amd64" ], - "tags": ["version:2@v2023.07.21-nightly.1"] + "tags": ["version:2@v2023.08.01-nightly.1"] }, { "_comment": "Always get the amd64 version on mac until usable arm64 zap build is available", "path": "fuchsia/third_party/zap/mac-amd64", "platforms": ["mac-arm64"], - "tags": ["version:2@v2023.07.21-nightly.1"] + "tags": ["version:2@v2023.08.01-nightly.1"] } ] } diff --git a/scripts/setup/zap.version b/scripts/setup/zap.version index 543bb412a09ac6..ea7688be7708a5 100644 --- a/scripts/setup/zap.version +++ b/scripts/setup/zap.version @@ -1 +1 @@ -v2023.07.21-nightly +v2023.08.01-nightly diff --git a/scripts/tools/zap/tests/inputs/all-clusters-app.zap b/scripts/tools/zap/tests/inputs/all-clusters-app.zap index df044418b41a33..de1df2565556fc 100644 --- a/scripts/tools/zap/tests/inputs/all-clusters-app.zap +++ b/scripts/tools/zap/tests/inputs/all-clusters-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -16,12 +16,6 @@ } ], "package": [ - { - "pathRelativity": "relativeToZap", - "path": "../../../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" - }, { "pathRelativity": "relativeToZap", "path": "../../../../../src/app/zap-templates/zcl/zcl-with-test-extensions.json", @@ -29,6 +23,12 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data with some extensions" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" } ], "endpointTypes": [ @@ -2753,7 +2753,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11575,7 +11575,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22802,7 +22802,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/scripts/tools/zap/tests/inputs/lighting-app.zap b/scripts/tools/zap/tests/inputs/lighting-app.zap index 1793810e60e7aa..8f6ab7a34f2132 100644 --- a/scripts/tools/zap/tests/inputs/lighting-app.zap +++ b/scripts/tools/zap/tests/inputs/lighting-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -8309,5 +8309,6 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/scripts/tools/zap/zap_execution.py b/scripts/tools/zap/zap_execution.py index 6a07e8eb08a320..9db6537dc32e8d 100644 --- a/scripts/tools/zap/zap_execution.py +++ b/scripts/tools/zap/zap_execution.py @@ -23,7 +23,7 @@ # Use scripts/tools/zap/version_update.py to manage ZAP versioning as many # files may need updating for versions # -MIN_ZAP_VERSION = '2023.7.20' +MIN_ZAP_VERSION = '2023.8.1' class ZapTool: diff --git a/src/app/AttributePathExpandIterator.cpp b/src/app/AttributePathExpandIterator.cpp index 6c45055c3933b0..5c1bb50c179f47 100644 --- a/src/app/AttributePathExpandIterator.cpp +++ b/src/app/AttributePathExpandIterator.cpp @@ -141,6 +141,11 @@ void AttributePathExpandIterator::PrepareAttributeIndexRange(const AttributePath } mGlobalAttributeEndIndex = static_cast(mGlobalAttributeIndex + 1); } + else + { + mGlobalAttributeIndex = UINT8_MAX; + mGlobalAttributeEndIndex = 0; + } } } diff --git a/src/app/AttributePathParams.h b/src/app/AttributePathParams.h index adfc77cfe27830..b03153d71c2e2f 100644 --- a/src/app/AttributePathParams.h +++ b/src/app/AttributePathParams.h @@ -24,7 +24,9 @@ namespace chip { namespace app { +#if CHIP_CONFIG_ENABLE_READ_CLIENT class ReadClient; +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT struct AttributePathParams { // diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index 312a53aa6ee1a7..f5a167ca7e7aff 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -58,6 +58,7 @@ buildconfig_header("app_buildconfig") { "CHIP_CONFIG_SUBSCRIPTION_TIMEOUT_RESUMPTION=${chip_subscription_timeout_resumption}", "CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE=${enable_eventlist_attribute}", "CHIP_CONFIG_ENABLE_ICD_SERVER=${chip_enable_icd_server}", + "CHIP_CONFIG_ENABLE_READ_CLIENT=${chip_enable_read_client}", ] } @@ -76,7 +77,6 @@ static_library("app") { "AttributePathExpandIterator.h", "AttributePathParams.h", "AttributePersistenceProvider.h", - "BufferedReadCallback.cpp", "CASEClient.cpp", "CASEClient.h", "CASEClientPool.h", @@ -84,8 +84,6 @@ static_library("app") { "CASESessionManager.h", "ChunkedWriteCallback.cpp", "ChunkedWriteCallback.h", - "ClusterStateCache.cpp", - "ClusterStateCache.h", "CommandHandler.cpp", "CommandResponseHelper.h", "CommandSender.cpp", @@ -179,7 +177,6 @@ static_library("app") { "OperationalSessionSetup.cpp", "OperationalSessionSetup.h", "OperationalSessionSetupPool.h", - "ReadClient.cpp", "ReadHandler.cpp", "RequiredPrivilege.cpp", "RequiredPrivilege.h", @@ -210,6 +207,15 @@ static_library("app") { ] } + if (chip_enable_read_client) { + sources += [ + "BufferedReadCallback.cpp", + "ClusterStateCache.cpp", + "ClusterStateCache.h", + "ReadClient.cpp", + ] + } + public_deps = [ ":app_config", "${chip_root}/src/access", diff --git a/src/app/BufferedReadCallback.h b/src/app/BufferedReadCallback.h index 7779446f5a78fd..0616bb09958348 100644 --- a/src/app/BufferedReadCallback.h +++ b/src/app/BufferedReadCallback.h @@ -25,6 +25,7 @@ #include #include +#if CHIP_CONFIG_ENABLE_READ_CLIENT namespace chip { namespace app { @@ -133,3 +134,4 @@ class BufferedReadCallback : public ReadClient::Callback } // namespace app } // namespace chip +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT diff --git a/src/app/ClusterStateCache.h b/src/app/ClusterStateCache.h index e0d5d98d72a5ec..9e08abacde7768 100644 --- a/src/app/ClusterStateCache.h +++ b/src/app/ClusterStateCache.h @@ -33,6 +33,7 @@ #include #include +#if CHIP_CONFIG_ENABLE_READ_CLIENT namespace chip { namespace app { /* @@ -660,5 +661,6 @@ class ClusterStateCache : protected ReadClient::Callback const bool mCacheData = true; }; -}; // namespace app -}; // namespace chip +}; // namespace app +}; // namespace chip +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index 933b5a4c118254..23aaf9d85d03be 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -108,6 +108,7 @@ void InteractionModelEngine::Shutdown() mReadHandlers.ReleaseAll(); +#if CHIP_CONFIG_ENABLE_READ_CLIENT // Shut down any subscription clients that are still around. They won't be // able to work after this point anyway, since we're about to drop our refs // to them. @@ -134,6 +135,7 @@ void InteractionModelEngine::Shutdown() // After that, we just null out our tracker. // mpActiveReadClientList = nullptr; +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT for (auto & writeHandler : mWriteHandlers) { @@ -254,6 +256,7 @@ uint32_t InteractionModelEngine::GetNumActiveWriteHandlers() const return numActive; } +#if CHIP_CONFIG_ENABLE_READ_CLIENT CHIP_ERROR InteractionModelEngine::ShutdownSubscription(const ScopedNodeId & aPeerNodeId, SubscriptionId aSubscriptionId) { assertChipStackLockedByCurrentThread(); @@ -311,6 +314,7 @@ void InteractionModelEngine::ShutdownMatchingSubscriptions(const OptionalOnMessageReceived(apExchangeContext, aPayloadHeader, std::move(aPayload)); } +#if CHIP_CONFIG_ENABLE_READ_CLIENT Status InteractionModelEngine::OnUnsolicitedReportData(Messaging::ExchangeContext * apExchangeContext, const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload) { @@ -849,6 +854,7 @@ Status InteractionModelEngine::OnUnsolicitedReportData(Messaging::ExchangeContex return Status::InvalidSubscription; } +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT CHIP_ERROR InteractionModelEngine::OnUnsolicitedMessageReceived(const PayloadHeader & payloadHeader, ExchangeDelegate *& newDelegate) @@ -892,10 +898,12 @@ CHIP_ERROR InteractionModelEngine::OnMessageReceived(Messaging::ExchangeContext status = OnReadInitialRequest(apExchangeContext, aPayloadHeader, std::move(aPayload), ReadHandler::InteractionType::Subscribe); } +#if CHIP_CONFIG_ENABLE_READ_CLIENT else if (aPayloadHeader.HasMessageType(Protocols::InteractionModel::MsgType::ReportData)) { status = OnUnsolicitedReportData(apExchangeContext, aPayloadHeader, std::move(aPayload)); } +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT else if (aPayloadHeader.HasMessageType(MsgType::TimedRequest)) { OnTimedRequest(apExchangeContext, aPayloadHeader, std::move(aPayload), status); @@ -920,11 +928,13 @@ void InteractionModelEngine::OnResponseTimeout(Messaging::ExchangeContext * ec) ChipLogValueExchange(ec)); } +#if CHIP_CONFIG_ENABLE_READ_CLIENT void InteractionModelEngine::AddReadClient(ReadClient * apReadClient) { apReadClient->SetNextClient(mpActiveReadClientList); mpActiveReadClientList = apReadClient; } +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT bool InteractionModelEngine::TrimFabricForSubscriptions(FabricIndex aFabricIndex, bool aForceEvict) { @@ -1322,6 +1332,7 @@ Protocols::InteractionModel::Status InteractionModelEngine::EnsureResourceForRea return Status::Success; } +#if CHIP_CONFIG_ENABLE_READ_CLIENT void InteractionModelEngine::RemoveReadClient(ReadClient * apReadClient) { ReadClient * pPrevListItem = nullptr; @@ -1380,6 +1391,7 @@ bool InteractionModelEngine::InActiveReadClientList(ReadClient * apReadClient) return false; } +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT bool InteractionModelEngine::HasConflictWriteRequests(const WriteHandler * apWriteHandler, const ConcreteAttributePath & aPath) { @@ -1738,6 +1750,7 @@ void InteractionModelEngine::OnFabricRemoved(const FabricTable & fabricTable, Fa return Loop::Continue; }); +#if CHIP_CONFIG_ENABLE_READ_CLIENT for (auto * readClient = mpActiveReadClientList; readClient != nullptr; readClient = readClient->GetNextClient()) { if (readClient->GetFabricIndex() == fabricIndex) @@ -1746,6 +1759,7 @@ void InteractionModelEngine::OnFabricRemoved(const FabricTable & fabricTable, Fa readClient->Close(CHIP_ERROR_IM_FABRIC_DELETED, false); } } +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT for (auto & handler : mWriteHandlers) { diff --git a/src/app/InteractionModelEngine.h b/src/app/InteractionModelEngine.h index 6236ff63efc5ec..57e4c66475757f 100644 --- a/src/app/InteractionModelEngine.h +++ b/src/app/InteractionModelEngine.h @@ -129,6 +129,7 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, */ CASESessionManager * GetCASESessionManager() const { return mpCASESessionMgr; } +#if CHIP_CONFIG_ENABLE_READ_CLIENT /** * Tears down an active subscription. * @@ -151,6 +152,7 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, * Tears down all active subscriptions. */ void ShutdownAllSubscriptions(); +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT uint32_t GetNumActiveReadHandlers() const; uint32_t GetNumActiveReadHandlers(ReadHandler::InteractionType type) const; @@ -234,6 +236,7 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, void OnTimedWrite(TimedHandler * apTimedHandler, Messaging::ExchangeContext * apExchangeContext, const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload); +#if CHIP_CONFIG_ENABLE_READ_CLIENT /** * Add a read client to the internally tracked list of weak references. This list is used to * correctly dispatch unsolicited reports to the right matching handler by subscription ID. @@ -254,6 +257,7 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, * Return the number of active read clients being tracked by the engine. */ size_t GetNumActiveReadClients(); +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT /** * Returns the number of dirty subscriptions. Including the subscriptions that are generating reports. @@ -348,6 +352,7 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, // void ShutdownActiveReads() { +#if CHIP_CONFIG_ENABLE_READ_CLIENT for (auto * readClient = mpActiveReadClientList; readClient != nullptr;) { readClient->mpImEngine = nullptr; @@ -361,6 +366,7 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, // After that, we just null out our tracker. // mpActiveReadClientList = nullptr; +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT mReadHandlers.ReleaseAll(); } @@ -599,7 +605,9 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, ObjectPool mReadHandlers; +#if CHIP_CONFIG_ENABLE_READ_CLIENT ReadClient * mpActiveReadClientList = nullptr; +#endif ReadHandler::ApplicationCallback * mpReadHandlerApplicationCallback = nullptr; diff --git a/src/app/ReadClient.h b/src/app/ReadClient.h index 502e08eaa65a6a..71844713ff1461 100644 --- a/src/app/ReadClient.h +++ b/src/app/ReadClient.h @@ -49,6 +49,7 @@ #include #include +#if CHIP_CONFIG_ENABLE_READ_CLIENT namespace chip { namespace app { @@ -613,5 +614,6 @@ class ReadClient : public Messaging::ExchangeDelegate kReservedSizeForEndOfContainer + kReservedSizeForIMRevision + kReservedSizeForEndOfContainer; }; -}; // namespace app -}; // namespace chip +}; // namespace app +}; // namespace chip +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT diff --git a/src/app/ReadHandler.cpp b/src/app/ReadHandler.cpp index 1c3a40cc962273..4e9e8fccdf5646 100644 --- a/src/app/ReadHandler.cpp +++ b/src/app/ReadHandler.cpp @@ -713,6 +713,57 @@ CHIP_ERROR ReadHandler::ProcessSubscribeRequest(System::PacketBufferHandle && aP ReturnErrorOnFailure(subscribeRequestParser.GetMaxIntervalCeilingSeconds(&mMaxInterval)); VerifyOrReturnError(mMinIntervalFloorSeconds <= mMaxInterval, CHIP_ERROR_INVALID_ARGUMENT); +#if CHIP_CONFIG_ENABLE_ICD_SERVER + + // Default behavior for ICDs where the wanted MaxInterval for a subscription is the IdleModeInterval + // defined in the ICD Management Cluster. + // Behavior can be changed with the OnSubscriptionRequested function defined in the application callbacks + + // Default Behavior Steps : + // If MinInterval > IdleModeInterval, try to set the MaxInterval to the first interval of IdleModeIntervals above the + // MinInterval. + // If the next interval is greater than the MaxIntervalCeiling, use the MaxIntervalCeiling. + // Otherwise, use IdleModeInterval as MaxInterval + + // GetPublisherSelectedIntervalLimit() returns the IdleModeInterval if the device is an ICD + uint32_t decidedMaxInterval = GetPublisherSelectedIntervalLimit(); + + // Check if the PublisherSelectedIntervalLimit is 0. If so, set decidedMaxInterval to MaxIntervalCeiling + if (decidedMaxInterval == 0) + { + decidedMaxInterval = mMaxInterval; + } + + // If requestedMinInterval is greater than the IdleTimeInterval, select next active up time as max interval + if (mMinIntervalFloorSeconds > decidedMaxInterval) + { + uint16_t ratio = mMinIntervalFloorSeconds / static_cast(decidedMaxInterval); + if (mMinIntervalFloorSeconds % decidedMaxInterval) + { + ratio++; + } + + decidedMaxInterval *= ratio; + } + + // Verify that decidedMaxInterval is an acceptable value (overflow) + if (decidedMaxInterval > System::Clock::Seconds16::max().count()) + { + decidedMaxInterval = System::Clock::Seconds16::max().count(); + } + + // Verify that the decidedMaxInterval respects MAX(GetPublisherSelectedIntervalLimit(), MaxIntervalCeiling) + uint16_t maximumMaxInterval = std::max(GetPublisherSelectedIntervalLimit(), mMaxInterval); + if (decidedMaxInterval > maximumMaxInterval) + { + decidedMaxInterval = maximumMaxInterval; + } + + // Set max interval of the subscription + mMaxInterval = static_cast(decidedMaxInterval); + +#endif // CHIP_CONFIG_ENABLE_ICD_SERVER + // // Notify the application (if requested) of the impending subscription and check whether we should still proceed to set it up. // This also provides the application an opportunity to modify the negotiated min/max intervals set above. diff --git a/src/app/clusters/descriptor/descriptor.cpp b/src/app/clusters/descriptor/descriptor.cpp index 95f290a0afd732..8d8b318639722e 100644 --- a/src/app/clusters/descriptor/descriptor.cpp +++ b/src/app/clusters/descriptor/descriptor.cpp @@ -76,7 +76,7 @@ CHIP_ERROR DescriptorAttrAccess::ReadPartsAttribute(EndpointId endpoint, Attribu return CHIP_NO_ERROR; }); } - else + else if (IsFlatCompositionForEndpoint(endpoint)) { err = aEncoder.EncodeList([endpoint](const auto & encoder) -> CHIP_ERROR { for (uint16_t index = 0; index < emberAfEndpointCount(); index++) @@ -104,6 +104,24 @@ CHIP_ERROR DescriptorAttrAccess::ReadPartsAttribute(EndpointId endpoint, Attribu return CHIP_NO_ERROR; }); } + else if (IsTreeCompositionForEndpoint(endpoint)) + { + err = aEncoder.EncodeList([endpoint](const auto & encoder) -> CHIP_ERROR { + for (uint16_t index = 0; index < emberAfEndpointCount(); index++) + { + if (!emberAfEndpointIndexIsEnabled(index)) + continue; + + EndpointId parentEndpointId = emberAfParentEndpointFromIndex(index); + if (parentEndpointId == endpoint) + { + ReturnErrorOnFailure(encoder.Encode(emberAfEndpointFromIndex(index))); + } + } + + return CHIP_NO_ERROR; + }); + } return err; } diff --git a/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp b/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp index 8edf8810f70c4b..9ff43d9a2ef834 100644 --- a/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp +++ b/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp @@ -500,6 +500,12 @@ bool emberAfGroupKeyManagementClusterKeySetWriteCallback( // Set KeySet err = provider->SetKeySet(fabric->GetFabricIndex(), compressed_fabric_id, keyset); + if (CHIP_ERROR_INVALID_LIST_LENGTH == err) + { + commandObj->AddStatusAndLogIfFailure(commandPath, Status::ResourceExhausted, "Not enough space left to add a new KeySet"); + return true; + } + if (CHIP_NO_ERROR == err) { ChipLogDetail(Zcl, "GroupKeyManagementCluster: KeySetWrite OK"); diff --git a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-delegate.h b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-delegate.h index 5529413a40cb88..c90923c775e5f3 100644 --- a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-delegate.h +++ b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-delegate.h @@ -35,20 +35,19 @@ class Delegate virtual ~Delegate() = default; /** - * Get the list of supported spin_speed list. - * Fills in the provided spin_speed at index `index` if there is one, - * or returns CHIP_ERROR_PROVIDER_LIST_EXHAUSTED if the index is out of range for the list of spin_speed. - * @param index The index of the spin_speed, with 0 representing the first one. - * @param spinSpeed The spin speed is filled. + * Get the spin speed string at the given index in the list. + * @param index The index of the spin speed, with 0 representing the first one. + * @param spinSpeed The MutableCharSpan to copy the string data into. On success, the callee must update + * the length to the length of the copied data. + * @return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED if the index is out of range for the list of spin speeds. */ virtual CHIP_ERROR GetSpinSpeedAtIndex(size_t index, MutableCharSpan & spinSpeed) = 0; /** - * Get the list of supported rinses list. - * Fills in the provided rinses at index `index` if there is one, - * or returns CHIP_ERROR_PROVIDER_LIST_EXHAUSTED if the index is out of range for the list of rinses. + * Get the supported rinses value at the given index in the list. * @param index The index of the supported rinses with 0 representing the first one. - * @param supportedRinse The supported rinse is filled. + * @param supportedRinse The supported rinse at the given index + * @return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED if the index is out of range for the list of supported rinses. */ virtual CHIP_ERROR GetSupportedRinseAtIndex(size_t index, NumberOfRinsesEnum & supportedRinse) = 0; }; diff --git a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp index 76832e4c091eb8..f7cb0cd06d42a6 100644 --- a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp +++ b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp @@ -83,14 +83,13 @@ LaundryWasherControlsServer & LaundryWasherControlsServer::Instance() return sInstance; } -EmberAfStatus LaundryWasherControlsServer::SetSpinSpeedCurrent(EndpointId endpointId, - DataModel::Nullable newSpinSpeedCurrent) +EmberAfStatus LaundryWasherControlsServer::SetSpinSpeedCurrent(EndpointId endpointId, DataModel::Nullable spinSpeedCurrent) { - DataModel::Nullable spinSpeedCurrent; - EmberAfStatus res = SpinSpeedCurrent::Get(endpointId, spinSpeedCurrent); - if ((res == EMBER_ZCL_STATUS_SUCCESS) && (spinSpeedCurrent != newSpinSpeedCurrent)) + DataModel::Nullable spinSpeedCurrentNow; + EmberAfStatus res = SpinSpeedCurrent::Get(endpointId, spinSpeedCurrentNow); + if ((res == EMBER_ZCL_STATUS_SUCCESS) && (spinSpeedCurrentNow != spinSpeedCurrent)) { - res = SpinSpeedCurrent::Set(endpointId, newSpinSpeedCurrent); + res = SpinSpeedCurrent::Set(endpointId, spinSpeedCurrent); } return res; diff --git a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.h b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.h index ac9b4ca0b7f209..f01069135b3e7c 100644 --- a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.h +++ b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.h @@ -42,51 +42,19 @@ class LaundryWasherControlsServer : public AttributeAccessInterface * Set the default delegate of laundry washer server at endpoint x * @param endpoint ID of the endpoint * @param delegate The default delegate at the endpoint - * @return CHIP_ERROR CHIP_NO_ERROR on success, or corresponding error code. */ static void SetDefaultDelegate(EndpointId endpoint, Delegate * delegate); /** - * Init the laundry washer server. - * @param void - * @return CHIP_ERROR CHIP_NO_ERROR on success, or corresponding error code. - */ - // CHIP_ERROR Init(); - - /** - * @brief Set the attribute newSpinSpeedCurrent - * - * @param endpointId ID of the endpoint - * @param newSpinSpeedCurrent attribute SpinSpeedCurrent - * @return true on success, false on failure - */ - EmberAfStatus SetSpinSpeedCurrent(EndpointId endpointId, DataModel::Nullable newSpinSpeedCurrent); - - /** - * @brief Get the attribute newSpinSpeedCurrent - * - * @param endpointId ID of the endpoint - * @param SpinSpeedCurrent attribute SpinSpeedCurrent - * @return true on success, false on failure + * API to set/get the SpinSpeedCurrent attribute */ + EmberAfStatus SetSpinSpeedCurrent(EndpointId endpointId, DataModel::Nullable spinSpeedCurrent); EmberAfStatus GetSpinSpeedCurrent(EndpointId endpointId, DataModel::Nullable & spinSpeedCurrent); /** - * @brief Set the attribute NumberOfRinses - * - * @param endpointId ID of the endpoint - * @param newNumberOfRinses attribute NumberOfRinses - * @return true on success, false on failure + * API to set/get the NumberOfRinses attribute */ EmberAfStatus SetNumberOfRinses(EndpointId endpointId, NumberOfRinsesEnum newNumberOfRinses); - - /** - * @brief Get the attribute NumberOfRinses - * - * @param endpointId ID of the endpoint - * @param NumberOfRinses attribute NumberOfRinses - * @return true on success, false on failure - */ EmberAfStatus GetNumberOfRinses(EndpointId endpointId, NumberOfRinsesEnum & numberOfRinses); private: diff --git a/src/app/clusters/mode-base-server/mode-base-server.cpp b/src/app/clusters/mode-base-server/mode-base-server.cpp index d2e56f172627dc..4495e728fc7ecb 100644 --- a/src/app/clusters/mode-base-server/mode-base-server.cpp +++ b/src/app/clusters/mode-base-server/mode-base-server.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include using namespace chip; @@ -193,7 +194,7 @@ CHIP_ERROR Instance::Init() } } } - +#ifdef EMBER_AF_PLUGIN_ON_OFF_SERVER // OnMode with Power Up // If the On/Off feature is supported and the On/Off cluster attribute StartUpOnOff is present, with a // value of On (turn on at power up), then the CurrentMode attribute SHALL be set to the OnMode attribute @@ -227,7 +228,7 @@ CHIP_ERROR Instance::Init() } } } - +#endif // EMBER_AF_PLUGIN_ON_OFF_SERVER return CHIP_NO_ERROR; } diff --git a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp index 5a6c645a510670..4340f683b0d666 100644 --- a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp +++ b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp @@ -654,9 +654,10 @@ bool emberAfOperationalCredentialsClusterAddNOCCallback(app::CommandHandler * co // Set the Identity Protection Key (IPK) // The IPK SHALL be the operational group key under GroupKeySetID of 0 - keyset.keyset_id = Credentials::GroupDataProvider::kIdentityProtectionKeySetId; - keyset.policy = GroupKeyManagement::GroupKeySecurityPolicyEnum::kTrustFirst; - keyset.num_keys_used = 1; + keyset.keyset_id = Credentials::GroupDataProvider::kIdentityProtectionKeySetId; + keyset.policy = GroupKeyManagement::GroupKeySecurityPolicyEnum::kTrustFirst; + keyset.num_keys_used = 1; + keyset.epoch_keys[0].start_time = 0; memcpy(keyset.epoch_keys[0].key, ipkValue.data(), Crypto::CHIP_CRYPTO_SYMMETRIC_KEY_LENGTH_BYTES); err = newFabricInfo->GetCompressedFabricIdBytes(compressed_fabric_id); diff --git a/src/app/clusters/power-source-server/power-source-server.cpp b/src/app/clusters/power-source-server/power-source-server.cpp index a5163df93b2895..b09e25d7ad75b5 100644 --- a/src/app/clusters/power-source-server/power-source-server.cpp +++ b/src/app/clusters/power-source-server/power-source-server.cpp @@ -19,32 +19,82 @@ * @brief Implementation for the Power Source Server Cluster ***************************************************************************/ +#include "power-source-server.h" + #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::PowerSource::Attributes; +using namespace app; +using namespace app::Clusters; +using namespace app::Clusters::PowerSource::Attributes; namespace { -class PowerSourceAttrAccess : public AttributeAccessInterface +struct PowerSourceClusterInfo { -public: - // Register on all endpoints. - PowerSourceAttrAccess() : AttributeAccessInterface(Optional::Missing(), PowerSource::Id) {} - - CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + PowerSourceClusterInfo() : mClusterEndpoint(kInvalidEndpointId) {} + explicit PowerSourceClusterInfo(EndpointId powerClusterEndpointId) : mClusterEndpoint(powerClusterEndpointId) {} + void Clear() + { + mBuf.Free(); + mEndpointList = Span(); + } + CHIP_ERROR SetEndpointList(Span endpointList) + { + Clear(); + if (endpointList.size() == 0) + { + mEndpointList = Span(); + return CHIP_NO_ERROR; + } + mBuf.Calloc(endpointList.size()); + if (mBuf.Get() == nullptr) + { + return CHIP_ERROR_NO_MEMORY; + } + memcpy(mBuf.Get(), endpointList.data(), endpointList.size() * sizeof(EndpointId)); + mEndpointList = Span(mBuf.Get(), endpointList.size()); + return CHIP_NO_ERROR; + } + EndpointId mClusterEndpoint = kInvalidEndpointId; + Platform::ScopedMemoryBuffer mBuf; + Span mEndpointList; }; +PowerSourceServer gPowerSourceServer; + PowerSourceAttrAccess gAttrAccess; +#ifdef ZCL_USING_POWER_SOURCE_CLUSTER_SERVER +#define POWER_SERVER_NUM_SUPPORTED_ENDPOINTS \ + (EMBER_AF_POWER_SOURCE_CLUSTER_SERVER_ENDPOINT_COUNT + CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT) +#else +#define POWER_SERVER_NUM_SUPPORTED_ENDPOINTS CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT +#endif +static constexpr size_t kNumSupportedEndpoints = POWER_SERVER_NUM_SUPPORTED_ENDPOINTS; + +#if POWER_SERVER_NUM_SUPPORTED_ENDPOINTS > 0 +PowerSourceClusterInfo sPowerSourceClusterInfo[kNumSupportedEndpoints] = {}; +#else +PowerSourceClusterInfo * sPowerSourceClusterInfo = nullptr; +#endif + +} // anonymous namespace + +void MatterPowerSourcePluginServerInitCallback() +{ + registerAttributeAccessOverride(&gAttrAccess); +} + +namespace chip { +namespace app { +namespace Clusters { + CHIP_ERROR PowerSourceAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -55,10 +105,25 @@ CHIP_ERROR PowerSourceAttrAccess::Read(const ConcreteReadAttributePath & aPath, // TODO: Needs implementation. err = aEncoder.EncodeEmptyList(); break; - case EndpointList::Id: - // TODO: Needs implementation and a way to allow dynamic endpoints to register endpoints - err = aEncoder.EncodeEmptyList(); + case EndpointList::Id: { + PowerSourceServer & server = PowerSourceServer::Instance(); + const Span * span = server.GetEndpointList(aPath.mEndpointId); + if (span == nullptr) + { + err = aEncoder.EncodeEmptyList(); + } + else + { + err = aEncoder.EncodeList([span](const auto & encoder) -> CHIP_ERROR { + for (auto id : *span) + { + ReturnErrorOnFailure(encoder.Encode(id)); + } + return CHIP_NO_ERROR; + }); + } break; + } default: break; } @@ -66,9 +131,91 @@ CHIP_ERROR PowerSourceAttrAccess::Read(const ConcreteReadAttributePath & aPath, return err; } -} // anonymous namespace +PowerSourceAttrAccess & TestOnlyGetPowerSourceAttrAccess() +{ + return gAttrAccess; +} -void MatterPowerSourcePluginServerInitCallback() +PowerSourceServer & PowerSourceServer::Instance() { - registerAttributeAccessOverride(&gAttrAccess); + return gPowerSourceServer; +} + +// Caller does not need to retain the span past the call point as these are copied into an internal storage +CHIP_ERROR PowerSourceServer::SetEndpointList(EndpointId powerSourceClusterEndpoint, Span endpointList) +{ + // TODO: should check here that the power source cluster exists on the endpoint, but for now let's take the caller's word + // for it + + size_t idx = PowerSourceClusterEndpointIndex(powerSourceClusterEndpoint); + if (idx >= kNumSupportedEndpoints) + { + idx = NextEmptyIndex(); + } + if (idx >= kNumSupportedEndpoints) + { + return CHIP_ERROR_NO_MEMORY; + } + + sPowerSourceClusterInfo[idx].Clear(); + if (endpointList.size() == 0) + { + sPowerSourceClusterInfo[idx] = PowerSourceClusterInfo(); + } + else + { + sPowerSourceClusterInfo[idx] = PowerSourceClusterInfo(powerSourceClusterEndpoint); + sPowerSourceClusterInfo[idx].SetEndpointList(endpointList); + } + return CHIP_NO_ERROR; +} +const Span * PowerSourceServer::GetEndpointList(EndpointId powerSourceClusterEndpoint) const +{ + size_t idx = PowerSourceClusterEndpointIndex(powerSourceClusterEndpoint); + if (idx != std::numeric_limits::max()) + { + return &sPowerSourceClusterInfo[idx].mEndpointList; + } + return nullptr; +} + +void PowerSourceServer::Shutdown() +{ + for (size_t i = 0; i < kNumSupportedEndpoints; ++i) + { + sPowerSourceClusterInfo[i].Clear(); + } +} + +size_t PowerSourceServer::GetNumSupportedEndpointLists() const +{ + return kNumSupportedEndpoints; } + +size_t PowerSourceServer::PowerSourceClusterEndpointIndex(EndpointId endpointId) const +{ + for (size_t i = 0; i < kNumSupportedEndpoints; ++i) + { + if (sPowerSourceClusterInfo[i].mClusterEndpoint == endpointId) + { + return i; + } + } + return std::numeric_limits::max(); +} + +size_t PowerSourceServer::NextEmptyIndex() const +{ + for (size_t i = 0; i < kNumSupportedEndpoints; ++i) + { + if (sPowerSourceClusterInfo[i].mClusterEndpoint == kInvalidEndpointId) + { + return i; + } + } + return std::numeric_limits::max(); +} + +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/src/app/clusters/power-source-server/power-source-server.h b/src/app/clusters/power-source-server/power-source-server.h new file mode 100644 index 00000000000000..a02f54cd5375c1 --- /dev/null +++ b/src/app/clusters/power-source-server/power-source-server.h @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 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 +#include +#include +#include +#include + +namespace chip { +namespace app { +namespace Clusters { + +class PowerSourceServer +{ +public: + static PowerSourceServer & Instance(); + + // Caller does not need to retain the span past the call point as these are copied into an internal storage + CHIP_ERROR SetEndpointList(EndpointId powerSourceClusterEndpoint, Span endpointList); + CHIP_ERROR ClearEndpointList(EndpointId powerSourceClusterEndpoint) + { + return SetEndpointList(powerSourceClusterEndpoint, Span()); + } + // returns nullptr if there's not endpoint list set for this power source cluster endpoint id. + const Span * GetEndpointList(EndpointId powerSourceClusterEndpoint) const; + void Shutdown(); + size_t GetNumSupportedEndpointLists() const; + +private: + // Both return std::numeric_limits::max() for not found + size_t PowerSourceClusterEndpointIndex(EndpointId endpointId) const; + size_t NextEmptyIndex() const; +}; + +class PowerSourceAttrAccess : public AttributeAccessInterface +{ +public: + // Register on all endpoints. + PowerSourceAttrAccess() : AttributeAccessInterface(Optional::Missing(), PowerSource::Id) {} + + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; +}; + +PowerSourceAttrAccess & TestOnlyGetPowerSourceAttrAccess(); + +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/src/app/clusters/scenes-server/SceneTableImpl.cpp b/src/app/clusters/scenes-server/SceneTableImpl.cpp index 99d14e97095aab..3ff044e4bd506c 100644 --- a/src/app/clusters/scenes-server/SceneTableImpl.cpp +++ b/src/app/clusters/scenes-server/SceneTableImpl.cpp @@ -23,9 +23,7 @@ namespace chip { namespace scenes { CHIP_ERROR -DefaultSceneHandlerImpl::EncodeAttributeValueList( - const app::DataModel::List & aVlist, - MutableByteSpan & serializedBytes) +DefaultSceneHandlerImpl::EncodeAttributeValueList(const List & aVlist, MutableByteSpan & serializedBytes) { TLV::TLVWriter writer; writer.Init(serializedBytes); @@ -35,9 +33,8 @@ DefaultSceneHandlerImpl::EncodeAttributeValueList( return CHIP_NO_ERROR; } -CHIP_ERROR DefaultSceneHandlerImpl::DecodeAttributeValueList( - const ByteSpan & serializedBytes, - app::DataModel::DecodableList & aVlist) +CHIP_ERROR DefaultSceneHandlerImpl::DecodeAttributeValueList(const ByteSpan & serializedBytes, + DecodableList & aVlist) { TLV::TLVReader reader; @@ -49,11 +46,10 @@ CHIP_ERROR DefaultSceneHandlerImpl::DecodeAttributeValueList( } CHIP_ERROR -DefaultSceneHandlerImpl::SerializeAdd(EndpointId endpoint, - const app::Clusters::Scenes::Structs::ExtensionFieldSet::DecodableType & extensionFieldSet, +DefaultSceneHandlerImpl::SerializeAdd(EndpointId endpoint, const ExtensionFieldSetDecodableType & extensionFieldSet, MutableByteSpan & serializedBytes) { - app::Clusters::Scenes::Structs::AttributeValuePair::Type aVPairs[kMaxAvPair]; + AttributeValuePairType aVPairs[kMaxAvPair]; size_t pairTotal = 0; // Verify size of list @@ -68,15 +64,15 @@ DefaultSceneHandlerImpl::SerializeAdd(EndpointId endpoint, pairCount++; } ReturnErrorOnFailure(pair_iterator.GetStatus()); - app::DataModel::List attributeValueList(aVPairs, pairCount); + List attributeValueList(aVPairs, pairCount); return EncodeAttributeValueList(attributeValueList, serializedBytes); } CHIP_ERROR DefaultSceneHandlerImpl::Deserialize(EndpointId endpoint, ClusterId cluster, const ByteSpan & serializedBytes, - app::Clusters::Scenes::Structs::ExtensionFieldSet::Type & extensionFieldSet) + ExtensionFieldSetType & extensionFieldSet) { - app::DataModel::DecodableList attributeValueList; + DecodableList attributeValueList; ReturnErrorOnFailure(DecodeAttributeValueList(serializedBytes, attributeValueList)); diff --git a/src/app/clusters/scenes-server/SceneTableImpl.h b/src/app/clusters/scenes-server/SceneTableImpl.h index c7b7e18a2f7782..3be1dc43e48c26 100644 --- a/src/app/clusters/scenes-server/SceneTableImpl.h +++ b/src/app/clusters/scenes-server/SceneTableImpl.h @@ -39,6 +39,18 @@ using clusterId = chip::ClusterId; /// (Color control cluster), the Extension Field Set's value pair list TLV occupies 99 bytes of memory class DefaultSceneHandlerImpl : public scenes::SceneHandler { + + template + using List = chip::app::DataModel::List; + + template + using DecodableList = chip::app::DataModel::DecodableList; + + using AttributeValuePairType = chip::app::Clusters::Scenes::Structs::AttributeValuePair::Type; + using AttributeValuePairDecodableType = chip::app::Clusters::Scenes::Structs::AttributeValuePair::DecodableType; + using ExtensionFieldSetDecodableType = chip::app::Clusters::Scenes::Structs::ExtensionFieldSet::DecodableType; + using ExtensionFieldSetType = chip::app::Clusters::Scenes::Structs::ExtensionFieldSet::Type; + public: static constexpr uint8_t kMaxAvPair = CHIP_CONFIG_SCENES_MAX_AV_PAIRS_EFS; @@ -49,18 +61,15 @@ class DefaultSceneHandlerImpl : public scenes::SceneHandler /// @param aVlist[in] Attribute value list to encode /// @param serializedBytes[out] Buffer to fill from the Attribute value list in a TLV format /// @return CHIP_ERROR - virtual CHIP_ERROR - EncodeAttributeValueList(const app::DataModel::List & aVlist, - MutableByteSpan & serializedBytes); + virtual CHIP_ERROR EncodeAttributeValueList(const List & aVlist, MutableByteSpan & serializedBytes); /// @brief Decodes an attribute value list from a TLV structure and ensure it fits the member pair buffer /// @param serializedBytes [in] Buffer to read from /// @param aVlist [out] Attribute value list to fill from the TLV structure. Only valid while the buffer backing /// serializedBytes exists and its contents are not modified. /// @return CHIP_ERROR - virtual CHIP_ERROR DecodeAttributeValueList( - const ByteSpan & serializedBytes, - app::DataModel::DecodableList & aVlist); + virtual CHIP_ERROR DecodeAttributeValueList(const ByteSpan & serializedBytes, + DecodableList & aVlist); /// @brief From command AddScene, allows handler to filter through clusters in command to serialize only the supported ones. /// @param endpoint[in] Endpoint ID @@ -68,8 +77,7 @@ class DefaultSceneHandlerImpl : public scenes::SceneHandler /// @param serializedBytes[out] Buffer to fill from the ExtensionFieldSet in command /// @return CHIP_NO_ERROR if successful, CHIP_ERROR_INVALID_ARGUMENT if the cluster is not supported, CHIP_ERROR value /// otherwise - virtual CHIP_ERROR SerializeAdd(EndpointId endpoint, - const app::Clusters::Scenes::Structs::ExtensionFieldSet::DecodableType & extensionFieldSet, + virtual CHIP_ERROR SerializeAdd(EndpointId endpoint, const ExtensionFieldSetDecodableType & extensionFieldSet, MutableByteSpan & serializedBytes) override; /// @brief Simulates taking data from nvm and loading it in a command object if the cluster is supported by the endpoint @@ -79,10 +87,10 @@ class DefaultSceneHandlerImpl : public scenes::SceneHandler /// @return CHIP_NO_ERROR if Extension Field Set was successfully populated, CHIP_ERROR_INVALID_ARGUMENT if the cluster is not /// supported, specific CHIP_ERROR otherwise virtual CHIP_ERROR Deserialize(EndpointId endpoint, ClusterId cluster, const ByteSpan & serializedBytes, - app::Clusters::Scenes::Structs::ExtensionFieldSet::Type & extensionFieldSet) override; + ExtensionFieldSetType & extensionFieldSet) override; private: - app::Clusters::Scenes::Structs::AttributeValuePair::Type mAVPairs[kMaxAvPair]; + AttributeValuePairType mAVPairs[kMaxAvPair]; }; /** diff --git a/src/app/common_flags.gni b/src/app/common_flags.gni index 1d4309810d57e8..5e5a82afd7d5e1 100644 --- a/src/app/common_flags.gni +++ b/src/app/common_flags.gni @@ -15,4 +15,5 @@ declare_args() { # Temporary flag for interaction model and echo protocols, set it to true to enable chip_app_use_echo = false + chip_enable_read_client = true } diff --git a/src/app/icd/BUILD.gn b/src/app/icd/BUILD.gn index 18aea3f155d845..c0034a88e7b9b8 100644 --- a/src/app/icd/BUILD.gn +++ b/src/app/icd/BUILD.gn @@ -29,11 +29,11 @@ source_set("manager-srcs") { "ICDManager.h", ] - deps = [ + public_deps = [ ":cluster-srcs", ":observer-srcs", + "${chip_root}/src/credentials:credentials", ] - public_deps = [ "${chip_root}/src/credentials:credentials" ] } # ICD management cluster source-set is broken out of the main source-set to enable unit tests diff --git a/src/app/icd/ICDEventManager.cpp b/src/app/icd/ICDEventManager.cpp index a8e4e11de5fb1b..cbe3c5521a65d9 100644 --- a/src/app/icd/ICDEventManager.cpp +++ b/src/app/icd/ICDEventManager.cpp @@ -23,6 +23,7 @@ namespace chip { namespace app { uint8_t ICDEventManager::expectedMsgCount = 0; +uint8_t ICDEventManager::awaitingAckCount = 0; static_assert(UINT8_MAX >= CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS, "ICDEventManager::expectedMsgCount cannot hold count for the max exchange count"); @@ -97,7 +98,19 @@ void ICDEventManager::ICDEventHandler(const ChipDeviceEvent * event, intptr_t ar { icdManager->UpdateOperationState(ICDManager::OperationalState::ActiveMode); } + break; + case DeviceEventType::kICDMsgAckSyncEvent: + // When a Reliable Message Context is awaiting an ack, we keep the ICD in its active mode + if (event->AckSync.awaitingAck) + { + awaitingAckCount++; + } + else if (awaitingAckCount > 0) + { + awaitingAckCount--; + } + icdManager->SetKeepActiveModeRequirements(ICDManager::KeepActiveFlags::kAwaitingMsgAck, (awaitingAckCount != 0)); break; case DeviceEventType::kAppWakeUpEvent: icdManager->UpdateOperationState(ICDManager::OperationalState::ActiveMode); diff --git a/src/app/icd/ICDEventManager.h b/src/app/icd/ICDEventManager.h index fffbbb8dc334fb..c86b356e408657 100644 --- a/src/app/icd/ICDEventManager.h +++ b/src/app/icd/ICDEventManager.h @@ -48,6 +48,7 @@ class ICDEventManager */ static void ICDEventHandler(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg); static uint8_t expectedMsgCount; + static uint8_t awaitingAckCount; ICDManager * mICDManager; }; diff --git a/src/app/icd/ICDManager.h b/src/app/icd/ICDManager.h index 10a1704a670cfa..e5406f14615837 100644 --- a/src/app/icd/ICDManager.h +++ b/src/app/icd/ICDManager.h @@ -49,6 +49,7 @@ class ICDManager kCommissioningWindowOpen = 0x01, kFailSafeArmed = 0x02, kExpectingMsgResponse = 0x03, + kAwaitingMsgAck = 0x04, }; ICDManager() {} diff --git a/src/app/reporting/ReportScheduler.h b/src/app/reporting/ReportScheduler.h index fc1858862bc4bd..068237780b86a0 100644 --- a/src/app/reporting/ReportScheduler.h +++ b/src/app/reporting/ReportScheduler.h @@ -63,17 +63,6 @@ class ReportScheduler : public ReadHandler::Observer, public ICDStateObserver class ReadHandlerNode : public TimerContext { public: -#ifdef CONFIG_BUILD_FOR_HOST_UNIT_TEST - /// Test flags to allow TestReadInteraction to simulate expiration of the minimal and maximal intervals without - /// waiting - enum class TestFlags : uint8_t{ - MinIntervalElapsed = (1 << 0), - MaxIntervalElapsed = (1 << 1), - }; - void SetTestFlags(TestFlags aFlag, bool aValue) { mFlags.Set(aFlag, aValue); } - bool GetTestFlags(TestFlags aFlag) const { return mFlags.Has(aFlag); } -#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST - ReadHandlerNode(ReadHandler * aReadHandler, TimerDelegate * aTimerDelegate, ReportScheduler * aScheduler) : mTimerDelegate(aTimerDelegate), mScheduler(aScheduler) { @@ -93,29 +82,12 @@ class ReportScheduler : public ReadHandler::Observer, public ICDStateObserver { Timestamp now = mTimerDelegate->GetCurrentMonotonicTimestamp(); -#ifdef CONFIG_BUILD_FOR_HOST_UNIT_TEST - return (mReadHandler->IsGeneratingReports() && (now >= mMinTimestamp || mFlags.Has(TestFlags::MinIntervalElapsed)) && - (mReadHandler->IsDirty() || (now >= mMaxTimestamp || mFlags.Has(TestFlags::MaxIntervalElapsed)) || - now >= mSyncTimestamp)); -#else return (mReadHandler->IsGeneratingReports() && (now >= mMinTimestamp && (mReadHandler->IsDirty() || now >= mMaxTimestamp || now >= mSyncTimestamp))); -#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST } bool IsEngineRunScheduled() const { return mEngineRunScheduled; } - void SetEngineRunScheduled(bool aEngineRunScheduled) - { - mEngineRunScheduled = aEngineRunScheduled; -#ifdef CONFIG_BUILD_FOR_HOST_UNIT_TEST - // If the engine becomes unscheduled, this means a run just took place so we reset the test flags - if (!mEngineRunScheduled) - { - mFlags.Set(TestFlags::MinIntervalElapsed, false); - mFlags.Set(TestFlags::MaxIntervalElapsed, false); - } -#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST - } + void SetEngineRunScheduled(bool aEngineRunScheduled) { mEngineRunScheduled = aEngineRunScheduled; } void SetIntervalTimeStamps(ReadHandler * aReadHandler) { @@ -146,9 +118,6 @@ class ReportScheduler : public ReadHandler::Observer, public ICDStateObserver System::Clock::Timestamp GetSyncTimestamp() const { return mSyncTimestamp; } private: -#ifdef CONFIG_BUILD_FOR_HOST_UNIT_TEST - BitFlags mFlags; -#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST TimerDelegate * mTimerDelegate; ReadHandler * mReadHandler; ReportScheduler * mScheduler; @@ -180,22 +149,6 @@ class ReportScheduler : public ReadHandler::Observer, public ICDStateObserver size_t GetNumReadHandlers() const { return mNodesPool.Allocated(); } #ifdef CONFIG_BUILD_FOR_HOST_UNIT_TEST - void RunNodeCallbackForHandler(const ReadHandler * aReadHandler) - { - ReadHandlerNode * node = FindReadHandlerNode(aReadHandler); - node->TimerFired(); - } - void SetFlagsForHandler(const ReadHandler * aReadHandler, ReadHandlerNode::TestFlags aFlag, bool aValue) - { - ReadHandlerNode * node = FindReadHandlerNode(aReadHandler); - node->SetTestFlags(aFlag, aValue); - } - - bool CheckFlagsForHandler(const ReadHandler * aReadHandler, ReadHandlerNode::TestFlags aFlag) - { - ReadHandlerNode * node = FindReadHandlerNode(aReadHandler); - return node->GetTestFlags(aFlag); - } Timestamp GetMinTimestampForHandler(const ReadHandler * aReadHandler) { ReadHandlerNode * node = FindReadHandlerNode(aReadHandler); diff --git a/src/app/tests/BUILD.gn b/src/app/tests/BUILD.gn index 5378b199aa17f7..9078702fb983e9 100644 --- a/src/app/tests/BUILD.gn +++ b/src/app/tests/BUILD.gn @@ -17,6 +17,7 @@ import("//build_overrides/chip.gni") import("//build_overrides/nlunit_test.gni") import("${chip_root}/build/chip/chip_test_suite.gni") +import("${chip_root}/src/app/icd/icd.gni") import("${chip_root}/src/platform/device.gni") static_library("helpers") { @@ -77,6 +78,18 @@ source_set("time-sync-data-provider-test-srcs") { ] } +source_set("power-cluster-test-srcs") { + sources = [ + "${chip_root}/src/app/clusters/power-source-server/power-source-server.cpp", + ] + + public_deps = [ + "${chip_root}/src/app/common:cluster-objects", + "${chip_root}/src/app/util/mock:mock_ember", + "${chip_root}/src/lib/core", + ] +} + source_set("scenes-table-test-srcs") { sources = [ "${chip_root}/src/app/clusters/scenes-server/ExtensionFieldSets.h", @@ -132,6 +145,7 @@ chip_test_suite("tests") { "TestNumericAttributeTraits.cpp", "TestOperationalStateDelegate.cpp", "TestPendingNotificationMap.cpp", + "TestPowerSourceCluster.cpp", "TestReadInteraction.cpp", "TestReportingEngine.cpp", "TestSceneTable.cpp", @@ -182,11 +196,11 @@ chip_test_suite("tests") { ":binding-test-srcs", ":operational-state-test-srcs", ":ota-requestor-test-srcs", + ":power-cluster-test-srcs", ":scenes-table-test-srcs", ":time-sync-data-provider-test-srcs", "${chip_root}/src/app", "${chip_root}/src/app/common:cluster-objects", - "${chip_root}/src/app/icd:cluster-srcs", "${chip_root}/src/app/icd:manager-srcs", "${chip_root}/src/app/tests:helpers", "${chip_root}/src/app/util/mock:mock_ember", @@ -195,7 +209,10 @@ chip_test_suite("tests") { "${nlunit_test_root}:nlunit-test", ] - if (chip_config_network_layer_ble && + # Do not run TestCommissionManager when running ICD specific unit tests. + # ICDManager has a dependency on the Accessors.h file which causes a link error + # when building the TestCommissionManager + if (!chip_enable_icd_server && chip_config_network_layer_ble && (chip_device_platform == "linux" || chip_device_platform == "darwin")) { test_sources += [ "TestCommissionManager.cpp" ] public_deps += [ "${chip_root}/src/app/server" ] diff --git a/src/app/tests/TestPowerSourceCluster.cpp b/src/app/tests/TestPowerSourceCluster.cpp new file mode 100644 index 00000000000000..e224571a45780d --- /dev/null +++ b/src/app/tests/TestPowerSourceCluster.cpp @@ -0,0 +1,339 @@ +/* + * + * 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 "lib/support/CHIPMem.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace chip { +namespace app { + +class TestPowerSourceCluster +{ +public: + static void TestEndpointList(nlTestSuite * apSuite, void * apContext); +}; + +std::vector ReadEndpointsThroughAttributeReader(nlTestSuite * apSuite, EndpointId endpoint) +{ + Clusters::PowerSourceAttrAccess & attrAccess = Clusters::TestOnlyGetPowerSourceAttrAccess(); + CHIP_ERROR err = CHIP_NO_ERROR; + + // Write TLV through the attribute access interface into the buffer + + // Buffer setup + constexpr size_t buflen = 128; + uint8_t buf[buflen]; + memset(buf, 0, buflen); + + // Create the builders + TLV::TLVWriter tlvWriter; + tlvWriter.Init(buf); + + AttributeReportIBs::Builder builder; + builder.Init(&tlvWriter); + + ConcreteAttributePath path(endpoint, Clusters::PowerSource::Id, Clusters::PowerSource::Attributes::EndpointList::Id); + ConcreteReadAttributePath readPath(path); + chip::DataVersion dataVersion(0); + AttributeValueEncoder aEncoder(builder, 0, path, dataVersion); + + err = attrAccess.Read(readPath, aEncoder); + + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + // Read out from the buffer. This comes back as a nested struct + // AttributeReportIBs is a list of + // AttributeReportIB structs containing + // AttributeDataIB struct, which holds DataVersion (tag 0), AttributePathIB (tag 1) and Data (tag 2) + + TLV::TLVReader reader; + reader.Init(buf); + + TLV::TLVReader attrReportsReader; + TLV::TLVReader attrReportReader; + TLV::TLVReader attrDataReader; + + reader.Next(); + reader.OpenContainer(attrReportsReader); + + attrReportsReader.Next(); + attrReportsReader.OpenContainer(attrReportReader); + + attrReportReader.Next(); + attrReportReader.OpenContainer(attrDataReader); + + // We're now in the attribute data IB, skip to the desired tag, we want TagNum = 2 + attrDataReader.Next(); + for (int i = 0; i < 3 && !(IsContextTag(attrDataReader.GetTag()) && TagNumFromTag(attrDataReader.GetTag()) == 2); ++i) + { + attrDataReader.Next(); + } + NL_TEST_ASSERT(apSuite, IsContextTag(attrDataReader.GetTag())); + NL_TEST_ASSERT(apSuite, TagNumFromTag(attrDataReader.GetTag()) == 2); + + // OK, we should be in the right spot now, let's decode the list. + Clusters::PowerSource::Attributes::EndpointList::TypeInfo::DecodableType list; + err = list.Decode(attrDataReader); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + std::vector ret; + auto iter = list.begin(); + while (iter.Next()) + { + ret.push_back(iter.GetValue()); + } + return ret; +} + +void TestPowerSourceCluster::TestEndpointList(nlTestSuite * apSuite, void * apContext) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + Clusters::PowerSourceServer & powerSourceServer = Clusters::PowerSourceServer::Instance(); + + // test that when we read everything we get an empty list as nothing has been set up yet + for (EndpointId i = 0; i < 11; ++i) + { + std::vector vec = ReadEndpointsThroughAttributeReader(apSuite, i); + NL_TEST_ASSERT(apSuite, vec.size() == 0); + } + + if (powerSourceServer.GetNumSupportedEndpointLists() < 2 || + powerSourceServer.GetNumSupportedEndpointLists() > std::numeric_limits::max()) + { + // Test assumes at least two endpoints. This runs on linux, not worthwhile to run on platforms with fewer endpoints. + return; + } + + // ***************** + // Test setting, getting and reading through the attribute access interface + // ***************** + EndpointId list0[5] = { 1, 2, 3, 4, 5 }; + EndpointId list1[10] = { 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; + EndpointId listRest[1] = { 2 }; + + // we checked earlier that this fit + // This test just uses endpoints in order, so we want to set endpoints from + // 0 to numEndpoints - 1, and use this for overflow checking + EndpointId numEndpoints = static_cast(powerSourceServer.GetNumSupportedEndpointLists()); + + // Endpoint 0 - list of 5 + err = powerSourceServer.SetEndpointList(0, Span(list0)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + const Span * readBack = powerSourceServer.GetEndpointList(0); + NL_TEST_EXIT_ON_FAILED_ASSERT(apSuite, readBack != nullptr); + NL_TEST_ASSERT(apSuite, readBack->size() == 5); + for (size_t i = 0; i < readBack->size(); ++i) + { + NL_TEST_ASSERT(apSuite, readBack->data()[i] == list0[i]); + } + + // Endpoint 1 - list of 10 + err = powerSourceServer.SetEndpointList(1, Span(list1)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + readBack = powerSourceServer.GetEndpointList(1); + NL_TEST_EXIT_ON_FAILED_ASSERT(apSuite, readBack != nullptr); + NL_TEST_ASSERT(apSuite, readBack->size() == 10); + for (size_t i = 0; i < readBack->size(); ++i) + { + NL_TEST_ASSERT(apSuite, readBack->data()[i] == list1[i]); + } + + // Remaining endpoints - list of 1 + for (EndpointId ep = 2; ep < numEndpoints; ++ep) + { + err = powerSourceServer.SetEndpointList(ep, Span(listRest)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + readBack = powerSourceServer.GetEndpointList(ep); + NL_TEST_EXIT_ON_FAILED_ASSERT(apSuite, readBack != nullptr); + NL_TEST_ASSERT(apSuite, readBack->size() == 1); + if (readBack->size() == 1) + { + NL_TEST_ASSERT(apSuite, readBack->data()[0] == listRest[0]); + } + } + + // ***************** + // Check for out of memory error when setting too many endpoints + // ***************** + // pick a random endpoint number for the power cluster - it doesn't matter, we don't have space anyway. + err = powerSourceServer.SetEndpointList(55, Span(listRest)); + NL_TEST_ASSERT(apSuite, err == CHIP_ERROR_NO_MEMORY); + + // ***************** + // Recheck getting and reading after OOM + // ***************** + // EP0 + readBack = powerSourceServer.GetEndpointList(0); + NL_TEST_EXIT_ON_FAILED_ASSERT(apSuite, readBack != nullptr); + NL_TEST_ASSERT(apSuite, readBack->size() == 5); + for (size_t i = 0; i < readBack->size(); ++i) + { + NL_TEST_ASSERT(apSuite, readBack->data()[i] == list0[i]); + } + + // EP1 + readBack = powerSourceServer.GetEndpointList(1); + NL_TEST_EXIT_ON_FAILED_ASSERT(apSuite, readBack != nullptr); + NL_TEST_ASSERT(apSuite, readBack->size() == 10); + for (size_t i = 0; i < readBack->size(); ++i) + { + NL_TEST_ASSERT(apSuite, readBack->data()[i] == list1[i]); + } + + // Remaining endpoints + for (EndpointId ep = 2; ep < numEndpoints; ++ep) + { + readBack = powerSourceServer.GetEndpointList(ep); + NL_TEST_EXIT_ON_FAILED_ASSERT(apSuite, readBack != nullptr); + NL_TEST_ASSERT(apSuite, readBack->size() == 1); + if (readBack->size() == 1) + { + NL_TEST_ASSERT(apSuite, readBack->data()[0] == listRest[0]); + } + } + + // ***************** + // Test overwriting + // ***************** + // Overwrite a list + err = powerSourceServer.SetEndpointList(1, Span(listRest)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + readBack = powerSourceServer.GetEndpointList(1); + NL_TEST_ASSERT(apSuite, readBack->size() == 1); + if (readBack->size() == 1) + { + NL_TEST_ASSERT(apSuite, readBack->data()[0] == listRest[0]); + } + + // Ensure only the overwritten list was changed, using read interface + for (EndpointId ep = 0; ep < numEndpoints + 1; ++ep) + { + std::vector vec = ReadEndpointsThroughAttributeReader(apSuite, ep); + if (ep == 0) + { + NL_TEST_ASSERT(apSuite, vec.size() == 5); + for (size_t j = 0; j < vec.size(); ++j) + { + NL_TEST_ASSERT(apSuite, vec[j] == list0[j]); + } + } + else if (ep == numEndpoints) + { + NL_TEST_ASSERT(apSuite, vec.size() == 0); + } + else + { + NL_TEST_ASSERT(apSuite, vec.size() == 1); + if (vec.size() == 1) + { + NL_TEST_ASSERT(apSuite, vec[0] == listRest[0]); + } + } + } + + // ***************** + // Test removal + // ***************** + for (EndpointId ep = 0; ep < numEndpoints; ++ep) + { + err = powerSourceServer.SetEndpointList(ep, Span()); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + readBack = powerSourceServer.GetEndpointList(ep); + NL_TEST_ASSERT(apSuite, readBack == nullptr); + } + + // Check through the read interface + for (EndpointId ep = 0; ep < numEndpoints + 1; ++ep) + { + std::vector vec = ReadEndpointsThroughAttributeReader(apSuite, ep); + NL_TEST_ASSERT(apSuite, vec.size() == 0); + } +} + +} // namespace app +} // namespace chip + +namespace { + +/** + * Test Suite. It lists all the test functions. + */ + +// clang-format off +const nlTest sTests[] = +{ + NL_TEST_DEF("TestEndpointList", chip::app::TestPowerSourceCluster::TestEndpointList), + NL_TEST_SENTINEL() +}; +// clang-format on + +/** + * Set up the test suite. + */ +int TestPowerSourceClusterContext_Setup(void * inContext) +{ + CHIP_ERROR error = chip::Platform::MemoryInit(); + if (error != CHIP_NO_ERROR) + return FAILURE; + return SUCCESS; +} + +/** + * Tear down the test suite. + */ +int TestPowerSourceClusterContext_Teardown(void * inContext) +{ + chip::app::Clusters::PowerSourceServer::Instance().Shutdown(); + chip::Platform::MemoryShutdown(); + return SUCCESS; +} + +// clang-format off +nlTestSuite sSuite = +{ + "TestPowerSourceCluster", + &sTests[0], + TestPowerSourceClusterContext_Setup, + TestPowerSourceClusterContext_Teardown +}; +// clang-format on + +} // namespace + +int TestPowerSource() +{ + nlTestRunner(&sSuite, nullptr); + return nlTestRunnerStats(&sSuite); +} + +CHIP_REGISTER_TEST_SUITE(TestPowerSource) diff --git a/src/app/tests/TestReadInteraction.cpp b/src/app/tests/TestReadInteraction.cpp index a818ee3d23e3a4..0c490f86002f73 100644 --- a/src/app/tests/TestReadInteraction.cpp +++ b/src/app/tests/TestReadInteraction.cpp @@ -67,11 +67,17 @@ chip::EndpointId kInvalidTestEndpointId = 3; chip::DataVersion kTestDataVersion1 = 3; chip::DataVersion kTestDataVersion2 = 5; +static chip::System::Clock::Internal::MockClock gMockClock; +static chip::System::Clock::ClockBase * gRealClock; + class TestContext : public chip::Test::AppContext { public: static int Initialize(void * context) { + gRealClock = &chip::System::SystemClock(); + chip::System::Clock::Internal::SetSystemClockForTesting(&gMockClock); + if (AppContext::Initialize(context) != SUCCESS) return FAILURE; @@ -97,6 +103,7 @@ class TestContext : public chip::Test::AppContext static int Finalize(void * context) { chip::app::EventManagement::DestroyEventManagement(); + chip::System::Clock::Internal::SetSystemClockForTesting(gRealClock); if (AppContext::Finalize(context) != SUCCESS) return FAILURE; @@ -322,6 +329,13 @@ class TestReadInteraction static void TestReadClientInvalidReport(nlTestSuite * apSuite, void * apContext); static void TestReadHandlerInvalidAttributePath(nlTestSuite * apSuite, void * apContext); static void TestProcessSubscribeRequest(nlTestSuite * apSuite, void * apContext); +#if CHIP_CONFIG_ENABLE_ICD_SERVER + static void TestICDProcessSubscribeRequestSupMaxIntervalCeiling(nlTestSuite * apSuite, void * apContext); + static void TestICDProcessSubscribeRequestInfMaxIntervalCeiling(nlTestSuite * apSuite, void * apContext); + static void TestICDProcessSubscribeRequestSupMinInterval(nlTestSuite * apSuite, void * apContext); + static void TestICDProcessSubscribeRequestMaxMinInterval(nlTestSuite * apSuite, void * apContext); + static void TestICDProcessSubscribeRequestInvalidIdleModeInterval(nlTestSuite * apSuite, void * apContext); +#endif // CHIP_CONFIG_ENABLE_ICD_SERVER static void TestReadRoundtrip(nlTestSuite * apSuite, void * apContext); static void TestPostSubscribeRoundtripChunkReport(nlTestSuite * apSuite, void * apContext); static void TestReadRoundtripWithDataVersionFilter(nlTestSuite * apSuite, void * apContext); @@ -1491,6 +1505,385 @@ void TestReadInteraction::TestProcessSubscribeRequest(nlTestSuite * apSuite, voi NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); } +#if CHIP_CONFIG_ENABLE_ICD_SERVER +/** + * @brief Test validates that an ICD will choose its IdleModeInterval (GetPublisherSelectedIntervalLimit) + * as MaxInterval when the MaxIntervalCeiling is superior. + */ +void TestReadInteraction::TestICDProcessSubscribeRequestSupMaxIntervalCeiling(nlTestSuite * apSuite, void * apContext) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TestContext & ctx = *static_cast(apContext); + System::PacketBufferTLVWriter writer; + System::PacketBufferHandle subscribeRequestbuf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); + SubscribeRequestMessage::Builder subscribeRequestBuilder; + MockInteractionModelApp delegate; + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + uint16_t kMinInterval = 0; + uint16_t kMaxIntervalCeiling = 1; + + Messaging::ExchangeContext * exchangeCtx = ctx.NewExchangeToAlice(nullptr, false); + + { + ReadHandler readHandler(*engine, exchangeCtx, chip::app::ReadHandler::InteractionType::Read, + app::reporting::GetDefaultReportScheduler()); + + writer.Init(std::move(subscribeRequestbuf)); + err = subscribeRequestBuilder.Init(&writer); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + subscribeRequestBuilder.KeepSubscriptions(true); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + subscribeRequestBuilder.MinIntervalFloorSeconds(kMinInterval); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + subscribeRequestBuilder.MaxIntervalCeilingSeconds(kMaxIntervalCeiling); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + AttributePathIBs::Builder & attributePathListBuilder = subscribeRequestBuilder.CreateAttributeRequests(); + NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); + + AttributePathIB::Builder & attributePathBuilder = attributePathListBuilder.CreatePath(); + NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); + + attributePathBuilder.Node(1).Endpoint(2).Cluster(3).Attribute(4).ListIndex(5).EndOfAttributePathIB(); + err = attributePathBuilder.GetError(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + attributePathListBuilder.EndOfAttributePathIBs(); + err = attributePathListBuilder.GetError(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + subscribeRequestBuilder.IsFabricFiltered(false).EndOfSubscribeRequestMessage(); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + err = writer.Finalize(&subscribeRequestbuf); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + err = readHandler.ProcessSubscribeRequest(std::move(subscribeRequestbuf)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + uint16_t idleModeInterval = readHandler.GetPublisherSelectedIntervalLimit(); + + uint16_t minInterval; + uint16_t maxInterval; + readHandler.GetReportingIntervals(minInterval, maxInterval); + + NL_TEST_ASSERT(apSuite, minInterval == kMinInterval); + NL_TEST_ASSERT(apSuite, maxInterval == idleModeInterval); + } + engine->Shutdown(); + + NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); +} + +/** + * @brief Test validates that an ICD will choose its IdleModeInterval (GetPublisherSelectedIntervalLimit) + * as MaxInterval when the MaxIntervalCeiling is inferior. + */ +void TestReadInteraction::TestICDProcessSubscribeRequestInfMaxIntervalCeiling(nlTestSuite * apSuite, void * apContext) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TestContext & ctx = *static_cast(apContext); + System::PacketBufferTLVWriter writer; + System::PacketBufferHandle subscribeRequestbuf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); + SubscribeRequestMessage::Builder subscribeRequestBuilder; + MockInteractionModelApp delegate; + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + uint16_t kMinInterval = 0; + uint16_t kMaxIntervalCeiling = 1; + + Messaging::ExchangeContext * exchangeCtx = ctx.NewExchangeToAlice(nullptr, false); + + { + ReadHandler readHandler(*engine, exchangeCtx, chip::app::ReadHandler::InteractionType::Read, + app::reporting::GetDefaultReportScheduler()); + + writer.Init(std::move(subscribeRequestbuf)); + err = subscribeRequestBuilder.Init(&writer); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + subscribeRequestBuilder.KeepSubscriptions(true); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + subscribeRequestBuilder.MinIntervalFloorSeconds(kMinInterval); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + subscribeRequestBuilder.MaxIntervalCeilingSeconds(kMaxIntervalCeiling); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + AttributePathIBs::Builder & attributePathListBuilder = subscribeRequestBuilder.CreateAttributeRequests(); + NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); + + AttributePathIB::Builder & attributePathBuilder = attributePathListBuilder.CreatePath(); + NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); + + attributePathBuilder.Node(1).Endpoint(2).Cluster(3).Attribute(4).ListIndex(5).EndOfAttributePathIB(); + err = attributePathBuilder.GetError(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + attributePathListBuilder.EndOfAttributePathIBs(); + err = attributePathListBuilder.GetError(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + subscribeRequestBuilder.IsFabricFiltered(false).EndOfSubscribeRequestMessage(); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + err = writer.Finalize(&subscribeRequestbuf); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + err = readHandler.ProcessSubscribeRequest(std::move(subscribeRequestbuf)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + uint16_t idleModeInterval = readHandler.GetPublisherSelectedIntervalLimit(); + + uint16_t minInterval; + uint16_t maxInterval; + readHandler.GetReportingIntervals(minInterval, maxInterval); + + NL_TEST_ASSERT(apSuite, minInterval == kMinInterval); + NL_TEST_ASSERT(apSuite, maxInterval == idleModeInterval); + } + engine->Shutdown(); + + NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); +} + +/** + * @brief Test validates that an ICD will choose a multiple of its IdleModeInterval (GetPublisherSelectedIntervalLimit) + * as MaxInterval when the MinInterval > IdleModeInterval. + */ +void TestReadInteraction::TestICDProcessSubscribeRequestSupMinInterval(nlTestSuite * apSuite, void * apContext) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TestContext & ctx = *static_cast(apContext); + System::PacketBufferTLVWriter writer; + System::PacketBufferHandle subscribeRequestbuf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); + SubscribeRequestMessage::Builder subscribeRequestBuilder; + MockInteractionModelApp delegate; + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + uint16_t kMinInterval = 3; + uint16_t kMaxIntervalCeiling = 5; + + Messaging::ExchangeContext * exchangeCtx = ctx.NewExchangeToAlice(nullptr, false); + + { + ReadHandler readHandler(*engine, exchangeCtx, chip::app::ReadHandler::InteractionType::Read, + app::reporting::GetDefaultReportScheduler()); + + writer.Init(std::move(subscribeRequestbuf)); + err = subscribeRequestBuilder.Init(&writer); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + subscribeRequestBuilder.KeepSubscriptions(true); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + subscribeRequestBuilder.MinIntervalFloorSeconds(kMinInterval); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + subscribeRequestBuilder.MaxIntervalCeilingSeconds(kMaxIntervalCeiling); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + AttributePathIBs::Builder & attributePathListBuilder = subscribeRequestBuilder.CreateAttributeRequests(); + NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); + + AttributePathIB::Builder & attributePathBuilder = attributePathListBuilder.CreatePath(); + NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); + + attributePathBuilder.Node(1).Endpoint(2).Cluster(3).Attribute(4).ListIndex(5).EndOfAttributePathIB(); + err = attributePathBuilder.GetError(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + attributePathListBuilder.EndOfAttributePathIBs(); + err = attributePathListBuilder.GetError(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + subscribeRequestBuilder.IsFabricFiltered(false).EndOfSubscribeRequestMessage(); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + err = writer.Finalize(&subscribeRequestbuf); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + err = readHandler.ProcessSubscribeRequest(std::move(subscribeRequestbuf)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + uint16_t idleModeInterval = readHandler.GetPublisherSelectedIntervalLimit(); + + uint16_t minInterval; + uint16_t maxInterval; + readHandler.GetReportingIntervals(minInterval, maxInterval); + + NL_TEST_ASSERT(apSuite, minInterval == kMinInterval); + NL_TEST_ASSERT(apSuite, maxInterval == (2 * idleModeInterval)); + } + engine->Shutdown(); + + NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); +} + +/** + * @brief Test validates that an ICD will choose a maximal value for an uint16 if the multiple of the IdleModeInterval + * is greater than variable size. + */ +void TestReadInteraction::TestICDProcessSubscribeRequestMaxMinInterval(nlTestSuite * apSuite, void * apContext) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TestContext & ctx = *static_cast(apContext); + System::PacketBufferTLVWriter writer; + System::PacketBufferHandle subscribeRequestbuf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); + SubscribeRequestMessage::Builder subscribeRequestBuilder; + MockInteractionModelApp delegate; + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + uint16_t kMinInterval = System::Clock::Seconds16::max().count(); + uint16_t kMaxIntervalCeiling = System::Clock::Seconds16::max().count(); + + Messaging::ExchangeContext * exchangeCtx = ctx.NewExchangeToAlice(nullptr, false); + + { + ReadHandler readHandler(*engine, exchangeCtx, chip::app::ReadHandler::InteractionType::Read, + app::reporting::GetDefaultReportScheduler()); + + writer.Init(std::move(subscribeRequestbuf)); + err = subscribeRequestBuilder.Init(&writer); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + subscribeRequestBuilder.KeepSubscriptions(true); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + subscribeRequestBuilder.MinIntervalFloorSeconds(kMinInterval); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + subscribeRequestBuilder.MaxIntervalCeilingSeconds(kMaxIntervalCeiling); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + AttributePathIBs::Builder & attributePathListBuilder = subscribeRequestBuilder.CreateAttributeRequests(); + NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); + + AttributePathIB::Builder & attributePathBuilder = attributePathListBuilder.CreatePath(); + NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); + + attributePathBuilder.Node(1).Endpoint(2).Cluster(3).Attribute(4).ListIndex(5).EndOfAttributePathIB(); + err = attributePathBuilder.GetError(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + attributePathListBuilder.EndOfAttributePathIBs(); + err = attributePathListBuilder.GetError(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + subscribeRequestBuilder.IsFabricFiltered(false).EndOfSubscribeRequestMessage(); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + err = writer.Finalize(&subscribeRequestbuf); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + err = readHandler.ProcessSubscribeRequest(std::move(subscribeRequestbuf)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + uint16_t minInterval; + uint16_t maxInterval; + readHandler.GetReportingIntervals(minInterval, maxInterval); + + NL_TEST_ASSERT(apSuite, minInterval == kMinInterval); + NL_TEST_ASSERT(apSuite, maxInterval == kMaxIntervalCeiling); + } + engine->Shutdown(); + + NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); +} + +/** + * @brief Test validates that an ICD will choose the MaxIntervalCeiling as MaxInterval if the next multiple after the MinInterval + * is greater than the IdleModeInterval and MaxIntervalCeiling + */ +void TestReadInteraction::TestICDProcessSubscribeRequestInvalidIdleModeInterval(nlTestSuite * apSuite, void * apContext) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TestContext & ctx = *static_cast(apContext); + System::PacketBufferTLVWriter writer; + System::PacketBufferHandle subscribeRequestbuf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); + SubscribeRequestMessage::Builder subscribeRequestBuilder; + MockInteractionModelApp delegate; + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + uint16_t kMinInterval = 3; + uint16_t kMaxIntervalCeiling = 3; + + Messaging::ExchangeContext * exchangeCtx = ctx.NewExchangeToAlice(nullptr, false); + + { + ReadHandler readHandler(*engine, exchangeCtx, chip::app::ReadHandler::InteractionType::Read, + app::reporting::GetDefaultReportScheduler()); + + writer.Init(std::move(subscribeRequestbuf)); + err = subscribeRequestBuilder.Init(&writer); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + subscribeRequestBuilder.KeepSubscriptions(true); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + subscribeRequestBuilder.MinIntervalFloorSeconds(kMinInterval); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + subscribeRequestBuilder.MaxIntervalCeilingSeconds(kMaxIntervalCeiling); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + AttributePathIBs::Builder & attributePathListBuilder = subscribeRequestBuilder.CreateAttributeRequests(); + NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); + + AttributePathIB::Builder & attributePathBuilder = attributePathListBuilder.CreatePath(); + NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); + + attributePathBuilder.Node(1).Endpoint(2).Cluster(3).Attribute(4).ListIndex(5).EndOfAttributePathIB(); + err = attributePathBuilder.GetError(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + attributePathListBuilder.EndOfAttributePathIBs(); + err = attributePathListBuilder.GetError(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + subscribeRequestBuilder.IsFabricFiltered(false).EndOfSubscribeRequestMessage(); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + err = writer.Finalize(&subscribeRequestbuf); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + err = readHandler.ProcessSubscribeRequest(std::move(subscribeRequestbuf)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + uint16_t minInterval; + uint16_t maxInterval; + readHandler.GetReportingIntervals(minInterval, maxInterval); + + NL_TEST_ASSERT(apSuite, minInterval == kMinInterval); + NL_TEST_ASSERT(apSuite, maxInterval == kMaxIntervalCeiling); + } + engine->Shutdown(); + + NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); +} + +#endif // CHIP_CONFIG_ENABLE_ICD_SERVER + void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * apContext) { TestContext & ctx = *static_cast(apContext); @@ -1532,8 +1925,8 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a readPrepareParams.mAttributePathParamsListSize = 2; - readPrepareParams.mMinIntervalFloorSeconds = 2; - readPrepareParams.mMaxIntervalCeilingSeconds = 5; + readPrepareParams.mMinIntervalFloorSeconds = 1; + readPrepareParams.mMaxIntervalCeilingSeconds = 2; printf("\nSend first subscribe request message to Node: %" PRIu64 "\n", chip::kTestDeviceNodeId); { @@ -1597,7 +1990,11 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a dirtyPath5.mAttributeId = 4; // Test report with 2 different path - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); + + // Advance monotonic timestamp for min interval to elapse + gMockClock.AdvanceMonotonic(System::Clock::Seconds16(readPrepareParams.mMinIntervalFloorSeconds)); + ctx.GetIOContext().DriveIO(); + delegate.mGotReport = false; delegate.mGotEventResponse = false; delegate.mNumAttributeResponse = 0; @@ -1609,15 +2006,15 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a ctx.DrainAndServiceIO(); - NL_TEST_ASSERT( - apSuite, - !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mGotEventResponse == true); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 2); // Test report with 2 different path, and 1 same path - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); + // Advance monotonic timestamp for min interval to elapse + gMockClock.AdvanceMonotonic(System::Clock::Seconds16(readPrepareParams.mMinIntervalFloorSeconds)); + ctx.GetIOContext().DriveIO(); + delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; err = engine->GetReportingEngine().SetDirty(dirtyPath1); @@ -1629,14 +2026,14 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a ctx.DrainAndServiceIO(); - NL_TEST_ASSERT( - apSuite, - !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 2); // Test report with 3 different path, and one path is overlapped with another - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); + // Advance monotonic timestamp for min interval to elapse + gMockClock.AdvanceMonotonic(System::Clock::Seconds16(readPrepareParams.mMinIntervalFloorSeconds)); + ctx.GetIOContext().DriveIO(); + delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; err = engine->GetReportingEngine().SetDirty(dirtyPath1); @@ -1648,14 +2045,14 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a ctx.DrainAndServiceIO(); - NL_TEST_ASSERT( - apSuite, - !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 2); // Test report with 3 different path, all are not overlapped, one path is not interested for current subscription - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); + // Advance monotonic timestamp for min interval to elapse + gMockClock.AdvanceMonotonic(System::Clock::Seconds16(readPrepareParams.mMinIntervalFloorSeconds)); + ctx.GetIOContext().DriveIO(); + delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; err = engine->GetReportingEngine().SetDirty(dirtyPath1); @@ -1667,18 +2064,13 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a ctx.DrainAndServiceIO(); - NL_TEST_ASSERT( - apSuite, - !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 2); // Test empty report - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MaxIntervalElapsed, true); - // Manually trigger the callback that would schedule the next report as it would normally have been called if the time had - // elapsed as simulated above - reportScheduler->RunNodeCallbackForHandler(delegate.mpReadHandler); + // Advance monotonic timestamp for min interval to elapse + gMockClock.AdvanceMonotonic(System::Clock::Seconds16(readPrepareParams.mMaxIntervalCeilingSeconds)); + ctx.GetIOContext().DriveIO(); NL_TEST_ASSERT(apSuite, engine->GetReportingEngine().IsRunScheduled()); delegate.mGotReport = false; @@ -1731,7 +2123,7 @@ void TestReadInteraction::TestSubscribeUrgentWildcardEvent(nlTestSuite * apSuite readPrepareParams.mpAttributePathParamsList = nullptr; readPrepareParams.mAttributePathParamsListSize = 0; - readPrepareParams.mMinIntervalFloorSeconds = 2; + readPrepareParams.mMinIntervalFloorSeconds = 1; readPrepareParams.mMaxIntervalCeilingSeconds = 3600; printf("\nSend first subscribe request message with wildcard urgent event to Node: %" PRIu64 "\n", chip::kTestDeviceNodeId); @@ -1752,8 +2144,7 @@ void TestReadInteraction::TestSubscribeUrgentWildcardEvent(nlTestSuite * apSuite NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); ctx.DrainAndServiceIO(); - - System::Clock::Timestamp startTime = System::SystemClock().GetMonotonicTimestamp(); + System::Clock::Timestamp startTime = gMockClock.GetMonotonicTimestamp(); NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadHandlers() == 2); NL_TEST_ASSERT(apSuite, engine->ActiveHandlerAt(0) != nullptr); @@ -1777,40 +2168,39 @@ void TestReadInteraction::TestSubscribeUrgentWildcardEvent(nlTestSuite * apSuite nonUrgentDelegate.mGotEventResponse = false; nonUrgentDelegate.mGotReport = false; - // wait for min interval 2 seconds (in test, we use 1.6 seconds considering the time variation), expect no event is + // wait for min interval 1 seconds (in test, we use 0.6 seconds considering the time variation), expect no event is // received, then wait for 0.8 seconds, then the urgent event would be sent out // currently DriveIOUntil will call `DriveIO` at least once, which means that if there is any CPU scheduling issues, // there's a chance 1.9s will already have elapsed by the time we get there, which will result in DriveIO being called when // it shouldn't. Better fix could happen inside DriveIOUntil, not sure the sideeffect there. - while (true) - { - if ((System::SystemClock().GetMonotonicTimestamp() - startTime) >= System::Clock::Milliseconds32(1600)) - { - break; - } - ctx.GetIOContext().DriveIO(); // at least one IO loop is guaranteed - } + + // Advance monotonic looping to allow events to trigger + gMockClock.AdvanceMonotonic(System::Clock::Milliseconds32(600)); + ctx.GetIOContext().DriveIO(); NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); NL_TEST_ASSERT(apSuite, !nonUrgentDelegate.mGotEventResponse); - startTime = System::SystemClock().GetMonotonicTimestamp(); - while (true) - { - if ((System::SystemClock().GetMonotonicTimestamp() - startTime) >= System::Clock::Milliseconds32(800)) - { - break; - } - ctx.GetIOContext().DriveIO(); // at least one IO loop is guaranteed - } + // Advance monotonic timestamp for min interval to elapse + startTime = gMockClock.GetMonotonicTimestamp(); + gMockClock.AdvanceMonotonic(System::Clock::Milliseconds32(800)); + + // Service Timer expired event + ctx.GetIOContext().DriveIO(); + + // Service Engine Run + ctx.GetIOContext().DriveIO(); + + // Service EventManagement event + ctx.GetIOContext().DriveIO(); + NL_TEST_ASSERT(apSuite, delegate.mGotEventResponse); NL_TEST_ASSERT(apSuite, !nonUrgentDelegate.mGotEventResponse); // Since we just sent a report for our urgent subscription, the min interval of the urgent subcription should have been // updated NL_TEST_ASSERT(apSuite, - reportScheduler->GetMinTimestampForHandler(delegate.mpReadHandler) > - System::SystemClock().GetMonotonicTimestamp()); + reportScheduler->GetMinTimestampForHandler(delegate.mpReadHandler) > gMockClock.GetMonotonicTimestamp()); NL_TEST_ASSERT(apSuite, !delegate.mpReadHandler->IsDirty()); delegate.mGotEventResponse = false; @@ -1818,19 +2208,12 @@ void TestReadInteraction::TestSubscribeUrgentWildcardEvent(nlTestSuite * apSuite // should be in the past NL_TEST_ASSERT(apSuite, reportScheduler->GetMinTimestampForHandler(nonUrgentDelegate.mpReadHandler) < - System::SystemClock().GetMonotonicTimestamp()); + gMockClock.GetMonotonicTimestamp()); NL_TEST_ASSERT(apSuite, !nonUrgentDelegate.mpReadHandler->IsDirty()); - // Wait for the min interval timer to fire. - startTime = System::SystemClock().GetMonotonicTimestamp(); - while (true) - { - if ((System::SystemClock().GetMonotonicTimestamp() - startTime) >= System::Clock::Milliseconds32(2100)) - { - break; - } - ctx.GetIOContext().DriveIO(); // at least one IO loop is guaranteed - } + // Advance monotonic timestamp for min interval to elapse + gMockClock.AdvanceMonotonic(System::Clock::Milliseconds32(2100)); + ctx.GetIOContext().DriveIO(); // No reporting should have happened. NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); @@ -1991,7 +2374,6 @@ void TestReadInteraction::TestSubscribeWildcard(nlTestSuite * apSuite, void * ap // Set a concrete path dirty { - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; @@ -2005,9 +2387,6 @@ void TestReadInteraction::TestSubscribeWildcard(nlTestSuite * apSuite, void * ap ctx.DrainAndServiceIO(); - NL_TEST_ASSERT( - apSuite, - !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); // We subscribed wildcard path twice, so we will receive two reports here. NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 2); @@ -2015,7 +2394,6 @@ void TestReadInteraction::TestSubscribeWildcard(nlTestSuite * apSuite, void * ap // Set a endpoint dirty { - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; delegate.mNumArrayItems = 0; @@ -2037,10 +2415,6 @@ void TestReadInteraction::TestSubscribeWildcard(nlTestSuite * apSuite, void * ap ctx.DrainAndServiceIO(); } while (last != delegate.mNumAttributeResponse); - NL_TEST_ASSERT( - apSuite, - !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); - NL_TEST_ASSERT(apSuite, delegate.mGotReport); // Mock endpoint3 has 13 attributes in total, and we subscribed twice. // And attribute 3/2/4 is a list with 6 elements and list chunking // is applied to it, but the way the packet boundaries fall we get two of @@ -2111,7 +2485,6 @@ void TestReadInteraction::TestSubscribePartialOverlap(nlTestSuite * apSuite, voi // Set a partial overlapped path dirty { - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; @@ -2124,9 +2497,6 @@ void TestReadInteraction::TestSubscribePartialOverlap(nlTestSuite * apSuite, voi ctx.DrainAndServiceIO(); - NL_TEST_ASSERT( - apSuite, - !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 1); NL_TEST_ASSERT(apSuite, delegate.mReceivedAttributePaths[0].mEndpointId == Test::kMockEndpoint2); @@ -2192,7 +2562,6 @@ void TestReadInteraction::TestSubscribeSetDirtyFullyOverlap(nlTestSuite * apSuit // Set a full overlapped path dirty and expect to receive one E2C3A1 { - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; @@ -2202,9 +2571,6 @@ void TestReadInteraction::TestSubscribeSetDirtyFullyOverlap(nlTestSuite * apSuit ctx.DrainAndServiceIO(); - NL_TEST_ASSERT( - apSuite, - !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 1); NL_TEST_ASSERT(apSuite, delegate.mReceivedAttributePaths[0].mEndpointId == Test::kMockEndpoint2); @@ -2319,11 +2685,11 @@ void TestReadInteraction::TestSubscribeInvalidAttributePathRoundtrip(nlTestSuite NL_TEST_ASSERT(apSuite, engine->ActiveHandlerAt(0) != nullptr); delegate.mpReadHandler = engine->ActiveHandlerAt(0); - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MaxIntervalElapsed, true); - // Manually trigger the callback that would schedule the next report as it would normally have been called if the time had - // elapsed as simulated above - reportScheduler->RunNodeCallbackForHandler(delegate.mpReadHandler); + // Advance monotonic timestamp for min interval to elapse + gMockClock.AdvanceMonotonic(System::Clock::Seconds16(readPrepareParams.mMaxIntervalCeilingSeconds)); + ctx.GetIOContext().DriveIO(); + + NL_TEST_ASSERT(apSuite, engine->GetReportingEngine().IsRunScheduled()); NL_TEST_ASSERT(apSuite, engine->GetReportingEngine().IsRunScheduled()); ctx.DrainAndServiceIO(); @@ -2462,8 +2828,8 @@ void TestReadInteraction::TestPostSubscribeRoundtripStatusReportTimeout(nlTestSu readPrepareParams.mAttributePathParamsListSize = 2; - readPrepareParams.mMinIntervalFloorSeconds = 2; - readPrepareParams.mMaxIntervalCeilingSeconds = 5; + readPrepareParams.mMinIntervalFloorSeconds = 0; + readPrepareParams.mMaxIntervalCeilingSeconds = 1; delegate.mNumAttributeResponse = 0; readPrepareParams.mKeepSubscriptions = false; @@ -2499,7 +2865,6 @@ void TestReadInteraction::TestPostSubscribeRoundtripStatusReportTimeout(nlTestSu dirtyPath2.mAttributeId = 2; // Test report with 2 different path - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; @@ -2510,14 +2875,13 @@ void TestReadInteraction::TestPostSubscribeRoundtripStatusReportTimeout(nlTestSu ctx.DrainAndServiceIO(); - NL_TEST_ASSERT( - apSuite, - !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 2); - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MaxIntervalElapsed, true); + // Wait for max interval to elapse + gMockClock.AdvanceMonotonic(System::Clock::Seconds16(readPrepareParams.mMaxIntervalCeilingSeconds)); + ctx.GetIOContext().DriveIO(); + delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; ctx.ExpireSessionBobToAlice(); @@ -2835,8 +3199,8 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkStatusReportTimeout(nlT readPrepareParams.mpAttributePathParamsList = attributePathParams; readPrepareParams.mAttributePathParamsListSize = 1; - readPrepareParams.mMinIntervalFloorSeconds = 2; - readPrepareParams.mMaxIntervalCeilingSeconds = 5; + readPrepareParams.mMinIntervalFloorSeconds = 0; + readPrepareParams.mMaxIntervalCeilingSeconds = 1; delegate.mNumAttributeResponse = 0; readPrepareParams.mKeepSubscriptions = false; @@ -2865,8 +3229,9 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkStatusReportTimeout(nlT dirtyPath1.mEndpointId = Test::kMockEndpoint3; dirtyPath1.mAttributeId = Test::MockAttributeId(4); - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MaxIntervalElapsed, true); + gMockClock.AdvanceMonotonic(System::Clock::Seconds16(readPrepareParams.mMaxIntervalCeilingSeconds)); + ctx.GetIOContext().DriveIO(); + err = engine->GetReportingEngine().SetDirty(dirtyPath1); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); delegate.mGotReport = false; @@ -2938,8 +3303,8 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkReportTimeout(nlTestSui readPrepareParams.mpAttributePathParamsList = attributePathParams; readPrepareParams.mAttributePathParamsListSize = 1; - readPrepareParams.mMinIntervalFloorSeconds = 2; - readPrepareParams.mMaxIntervalCeilingSeconds = 5; + readPrepareParams.mMinIntervalFloorSeconds = 0; + readPrepareParams.mMaxIntervalCeilingSeconds = 1; delegate.mNumAttributeResponse = 0; readPrepareParams.mKeepSubscriptions = false; @@ -2968,8 +3333,9 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkReportTimeout(nlTestSui dirtyPath1.mEndpointId = Test::kMockEndpoint3; dirtyPath1.mAttributeId = Test::MockAttributeId(4); - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MaxIntervalElapsed, true); + gMockClock.AdvanceMonotonic(System::Clock::Seconds16(readPrepareParams.mMaxIntervalCeilingSeconds)); + ctx.GetIOContext().DriveIO(); + err = engine->GetReportingEngine().SetDirty(dirtyPath1); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); delegate.mGotReport = false; @@ -3039,7 +3405,7 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkReport(nlTestSuite * ap readPrepareParams.mpAttributePathParamsList = attributePathParams; readPrepareParams.mAttributePathParamsListSize = 1; - readPrepareParams.mMinIntervalFloorSeconds = 2; + readPrepareParams.mMinIntervalFloorSeconds = 1; readPrepareParams.mMaxIntervalCeilingSeconds = 5; delegate.mNumAttributeResponse = 0; @@ -3074,28 +3440,25 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkReport(nlTestSuite * ap delegate.mNumAttributeResponse = 0; delegate.mNumArrayItems = 0; - // wait for min interval 2 seconds(in test, we use 1.9second considering the time variation), expect no event is received, + // wait for min interval 1 seconds(in test, we use 0.9second considering the time variation), expect no event is received, // then wait for 0.5 seconds, then all chunked dirty reports are sent out, which would not honor minInterval - System::Clock::Timestamp startTime = System::SystemClock().GetMonotonicTimestamp(); - while (true) - { - if ((System::SystemClock().GetMonotonicTimestamp() - startTime) >= System::Clock::Milliseconds32(1900)) - { - break; - } - ctx.GetIOContext().DriveIO(); - } + gMockClock.AdvanceMonotonic(System::Clock::Milliseconds32(900)); + ctx.GetIOContext().DriveIO(); + NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 0); - startTime = System::SystemClock().GetMonotonicTimestamp(); + System::Clock::Timestamp startTime = gMockClock.GetMonotonicTimestamp(); + + // Increment in time is done by steps here to allow for multiple IO processing at the right time and allow the timer to be + // rescheduled accordingly while (true) { - if ((System::SystemClock().GetMonotonicTimestamp() - startTime) >= System::Clock::Milliseconds32(500)) + ctx.GetIOContext().DriveIO(); + if ((gMockClock.GetMonotonicTimestamp() - startTime) >= System::Clock::Milliseconds32(500)) { break; } - ctx.GetIOContext().DriveIO(); + gMockClock.AdvanceMonotonic(System::Clock::Milliseconds32(10)); } - ctx.DrainAndServiceIO(); } // Two chunked reports carry 4 attributeDataIB: 1 with a list of 3 items, // and then one per remaining item. @@ -4350,14 +4713,11 @@ void TestReadInteraction::TestSubscriptionReportWithDefunctSession(nlTestSuite * NL_TEST_ASSERT(apSuite, SessionHandle(*readHandler->GetSession()) == ctx.GetSessionAliceToBob()); // Test that we send reports as needed. - reportScheduler->SetFlagsForHandler(readHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; engine->GetReportingEngine().SetDirty(subscribePath); - ctx.DrainAndServiceIO(); - NL_TEST_ASSERT(apSuite, - !reportScheduler->CheckFlagsForHandler(readHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); + NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 1); NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadHandlers(ReadHandler::InteractionType::Subscribe) == 1); @@ -4367,7 +4727,6 @@ void TestReadInteraction::TestSubscriptionReportWithDefunctSession(nlTestSuite * // Test that if the session is defunct we don't send reports and clean // up properly. readHandler->GetSession()->MarkAsDefunct(); - reportScheduler->SetFlagsForHandler(readHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; engine->GetReportingEngine().SetDirty(subscribePath); @@ -4419,6 +4778,18 @@ const nlTest sTests[] = NL_TEST_DEF("TestReadClientInvalidReport", chip::app::TestReadInteraction::TestReadClientInvalidReport), NL_TEST_DEF("TestReadHandlerInvalidAttributePath", chip::app::TestReadInteraction::TestReadHandlerInvalidAttributePath), NL_TEST_DEF("TestProcessSubscribeRequest", chip::app::TestReadInteraction::TestProcessSubscribeRequest), + /* + We need to figure out a way to run unit tests with an ICD build without affecting + all the standard unit tests + https://github.com/project-chip/connectedhomeip/issues/28446 + */ +#if CHIP_CONFIG_ENABLE_ICD_SERVER + NL_TEST_DEF("TestICDProcessSubscribeRequestSupMaxIntervalCeiling", chip::app::TestReadInteraction::TestICDProcessSubscribeRequestSupMaxIntervalCeiling), + NL_TEST_DEF("TestICDProcessSubscribeRequestInfMaxIntervalCeiling", chip::app::TestReadInteraction::TestICDProcessSubscribeRequestInfMaxIntervalCeiling), + NL_TEST_DEF("TestICDProcessSubscribeRequestSupMinInterval", chip::app::TestReadInteraction::TestICDProcessSubscribeRequestSupMinInterval), + NL_TEST_DEF("TestICDProcessSubscribeRequestMaxMinInterval", chip::app::TestReadInteraction::TestICDProcessSubscribeRequestMaxMinInterval), + NL_TEST_DEF("TestICDProcessSubscribeRequestInvalidIdleModeInterval", chip::app::TestReadInteraction::TestICDProcessSubscribeRequestInvalidIdleModeInterval), +#endif // #if CHIP_CONFIG_ENABLE_ICD_SERVER NL_TEST_DEF("TestSubscribeRoundtrip", chip::app::TestReadInteraction::TestSubscribeRoundtrip), NL_TEST_DEF("TestPostSubscribeRoundtripChunkReport", chip::app::TestReadInteraction::TestPostSubscribeRoundtripChunkReport), NL_TEST_DEF("TestReadClientReceiveInvalidMessage", chip::app::TestReadInteraction::TestReadClientReceiveInvalidMessage), @@ -4437,7 +4808,15 @@ const nlTest sTests[] = NL_TEST_DEF("TestReadHandlerInvalidSubscribeRequest", chip::app::TestReadInteraction::TestReadHandlerInvalidSubscribeRequest), NL_TEST_DEF("TestSubscribeInvalidateFabric", chip::app::TestReadInteraction::TestSubscribeInvalidateFabric), NL_TEST_DEF("TestShutdownSubscription", chip::app::TestReadInteraction::TestShutdownSubscription), + /* + Disable test when running the ICD specific unit tests. + Test tests reporting feature with hard coded time jumps which don't take into account that an ICD + can change the requested MaxInterval during the subscription response / request process + https://github.com/project-chip/connectedhomeip/issues/28419 + */ +#if CHIP_CONFIG_ENABLE_ICD_SERVER != 1 NL_TEST_DEF("TestSubscribeUrgentWildcardEvent", chip::app::TestReadInteraction::TestSubscribeUrgentWildcardEvent), +#endif NL_TEST_DEF("TestSubscribeWildcard", chip::app::TestReadInteraction::TestSubscribeWildcard), NL_TEST_DEF("TestSubscribePartialOverlap", chip::app::TestReadInteraction::TestSubscribePartialOverlap), NL_TEST_DEF("TestSubscribeSetDirtyFullyOverlap", chip::app::TestReadInteraction::TestSubscribeSetDirtyFullyOverlap), diff --git a/src/app/tests/suites/TestGroupKeyManagementCluster.yaml b/src/app/tests/suites/TestGroupKeyManagementCluster.yaml index 034bdfd0a9a7b5..cc69380fa16796 100644 --- a/src/app/tests/suites/TestGroupKeyManagementCluster.yaml +++ b/src/app/tests/suites/TestGroupKeyManagementCluster.yaml @@ -538,6 +538,25 @@ tests: # Note: There's always an IPK keyset with index 0 contains: [0x01a1, 0x01a2, 0] + - label: "Write one keyset too many when already full" + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x0222, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf", + EpochStartTime0: 3110000, + EpochKey1: "\xe1\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef", + EpochStartTime1: 3110001, + EpochKey2: "\xf1\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff", + EpochStartTime2: 3110002, + } + response: + error: RESOURCE_EXHAUSTED + - label: "Write Group Keys (invalid)" command: "writeAttribute" attribute: "GroupKeyMap" diff --git a/src/app/tests/suites/TestIcdManagementCluster.yaml b/src/app/tests/suites/TestIcdManagementCluster.yaml index 6b3d29c1fc5f6b..fb52bd71a48a0b 100644 --- a/src/app/tests/suites/TestIcdManagementCluster.yaml +++ b/src/app/tests/suites/TestIcdManagementCluster.yaml @@ -32,7 +32,7 @@ tests: command: "readAttribute" attribute: "IdleModeInterval" response: - value: 500 + value: 2000 - label: "Read ActiveModeInterval" command: "readAttribute" diff --git a/src/app/util/af-types.h b/src/app/util/af-types.h index 9c4a7ca6a5f069..20ab5fcfc0b508 100644 --- a/src/app/util/af-types.h +++ b/src/app/util/af-types.h @@ -181,14 +181,11 @@ typedef struct uint16_t endpointSize; } EmberAfEndpointType; -#ifdef DOXYGEN_SHOULD_SKIP_THIS -enum EmberAfEndpointBitmask; -#else -typedef uint8_t EmberAfEndpointBitmask; -enum -#endif -{ EMBER_AF_ENDPOINT_DISABLED = 0x00, - EMBER_AF_ENDPOINT_ENABLED = 0x01, +enum class EmberAfEndpointOptions : uint8_t +{ + isEnabled = 0x1, + isFlatComposition = 0x2, + isTreeComposition = 0x3, }; /** @@ -209,7 +206,7 @@ struct EmberAfDefinedEndpoint /** * Meta-data about the endpoint */ - EmberAfEndpointBitmask bitmask = EMBER_AF_ENDPOINT_DISABLED; + chip::BitMask bitmask; /** * Endpoint type for this endpoint. */ diff --git a/src/app/util/af.h b/src/app/util/af.h index 1ea0fa64872698..0875c09478c8d8 100644 --- a/src/app/util/af.h +++ b/src/app/util/af.h @@ -130,7 +130,7 @@ extern EmberAfDefinedEndpoint emAfEndpoints[]; #endif /** - * @brief Returns root endpoint of a composed bridged device + * @brief Returns parent endpoint for a given endpoint index */ chip::EndpointId emberAfParentEndpointFromIndex(uint16_t index); @@ -303,5 +303,30 @@ class EnabledEndpointsWithServerCluster ClusterId mClusterId; }; +/** + * @brief Sets the parent endpoint for a given endpoint + */ +CHIP_ERROR SetParentEndpointForEndpoint(EndpointId childEndpoint, EndpointId parentEndpoint); + +/** + * @brief Sets an Endpoint to use Flat Composition + */ +CHIP_ERROR SetFlatCompositionForEndpoint(EndpointId endpoint); + +/** + * @brief Sets an Endpoint to use Tree Composition + */ +CHIP_ERROR SetTreeCompositionForEndpoint(EndpointId endpoint); + +/** + * @brief Returns true is an Endpoint has flat composition + */ +bool IsFlatCompositionForEndpoint(EndpointId endpoint); + +/** + * @brief Returns true is an Endpoint has tree composition + */ +bool IsTreeCompositionForEndpoint(EndpointId endpoint); + } // namespace app } // namespace chip diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index 788723a2162bf5..118e38f78961f2 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -192,7 +192,9 @@ void emberAfEndpointConfigure() emAfEndpoints[ep].deviceTypeList = endpointDeviceTypeList(ep); emAfEndpoints[ep].endpointType = endpointTypeMacro(ep); emAfEndpoints[ep].dataVersions = currentDataVersions; - emAfEndpoints[ep].bitmask = EMBER_AF_ENDPOINT_ENABLED; + + emAfEndpoints[ep].bitmask.Set(EmberAfEndpointOptions::isEnabled); + emAfEndpoints[ep].bitmask.Set(EmberAfEndpointOptions::isFlatComposition); // Increment currentDataVersions by 1 (slot) for every server cluster // this endpoint has. @@ -271,7 +273,7 @@ EmberAfStatus emberAfSetDynamicEndpoint(uint16_t index, EndpointId id, const Emb emAfEndpoints[index].endpointType = ep; emAfEndpoints[index].dataVersions = dataVersionStorage.data(); // Start the endpoint off as disabled. - emAfEndpoints[index].bitmask = EMBER_AF_ENDPOINT_DISABLED; + emAfEndpoints[index].bitmask.Clear(EmberAfEndpointOptions::isEnabled); emAfEndpoints[index].parentEndpointId = parentEndpointId; emberAfSetDynamicEndpointCount(MAX_ENDPOINT_COUNT - FIXED_ENDPOINT_COUNT); @@ -322,7 +324,7 @@ uint16_t emberAfEndpointCount() bool emberAfEndpointIndexIsEnabled(uint16_t index) { - return (emAfEndpoints[index].bitmask & EMBER_AF_ENDPOINT_ENABLED); + return (emAfEndpoints[index].bitmask.Has(EmberAfEndpointOptions::isEnabled)); } bool emberAfIsStringAttributeType(EmberAfAttributeType attributeType) @@ -838,7 +840,7 @@ static uint16_t findIndexFromEndpoint(EndpointId endpoint, bool ignoreDisabledEn for (epi = 0; epi < emberAfEndpointCount(); epi++) { if (emAfEndpoints[epi].endpoint == endpoint && - (!ignoreDisabledEndpoints || emAfEndpoints[epi].bitmask & EMBER_AF_ENDPOINT_ENABLED)) + (!ignoreDisabledEndpoints || emAfEndpoints[epi].bitmask.Has(EmberAfEndpointOptions::isEnabled))) { return epi; } @@ -919,11 +921,11 @@ bool emberAfEndpointEnableDisable(EndpointId endpoint, bool enable) return false; } - currentlyEnabled = emAfEndpoints[index].bitmask & EMBER_AF_ENDPOINT_ENABLED; + currentlyEnabled = emAfEndpoints[index].bitmask.Has(EmberAfEndpointOptions::isEnabled); if (enable) { - emAfEndpoints[index].bitmask |= EMBER_AF_ENDPOINT_ENABLED; + emAfEndpoints[index].bitmask.Set(EmberAfEndpointOptions::isEnabled); } #if defined(EZSP_HOST) @@ -962,7 +964,7 @@ bool emberAfEndpointEnableDisable(EndpointId endpoint, bool enable) if (!enable) { - emAfEndpoints[index].bitmask &= EMBER_AF_ENDPOINT_DISABLED; + emAfEndpoints[index].bitmask.Clear(EmberAfEndpointOptions::isEnabled); } return true; @@ -1421,6 +1423,64 @@ app::AttributeAccessInterface * GetAttributeAccessOverride(EndpointId endpointId return nullptr; } + +CHIP_ERROR SetParentEndpointForEndpoint(EndpointId childEndpoint, EndpointId parentEndpoint) +{ + uint16_t childIndex = emberAfIndexFromEndpoint(childEndpoint); + uint16_t parentIndex = emberAfIndexFromEndpoint(parentEndpoint); + + if (childIndex == kEmberInvalidEndpointIndex || parentIndex == kEmberInvalidEndpointIndex) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + emAfEndpoints[childIndex].parentEndpointId = parentEndpoint; + return CHIP_NO_ERROR; +} + +CHIP_ERROR SetFlatCompositionForEndpoint(EndpointId endpoint) +{ + uint16_t index = emberAfIndexFromEndpoint(endpoint); + if (index == kEmberInvalidEndpointIndex) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + emAfEndpoints[index].bitmask.Clear(EmberAfEndpointOptions::isTreeComposition); + emAfEndpoints[index].bitmask.Set(EmberAfEndpointOptions::isFlatComposition); + return CHIP_NO_ERROR; +} + +CHIP_ERROR SetTreeCompositionForEndpoint(EndpointId endpoint) +{ + uint16_t index = emberAfIndexFromEndpoint(endpoint); + if (index == kEmberInvalidEndpointIndex) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + emAfEndpoints[index].bitmask.Clear(EmberAfEndpointOptions::isFlatComposition); + emAfEndpoints[index].bitmask.Set(EmberAfEndpointOptions::isTreeComposition); + return CHIP_NO_ERROR; +} + +bool IsFlatCompositionForEndpoint(EndpointId endpoint) +{ + uint16_t index = emberAfIndexFromEndpoint(endpoint); + if (index == kEmberInvalidEndpointIndex) + { + return false; + } + return emAfEndpoints[index].bitmask.Has(EmberAfEndpointOptions::isFlatComposition); +} + +bool IsTreeCompositionForEndpoint(EndpointId endpoint) +{ + uint16_t index = emberAfIndexFromEndpoint(endpoint); + if (index == kEmberInvalidEndpointIndex) + { + return false; + } + return emAfEndpoints[index].bitmask.Has(EmberAfEndpointOptions::isTreeComposition); +} + } // namespace app } // namespace chip diff --git a/src/controller/BUILD.gn b/src/controller/BUILD.gn index 3172c1815a1271..9fcbca7ea451e2 100644 --- a/src/controller/BUILD.gn +++ b/src/controller/BUILD.gn @@ -13,6 +13,8 @@ # limitations under the License. import("//build_overrides/chip.gni") +import("${chip_root}/src/app/common_flags.gni") +import("${chip_root}/src/lib/lib.gni") import("${chip_root}/src/platform/device.gni") import("${chip_root}/src/platform/python.gni") @@ -21,15 +23,13 @@ static_library("controller") { sources = [ "CHIPCluster.h" ] - if (chip_controller) { + if (chip_controller && chip_build_controller) { sources += [ "AbstractDnssdDiscoveryController.cpp", "AutoCommissioner.cpp", "AutoCommissioner.h", "CHIPCommissionableNodeController.cpp", "CHIPCommissionableNodeController.h", - "CHIPDeviceController.cpp", - "CHIPDeviceController.h", "CHIPDeviceControllerFactory.cpp", "CHIPDeviceControllerFactory.h", "CommissioneeDeviceProxy.cpp", @@ -37,10 +37,6 @@ static_library("controller") { "CommissionerDiscoveryController.cpp", "CommissionerDiscoveryController.h", "CommissioningDelegate.cpp", - "CommissioningWindowOpener.cpp", - "CommissioningWindowOpener.h", - "CurrentFabricRemover.cpp", - "CurrentFabricRemover.h", "DeviceDiscoveryDelegate.h", "DevicePairingDelegate.h", "EmptyDataModelHandler.cpp", @@ -49,6 +45,16 @@ static_library("controller") { "SetUpCodePairer.cpp", "SetUpCodePairer.h", ] + if (chip_enable_read_client) { + sources += [ + "CHIPDeviceController.cpp", + "CHIPDeviceController.h", + "CommissioningWindowOpener.cpp", + "CommissioningWindowOpener.h", + "CurrentFabricRemover.cpp", + "CurrentFabricRemover.h", + ] + } } cflags = [ "-Wconversion" ] diff --git a/src/controller/CHIPCluster.h b/src/controller/CHIPCluster.h index ab37a52ece8e24..4324092871424b 100644 --- a/src/controller/CHIPCluster.h +++ b/src/controller/CHIPCluster.h @@ -221,6 +221,7 @@ class DLL_EXPORT ClusterBase return WriteAttribute(requestData, context, successCb, failureCb, NullOptional, doneCb, aDataVersion); } +#if CHIP_CONFIG_ENABLE_READ_CLIENT /** * Read an attribute and get a type-safe callback with the attribute value. */ @@ -399,6 +400,7 @@ class DLL_EXPORT ClusterBase onSubscriptionEstablishedCb, onResubscriptionAttemptCb, aKeepPreviousSubscriptions, aIsUrgentEvent); } +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT protected: Messaging::ExchangeManager & mExchangeManager; diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index 9fd8d1cfe7ee03..2d85fdce3068e4 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -384,8 +384,10 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, #if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY // make this commissioner discoverable public Protocols::UserDirectedCommissioning::InstanceNameResolver, #endif - public SessionEstablishmentDelegate, - public app::ClusterStateCache::Callback +#if CHIP_CONFIG_ENABLE_READ_CLIENT + public app::ClusterStateCache::Callback, +#endif + public SessionEstablishmentDelegate { public: DeviceCommissioner(); @@ -683,8 +685,10 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, void RegisterPairingDelegate(DevicePairingDelegate * pairingDelegate) { mPairingDelegate = pairingDelegate; } DevicePairingDelegate * GetPairingDelegate() const { return mPairingDelegate; } +#if CHIP_CONFIG_ENABLE_READ_CLIENT // ClusterStateCache::Callback impl void OnDone(app::ReadClient *) override; +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT // Issue an NOC chain using the associated OperationalCredentialsDelegate. The NOC chain will // be provided in X509 DER format. @@ -915,11 +919,13 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, void SendCommissioningReadRequest(DeviceProxy * proxy, Optional timeout, app::AttributePathParams * readPaths, size_t readPathsSize); +#if CHIP_CONFIG_ENABLE_READ_CLIENT // Parsers for the two different read clients void ParseCommissioningInfo(); void ParseFabrics(); // Called by ParseCommissioningInfo void ParseTimeSyncInfo(ReadCommissioningInfo & info); +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT static CHIP_ERROR ConvertFromOperationalCertStatus(chip::app::Clusters::OperationalCredentials::NodeOperationalCertStatusEnum err); @@ -959,8 +965,10 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, nullptr; // Commissioning delegate that issued the PerformCommissioningStep command CompletionStatus commissioningCompletionStatus; +#if CHIP_CONFIG_ENABLE_READ_CLIENT Platform::UniquePtr mAttributeCache; Platform::UniquePtr mReadClient; +#endif Credentials::AttestationVerificationResult mAttestationResult; Platform::UniquePtr mAttestationDeviceInfo; Credentials::DeviceAttestationVerifier * mDeviceAttestationVerifier = nullptr; diff --git a/src/controller/CHIPDeviceControllerFactory.cpp b/src/controller/CHIPDeviceControllerFactory.cpp index f39a3c7a65ed0e..c57cb9a57dd28c 100644 --- a/src/controller/CHIPDeviceControllerFactory.cpp +++ b/src/controller/CHIPDeviceControllerFactory.cpp @@ -65,6 +65,7 @@ CHIP_ERROR DeviceControllerFactory::Init(FactoryInitParams params) mOperationalKeystore = params.operationalKeystore; mOpCertStore = params.opCertStore; mCertificateValidityPolicy = params.certificateValidityPolicy; + mSessionResumptionStorage = params.sessionResumptionStorage; mEnableServerInteractions = params.enableServerInteractions; CHIP_ERROR err = InitSystemState(params); @@ -94,6 +95,7 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState() params.operationalKeystore = mOperationalKeystore; params.opCertStore = mOpCertStore; params.certificateValidityPolicy = mCertificateValidityPolicy; + params.sessionResumptionStorage = mSessionResumptionStorage; } return InitSystemState(params); @@ -195,12 +197,24 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) tempFabricTable = stateParams.fabricTable; } - auto sessionResumptionStorage = chip::Platform::MakeUnique(); - ReturnErrorOnFailure(sessionResumptionStorage->Init(params.fabricIndependentStorage)); - stateParams.sessionResumptionStorage = std::move(sessionResumptionStorage); + SessionResumptionStorage * sessionResumptionStorage; + if (params.sessionResumptionStorage == nullptr) + { + auto ownedSessionResumptionStorage = chip::Platform::MakeUnique(); + ReturnErrorOnFailure(ownedSessionResumptionStorage->Init(params.fabricIndependentStorage)); + stateParams.ownedSessionResumptionStorage = std::move(ownedSessionResumptionStorage); + stateParams.externalSessionResumptionStorage = nullptr; + sessionResumptionStorage = stateParams.ownedSessionResumptionStorage.get(); + } + else + { + stateParams.ownedSessionResumptionStorage = nullptr; + stateParams.externalSessionResumptionStorage = params.sessionResumptionStorage; + sessionResumptionStorage = stateParams.externalSessionResumptionStorage; + } auto delegate = chip::Platform::MakeUnique(); - ReturnErrorOnFailure(delegate->Init(stateParams.sessionResumptionStorage.get(), stateParams.groupDataProvider)); + ReturnErrorOnFailure(delegate->Init(sessionResumptionStorage, stateParams.groupDataProvider)); stateParams.fabricTableDelegate = delegate.get(); ReturnErrorOnFailure(stateParams.fabricTable->AddFabricDelegate(stateParams.fabricTableDelegate)); delegate.release(); @@ -222,7 +236,7 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) // Enable listening for session establishment messages. ReturnErrorOnFailure(stateParams.caseServer->ListenForSessionEstablishment( - stateParams.exchangeMgr, stateParams.sessionMgr, stateParams.fabricTable, stateParams.sessionResumptionStorage.get(), + stateParams.exchangeMgr, stateParams.sessionMgr, stateParams.fabricTable, sessionResumptionStorage, stateParams.certificateValidityPolicy, stateParams.groupDataProvider)); // @@ -256,7 +270,7 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) CASEClientInitParams sessionInitParams = { .sessionManager = stateParams.sessionMgr, - .sessionResumptionStorage = stateParams.sessionResumptionStorage.get(), + .sessionResumptionStorage = sessionResumptionStorage, .certificateValidityPolicy = stateParams.certificateValidityPolicy, .exchangeMgr = stateParams.exchangeMgr, .fabricTable = stateParams.fabricTable, @@ -373,6 +387,7 @@ void DeviceControllerFactory::Shutdown() mOperationalKeystore = nullptr; mOpCertStore = nullptr; mCertificateValidityPolicy = nullptr; + mSessionResumptionStorage = nullptr; } void DeviceControllerSystemState::Shutdown() diff --git a/src/controller/CHIPDeviceControllerFactory.h b/src/controller/CHIPDeviceControllerFactory.h index f807f39e1fd570..04855d62cfc3d2 100644 --- a/src/controller/CHIPDeviceControllerFactory.h +++ b/src/controller/CHIPDeviceControllerFactory.h @@ -34,6 +34,7 @@ #include #include #include +#include namespace chip { @@ -106,8 +107,8 @@ struct SetupParams }; // TODO everything other than the fabric storage, group data provider, OperationalKeystore, -// OperationalCertificateStore and SessionKeystore here should be removed. We're blocked -// because of the need to support !CHIP_DEVICE_LAYER +// OperationalCertificateStore, SessionKeystore, and SessionResumptionStorage here should +// be removed. We're blocked because of the need to support !CHIP_DEVICE_LAYER struct FactoryInitParams { System::Layer * systemLayer = nullptr; @@ -121,6 +122,7 @@ struct FactoryInitParams FabricTable * fabricTable = nullptr; OperationalKeystore * operationalKeystore = nullptr; Credentials::OperationalCertificateStore * opCertStore = nullptr; + SessionResumptionStorage * sessionResumptionStorage = nullptr; #if CONFIG_NETWORK_LAYER_BLE Ble::BleLayer * bleLayer = nullptr; #endif @@ -257,6 +259,7 @@ class DeviceControllerFactory Crypto::OperationalKeystore * mOperationalKeystore = nullptr; Credentials::OperationalCertificateStore * mOpCertStore = nullptr; Credentials::CertificateValidityPolicy * mCertificateValidityPolicy = nullptr; + SessionResumptionStorage * mSessionResumptionStorage = nullptr; bool mEnableServerInteractions = false; }; diff --git a/src/controller/CHIPDeviceControllerSystemState.h b/src/controller/CHIPDeviceControllerSystemState.h index 37f85b1cd90784..6692fc6ecbc308 100644 --- a/src/controller/CHIPDeviceControllerSystemState.h +++ b/src/controller/CHIPDeviceControllerSystemState.h @@ -85,10 +85,18 @@ struct DeviceControllerSystemStateParams Credentials::GroupDataProvider * groupDataProvider = nullptr; Crypto::SessionKeystore * sessionKeystore = nullptr; + // NOTE: Exactly one of externalSessionResumptionStorage (externally provided, + // externally owned) or ownedSessionResumptionStorage (managed by the system + // state) must be non-null. + SessionResumptionStorage * externalSessionResumptionStorage = nullptr; + // Params that will be deallocated via Platform::Delete in // DeviceControllerSystemState::Shutdown. DeviceTransportMgr * transportMgr = nullptr; - Platform::UniquePtr sessionResumptionStorage; + // NOTE: Exactly one of externalSessionResumptionStorage (externally provided, + // externally owned) or ownedSessionResumptionStorage (managed by the system + // state) must be non-null. + Platform::UniquePtr ownedSessionResumptionStorage; Credentials::CertificateValidityPolicy * certificateValidityPolicy = nullptr; SessionManager * sessionMgr = nullptr; Protocols::SecureChannel::UnsolicitedStatusHandler * unsolicitedStatusHandler = nullptr; @@ -132,8 +140,18 @@ class DeviceControllerSystemState mCASESessionManager(params.caseSessionManager), mSessionSetupPool(params.sessionSetupPool), mCASEClientPool(params.caseClientPool), mGroupDataProvider(params.groupDataProvider), mTimerDelegate(params.timerDelegate), mReportScheduler(params.reportScheduler), mSessionKeystore(params.sessionKeystore), - mFabricTableDelegate(params.fabricTableDelegate), mSessionResumptionStorage(std::move(params.sessionResumptionStorage)) + mFabricTableDelegate(params.fabricTableDelegate), + mOwnedSessionResumptionStorage(std::move(params.ownedSessionResumptionStorage)) { + if (mOwnedSessionResumptionStorage) + { + mSessionResumptionStorage = mOwnedSessionResumptionStorage.get(); + } + else + { + mSessionResumptionStorage = params.externalSessionResumptionStorage; + } + #if CONFIG_NETWORK_LAYER_BLE mBleLayer = params.bleLayer; #endif @@ -172,7 +190,7 @@ class DeviceControllerSystemState mUnsolicitedStatusHandler != nullptr && mExchangeMgr != nullptr && mMessageCounterManager != nullptr && mFabrics != nullptr && mCASESessionManager != nullptr && mSessionSetupPool != nullptr && mCASEClientPool != nullptr && mGroupDataProvider != nullptr && mReportScheduler != nullptr && mTimerDelegate != nullptr && - mSessionKeystore != nullptr; + mSessionKeystore != nullptr && mSessionResumptionStorage != nullptr; }; System::Layer * SystemLayer() const { return mSystemLayer; }; @@ -221,7 +239,8 @@ class DeviceControllerSystemState app::reporting::ReportScheduler * mReportScheduler = nullptr; Crypto::SessionKeystore * mSessionKeystore = nullptr; FabricTable::Delegate * mFabricTableDelegate = nullptr; - Platform::UniquePtr mSessionResumptionStorage; + SessionResumptionStorage * mSessionResumptionStorage = nullptr; + Platform::UniquePtr mOwnedSessionResumptionStorage; // If mTempFabricTable is not null, it was created during // DeviceControllerFactory::InitSystemState and needs to be diff --git a/src/controller/ReadInteraction.h b/src/controller/ReadInteraction.h index 88c1f902121de6..34491dd9edfebf 100644 --- a/src/controller/ReadInteraction.h +++ b/src/controller/ReadInteraction.h @@ -23,6 +23,7 @@ #include #include +#if CHIP_CONFIG_ENABLE_READ_CLIENT namespace chip { namespace Controller { namespace detail { @@ -328,3 +329,4 @@ CHIP_ERROR SubscribeEvent( } // namespace Controller } // namespace chip +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT diff --git a/src/controller/TypedReadCallback.h b/src/controller/TypedReadCallback.h index aa0e4394ad4e5e..f35a39670ee8e7 100644 --- a/src/controller/TypedReadCallback.h +++ b/src/controller/TypedReadCallback.h @@ -24,6 +24,7 @@ #include #include +#if CHIP_CONFIG_ENABLE_READ_CLIENT namespace chip { namespace Controller { @@ -290,3 +291,4 @@ class TypedReadEventCallback final : public app::ReadClient::Callback } // namespace Controller } // namespace chip +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 7975fdcdb1b180..bc52b5ffeb934d 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -16,12 +16,6 @@ } ], "package": [ - { - "pathRelativity": "relativeToZap", - "path": "../../app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" - }, { "pathRelativity": "relativeToZap", "path": "../../app/zap-templates/zcl/zcl.json", @@ -29,6 +23,12 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" } ], "endpointTypes": [ @@ -10280,7 +10280,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "500", @@ -10296,7 +10296,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "300", @@ -10312,7 +10312,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "300", @@ -10344,7 +10344,7 @@ "side": "server", "type": "int32u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10360,7 +10360,7 @@ "side": "server", "type": "int16u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -10814,7 +10814,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10830,7 +10830,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10846,7 +10846,7 @@ "side": "server", "type": "int8u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11046,7 +11046,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11062,7 +11062,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11078,7 +11078,7 @@ "side": "server", "type": "int8u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11490,7 +11490,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11506,7 +11506,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11522,7 +11522,7 @@ "side": "server", "type": "int8u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11722,7 +11722,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11738,7 +11738,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11754,7 +11754,7 @@ "side": "server", "type": "int8u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12388,7 +12388,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12404,7 +12404,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12420,7 +12420,7 @@ "side": "server", "type": "int8u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12928,7 +12928,7 @@ "reportableChange": 0 }, { - "name": "SensitivityLevel", + "name": "SmokeSensitivityLevel", "code": 11, "mfgCode": null, "side": "server", @@ -13852,7 +13852,7 @@ "side": "server", "type": "percent", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13868,7 +13868,7 @@ "side": "server", "type": "DegradationDirectionEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13884,7 +13884,7 @@ "side": "server", "type": "ChangeIndicationEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -13900,7 +13900,7 @@ "side": "server", "type": "boolean", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14064,7 +14064,7 @@ "side": "server", "type": "percent", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14080,7 +14080,7 @@ "side": "server", "type": "DegradationDirectionEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14096,7 +14096,7 @@ "side": "server", "type": "ChangeIndicationEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14112,7 +14112,7 @@ "side": "server", "type": "boolean", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -26937,238 +26937,6 @@ } ] }, - { - "name": "Mode Base", - "code": 61731, - "mfgCode": null, - "define": "MODE_BASE_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ChangeToMode", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Mode Base", - "code": 61731, - "mfgCode": null, - "define": "MODE_BASE_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [ - { - "name": "ChangeToModeResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "SupportedModes", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentMode", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "StartUpMode", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "OnMode", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "Unit Testing", "code": 4294048773, diff --git a/src/controller/java/AndroidCallbacks.cpp b/src/controller/java/AndroidCallbacks.cpp index e236aef95fc41a..d55dfdf953c91c 100644 --- a/src/controller/java/AndroidCallbacks.cpp +++ b/src/controller/java/AndroidCallbacks.cpp @@ -17,8 +17,10 @@ #include "AndroidCallbacks.h" #include #include +#if USE_JAVA_TLV_ENCODE_DECODE #include #include +#endif #include #include #include @@ -243,14 +245,17 @@ void ReportCallback::OnAttributeData(const app::ConcreteDataAttributePath & aPat return; } - TLV::TLVReader readerForJavaObject; TLV::TLVReader readerForJavaTLV; TLV::TLVReader readerForJson; - readerForJavaObject.Init(*apData); readerForJavaTLV.Init(*apData); readerForJson.Init(*apData); - jobject value = DecodeAttributeValue(aPath, readerForJavaObject, &err); + jobject value = nullptr; +#if USE_JAVA_TLV_ENCODE_DECODE + TLV::TLVReader readerForJavaObject; + readerForJavaObject.Init(*apData); + + value = DecodeAttributeValue(aPath, readerForJavaObject, &err); // If we don't know this attribute, suppress it. if (err == CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB) { @@ -260,7 +265,7 @@ void ReportCallback::OnAttributeData(const app::ConcreteDataAttributePath & aPat VerifyOrReturn(err == CHIP_NO_ERROR, ReportError(attributePathObj, nullptr, err)); VerifyOrReturn(!env->ExceptionCheck(), env->ExceptionDescribe(), ReportError(attributePathObj, nullptr, CHIP_JNI_ERROR_EXCEPTION_THROWN)); - +#endif // Create TLV byte array to pass to Java layer size_t bufferLen = readerForJavaTLV.GetRemainingLength() + readerForJavaTLV.GetLengthRead(); std::unique_ptr buffer = std::unique_ptr(new uint8_t[bufferLen]); @@ -354,10 +359,8 @@ void ReportCallback::OnEventData(const app::EventHeader & aEventHeader, TLV::TLV return; } - TLV::TLVReader readerForJavaObject; TLV::TLVReader readerForJavaTLV; TLV::TLVReader readerForJson; - readerForJavaObject.Init(*apData); readerForJavaTLV.Init(*apData); readerForJson.Init(*apData); @@ -365,7 +368,11 @@ void ReportCallback::OnEventData(const app::EventHeader & aEventHeader, TLV::TLV jlong priorityLevel = static_cast(aEventHeader.mPriorityLevel); jlong timestamp = static_cast(aEventHeader.mTimestamp.mValue); - jobject value = DecodeEventValue(aEventHeader.mPath, readerForJavaObject, &err); + jobject value = nullptr; +#if USE_JAVA_TLV_ENCODE_DECODE + TLV::TLVReader readerForJavaObject; + readerForJavaObject.Init(*apData); + value = DecodeEventValue(aEventHeader.mPath, readerForJavaObject, &err); // If we don't know this event, just skip it. if (err == CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB) { @@ -374,6 +381,7 @@ void ReportCallback::OnEventData(const app::EventHeader & aEventHeader, TLV::TLV VerifyOrReturn(err == CHIP_NO_ERROR, ReportError(nullptr, eventPathObj, err)); VerifyOrReturn(!env->ExceptionCheck(), env->ExceptionDescribe(), ReportError(nullptr, eventPathObj, CHIP_JNI_ERROR_EXCEPTION_THROWN)); +#endif // Create TLV byte array to pass to Java layer size_t bufferLen = readerForJavaTLV.GetRemainingLength() + readerForJavaTLV.GetLengthRead(); @@ -699,10 +707,8 @@ void ReportEventCallback::OnEventData(const app::EventHeader & aEventHeader, TLV return; } - TLV::TLVReader readerForJavaObject; TLV::TLVReader readerForJavaTLV; TLV::TLVReader readerForJson; - readerForJavaObject.Init(*apData); readerForJavaTLV.Init(*apData); readerForJson.Init(*apData); @@ -710,11 +716,16 @@ void ReportEventCallback::OnEventData(const app::EventHeader & aEventHeader, TLV jlong priorityLevel = static_cast(aEventHeader.mPriorityLevel); jlong timestamp = static_cast(aEventHeader.mTimestamp.mValue); - jobject value = DecodeEventValue(aEventHeader.mPath, readerForJavaObject, &err); + jobject value = nullptr; +#if USE_JAVA_TLV_ENCODE_DECODE + TLV::TLVReader readerForJavaObject; + readerForJavaObject.Init(*apData); + value = DecodeEventValue(aEventHeader.mPath, readerForJavaObject, &err); // If we don't know this event, just skip it. VerifyOrReturn(err != CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB); VerifyOrReturn(err == CHIP_NO_ERROR, ReportError(eventPathObj, err)); VerifyOrReturn(!env->ExceptionCheck(), env->ExceptionDescribe(), ReportError(eventPathObj, CHIP_JNI_ERROR_EXCEPTION_THROWN)); +#endif // Create TLV byte array to pass to Java layer size_t bufferLen = readerForJavaTLV.GetRemainingLength() + readerForJavaTLV.GetLengthRead(); diff --git a/src/controller/java/AndroidDeviceControllerWrapper.cpp b/src/controller/java/AndroidDeviceControllerWrapper.cpp index 974cb882cd2a9e..110121d6e2e41c 100644 --- a/src/controller/java/AndroidDeviceControllerWrapper.cpp +++ b/src/controller/java/AndroidDeviceControllerWrapper.cpp @@ -653,12 +653,11 @@ void AndroidDeviceControllerWrapper::OnScanNetworksSuccess( chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", entry.rssi, newElement_rssi); jclass wiFiInterfaceScanResultStructClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$NetworkCommissioningClusterWiFiInterfaceScanResultStruct", - wiFiInterfaceScanResultStructClass); + err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/WiFiScanResult", + wiFiInterfaceScanResultStructClass); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$NetworkCommissioningClusterWiFiInterfaceScanResultStruct"); + ChipLogError(Zcl, "Could not find class WiFiScanResult"); return; } jmethodID wiFiInterfaceScanResultStructCtor = @@ -666,8 +665,7 @@ void AndroidDeviceControllerWrapper::OnScanNetworksSuccess( "(Ljava/lang/Integer;[B[BLjava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V"); if (wiFiInterfaceScanResultStructCtor == nullptr) { - ChipLogError(Zcl, - "Could not find ChipStructs$NetworkCommissioningClusterWiFiInterfaceScanResultStruct constructor"); + ChipLogError(Zcl, "Could not find WiFiScanResult constructor"); return; } @@ -717,12 +715,11 @@ void AndroidDeviceControllerWrapper::OnScanNetworksSuccess( chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", entry.lqi, newElement_lqi); jclass threadInterfaceScanResultStructClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$NetworkCommissioningClusterThreadInterfaceScanResultStruct", - threadInterfaceScanResultStructClass); + err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ThreadScanResult", + threadInterfaceScanResultStructClass); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$NetworkCommissioningClusterThreadInterfaceScanResultStruct"); + ChipLogError(Zcl, "Could not find class ThreadScanResult"); return; } jmethodID threadInterfaceScanResultStructCtor = @@ -731,8 +728,7 @@ void AndroidDeviceControllerWrapper::OnScanNetworksSuccess( "Integer;[BLjava/lang/Integer;Ljava/lang/Integer;)V"); if (threadInterfaceScanResultStructCtor == nullptr) { - ChipLogError(Zcl, - "Could not find ChipStructs$NetworkCommissioningClusterThreadInterfaceScanResultStruct constructor"); + ChipLogError(Zcl, "Could not find ThreadScanResult constructor"); return; } diff --git a/src/controller/java/BUILD.gn b/src/controller/java/BUILD.gn index d6c78191e37fe0..39a8ab889d48ba 100644 --- a/src/controller/java/BUILD.gn +++ b/src/controller/java/BUILD.gn @@ -29,6 +29,8 @@ shared_library("jni") { output_extension = "dylib" } + defines = [] + # Temporary while we have circular dependencies between codegen.py and zap # generated files check_includes = false @@ -53,23 +55,13 @@ shared_library("jni") { "AttestationTrustStoreBridge.h", "BaseCHIPCluster-JNI.cpp", "CHIPAttributeTLVValueDecoder.h", - "CHIPDefaultCallbacks.cpp", - "CHIPDefaultCallbacks.h", "CHIPDeviceController-JNI.cpp", - "CHIPTLVValueDecoder-JNI.cpp", "DeviceAttestationDelegateBridge.cpp", "DeviceAttestationDelegateBridge.h", - "zap-generated/CHIPAttributeTLVValueDecoder.cpp", - "zap-generated/CHIPClustersWrite-JNI.cpp", - "zap-generated/CHIPEventTLVValueDecoder.cpp", - "zap-generated/CHIPInvokeCallbacks.cpp", - "zap-generated/CHIPInvokeCallbacks.h", - "zap-generated/CHIPReadCallbacks.cpp", ] deps = [ "${chip_root}/src/controller/data_model", - "${chip_root}/src/controller/data_model:java-jni-sources", "${chip_root}/src/credentials:default_attestation_verifier", "${chip_root}/src/inet", "${chip_root}/src/lib", @@ -77,8 +69,26 @@ shared_library("jni") { "${chip_root}/src/platform", ] + if (matter_enable_java_generated_api) { + defines += [ "USE_JAVA_TLV_ENCODE_DECODE" ] + + sources += [ + "CHIPDefaultCallbacks.cpp", + "CHIPDefaultCallbacks.h", + "CHIPTLVValueDecoder-JNI.cpp", + "zap-generated/CHIPAttributeTLVValueDecoder.cpp", + "zap-generated/CHIPClustersWrite-JNI.cpp", + "zap-generated/CHIPEventTLVValueDecoder.cpp", + "zap-generated/CHIPInvokeCallbacks.cpp", + "zap-generated/CHIPInvokeCallbacks.h", + "zap-generated/CHIPReadCallbacks.cpp", + ] + + deps += [ "${chip_root}/src/controller/data_model:java-jni-sources" ] + } + if (matter_enable_java_compilation) { - defines = [ "JAVA_MATTER_CONTROLLER_TEST" ] + defines += [ "JAVA_MATTER_CONTROLLER_TEST" ] sources += [ "${chip_root}/src/controller/ExamplePersistentStorage.cpp", @@ -313,14 +323,6 @@ android_library("java") { sources = [ "generated/java/chip/devicecontroller/ClusterIDMapping.java", - "generated/java/chip/devicecontroller/ClusterReadMapping.java", - "generated/java/chip/devicecontroller/ClusterWriteMapping.java", - "src/chip/clusterinfo/ClusterCommandCallback.java", - "src/chip/clusterinfo/ClusterInfo.java", - "src/chip/clusterinfo/CommandParameterInfo.java", - "src/chip/clusterinfo/CommandResponseInfo.java", - "src/chip/clusterinfo/DelegatedClusterCallback.java", - "src/chip/clusterinfo/InteractionInfo.java", "src/chip/devicecontroller/AttestationInfo.java", "src/chip/devicecontroller/AttestationTrustStoreDelegate.java", "src/chip/devicecontroller/CSRInfo.java", @@ -329,7 +331,6 @@ android_library("java") { "src/chip/devicecontroller/ChipDeviceController.java", "src/chip/devicecontroller/ChipDeviceControllerException.java", "src/chip/devicecontroller/ChipIdLookup.java", - "src/chip/devicecontroller/ChipTLVValueDecoder.java", "src/chip/devicecontroller/ControllerParams.java", "src/chip/devicecontroller/DeviceAttestationDelegate.java", "src/chip/devicecontroller/DiscoveredDevice.java", @@ -348,7 +349,9 @@ android_library("java") { "src/chip/devicecontroller/ReportEventCallbackJni.java", "src/chip/devicecontroller/ResubscriptionAttemptCallback.java", "src/chip/devicecontroller/SubscriptionEstablishedCallback.java", + "src/chip/devicecontroller/ThreadScanResult.java", "src/chip/devicecontroller/UnpairDeviceCallback.java", + "src/chip/devicecontroller/WiFiScanResult.java", "src/chip/devicecontroller/WriteAttributesCallback.java", "src/chip/devicecontroller/WriteAttributesCallbackJni.java", "src/chip/devicecontroller/model/AttributeState.java", @@ -361,12 +364,26 @@ android_library("java") { "src/chip/devicecontroller/model/EventState.java", "src/chip/devicecontroller/model/InvokeElement.java", "src/chip/devicecontroller/model/NodeState.java", - "zap-generated/chip/devicecontroller/ChipClusters.java", - "zap-generated/chip/devicecontroller/ChipEventStructs.java", - "zap-generated/chip/devicecontroller/ChipStructs.java", - "zap-generated/chip/devicecontroller/ClusterInfoMapping.java", ] + if (matter_enable_java_generated_api) { + sources += [ + "generated/java/chip/devicecontroller/ClusterReadMapping.java", + "generated/java/chip/devicecontroller/ClusterWriteMapping.java", + "src/chip/clusterinfo/ClusterCommandCallback.java", + "src/chip/clusterinfo/ClusterInfo.java", + "src/chip/clusterinfo/CommandParameterInfo.java", + "src/chip/clusterinfo/CommandResponseInfo.java", + "src/chip/clusterinfo/DelegatedClusterCallback.java", + "src/chip/clusterinfo/InteractionInfo.java", + "src/chip/devicecontroller/ChipTLVValueDecoder.java", + "zap-generated/chip/devicecontroller/ChipClusters.java", + "zap-generated/chip/devicecontroller/ChipEventStructs.java", + "zap-generated/chip/devicecontroller/ChipStructs.java", + "zap-generated/chip/devicecontroller/ClusterInfoMapping.java", + ] + } + if (matter_enable_java_compilation) { deps += [ "${chip_root}/third_party/java_deps:json", diff --git a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java index 916f65fb270819..33cb7a9ff3ae6e 100644 --- a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java +++ b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java @@ -389,10 +389,8 @@ public void onScanNetworksFailure(int errorCode) { public void onScanNetworksSuccess( Integer networkingStatus, Optional debugText, - Optional> - wiFiScanResults, - Optional> - threadScanResults) { + Optional> wiFiScanResults, + Optional> threadScanResults) { if (scanNetworksListener != null) { scanNetworksListener.onScanNetworksSuccess( networkingStatus, debugText, wiFiScanResults, threadScanResults); @@ -1268,10 +1266,8 @@ public interface ScanNetworksListener { void onScanNetworksSuccess( Integer networkingStatus, Optional debugText, - Optional> - wiFiScanResults, - Optional> - threadScanResults); + Optional> wiFiScanResults, + Optional> threadScanResults); } /** Interface to listen for callbacks from CHIPDeviceController. */ diff --git a/src/controller/java/src/chip/devicecontroller/ThreadScanResult.java b/src/controller/java/src/chip/devicecontroller/ThreadScanResult.java new file mode 100644 index 00000000000000..64c837bdca411d --- /dev/null +++ b/src/controller/java/src/chip/devicecontroller/ThreadScanResult.java @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2020-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. + * + */ +package chip.devicecontroller; + +import java.util.Arrays; + +public class ThreadScanResult { + public Integer panId; + public Long extendedPanId; + public String networkName; + public Integer channel; + public Integer version; + public byte[] extendedAddress; + public Integer rssi; + public Integer lqi; + + public ThreadScanResult( + Integer panId, + Long extendedPanId, + String networkName, + Integer channel, + Integer version, + byte[] extendedAddress, + Integer rssi, + Integer lqi) { + this.panId = panId; + this.extendedPanId = extendedPanId; + this.networkName = networkName; + this.channel = channel; + this.version = version; + this.extendedAddress = extendedAddress; + this.rssi = rssi; + this.lqi = lqi; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ThreadScanResult {\n"); + output.append("\tpanId: "); + output.append(panId); + output.append("\n"); + output.append("\textendedPanId: "); + output.append(extendedPanId); + output.append("\n"); + output.append("\tnetworkName: "); + output.append(networkName); + output.append("\n"); + output.append("\tchannel: "); + output.append(channel); + output.append("\n"); + output.append("\tversion: "); + output.append(version); + output.append("\n"); + output.append("\textendedAddress: "); + output.append(Arrays.toString(extendedAddress)); + output.append("\n"); + output.append("\trssi: "); + output.append(rssi); + output.append("\n"); + output.append("\tlqi: "); + output.append(lqi); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} diff --git a/src/controller/java/src/chip/devicecontroller/WiFiScanResult.java b/src/controller/java/src/chip/devicecontroller/WiFiScanResult.java new file mode 100644 index 00000000000000..bcc01e0af26874 --- /dev/null +++ b/src/controller/java/src/chip/devicecontroller/WiFiScanResult.java @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2020-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. + * + */ +package chip.devicecontroller; + +import java.util.Arrays; + +public class WiFiScanResult { + public Integer security; + public byte[] ssid; + public byte[] bssid; + public Integer channel; + public Integer wiFiBand; + public Integer rssi; + + public WiFiScanResult( + Integer security, + byte[] ssid, + byte[] bssid, + Integer channel, + Integer wiFiBand, + Integer rssi) { + this.security = security; + this.ssid = ssid; + this.bssid = bssid; + this.channel = channel; + this.wiFiBand = wiFiBand; + this.rssi = rssi; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("WiFiScanResult {\n"); + output.append("\tsecurity: "); + output.append(security); + output.append("\n"); + output.append("\tssid: "); + output.append(Arrays.toString(ssid)); + output.append("\n"); + output.append("\tbssid: "); + output.append(Arrays.toString(bssid)); + output.append("\n"); + output.append("\tchannel: "); + output.append(channel); + output.append("\n"); + output.append("\twiFiBand: "); + output.append(wiFiBand); + output.append("\n"); + output.append("\trssi: "); + output.append(rssi); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} diff --git a/src/controller/python/BUILD.gn b/src/controller/python/BUILD.gn index 375a65cf7becbc..4b84c63d5ff30d 100644 --- a/src/controller/python/BUILD.gn +++ b/src/controller/python/BUILD.gn @@ -20,6 +20,7 @@ import("$dir_pw_build/python.gni") import("${chip_root}/build/chip/tools.gni") import("${chip_root}/src/platform/python.gni") +import("${chip_root}/src/system/system.gni") import("${dir_pw_unit_test}/test.gni") if (current_os == "mac") { @@ -33,6 +34,7 @@ config("controller_wno_deprecate") { declare_args() { chip_python_version = "0.0" chip_python_package_prefix = "chip" + chip_python_supports_stack_locking = chip_system_config_locking != "none" } shared_library("ChipDeviceCtrl") { @@ -77,12 +79,19 @@ shared_library("ChipDeviceCtrl") { "chip/internal/ChipThreadWork.h", "chip/internal/CommissionerImpl.cpp", "chip/logging/LoggingRedirect.cpp", + "chip/native/ChipMainLoopWork.h", "chip/native/PyChipError.cpp", "chip/tracing/TracingSetup.cpp", "chip/utils/DeviceProxyUtils.cpp", ] defines += [ "CHIP_CONFIG_MAX_GROUPS_PER_FABRIC=50" ] defines += [ "CHIP_CONFIG_MAX_GROUP_KEYS_PER_FABRIC=50" ] + + if (chip_python_supports_stack_locking) { + sources += [ "chip/native/ChipMainLoopWork_StackLock.cpp" ] + } else { + sources += [ "chip/native/ChipMainLoopWork_WorkSchedule.cpp" ] + } } else { sources += [ "chip/server/Options.cpp", diff --git a/src/controller/python/chip/native/ChipMainLoopWork.h b/src/controller/python/chip/native/ChipMainLoopWork.h new file mode 100644 index 00000000000000..831badefd8855b --- /dev/null +++ b/src/controller/python/chip/native/ChipMainLoopWork.h @@ -0,0 +1,40 @@ +/* + * + * Copyright (c) 2023 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 + +namespace chip { +namespace MainLoopWork { + +/** + * Executes the given function in the CHIP main loop if one exists. + * + * Several implementations exist, however generally: + * + * - if already in the chip main loop (or main loop is not running), + * `f` gets executed right away + * - otherwise: + * - if chip stack locking is available, `f` is executed within the lock + * - if chip stack locking not available, this will schedule and WAIT + * for `f` to execute + */ +void ExecuteInMainLoop(std::function f); + +} // namespace MainLoopWork +} // namespace chip diff --git a/src/controller/python/chip/native/ChipMainLoopWork_StackLock.cpp b/src/controller/python/chip/native/ChipMainLoopWork_StackLock.cpp new file mode 100644 index 00000000000000..f848a3bc2c32dc --- /dev/null +++ b/src/controller/python/chip/native/ChipMainLoopWork_StackLock.cpp @@ -0,0 +1,44 @@ +/* + * + * Copyright (c) 2023 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 "ChipMainLoopWork.h" + +#include + +namespace chip { +namespace MainLoopWork { + +void ExecuteInMainLoop(std::function f) +{ + // NOTE: requires CHIP_STACK_LOCK_TRACKING_ENABLED to be available (which python builds + // generally have) to ensure chip stack locks are not deadlocking, since these + // functions do not know the actual state of the chip main loop. + // + // TODO: it may be a good assumption that python code asking for this will NOT run in + // chip main loop, however we try to be generic + if (chip::DeviceLayer::PlatformMgr().IsChipStackLockedByCurrentThread()) + { + f(); + return; + } + + chip::DeviceLayer::StackLock lock; + f(); +} + +} // namespace MainLoopWork +} // namespace chip diff --git a/src/controller/python/chip/native/ChipMainLoopWork_WorkSchedule.cpp b/src/controller/python/chip/native/ChipMainLoopWork_WorkSchedule.cpp new file mode 100644 index 00000000000000..fec65a150c9396 --- /dev/null +++ b/src/controller/python/chip/native/ChipMainLoopWork_WorkSchedule.cpp @@ -0,0 +1,75 @@ +/* + * + * Copyright (c) 2023 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 "ChipMainLoopWork.h" + +#include +#include + +namespace chip { +namespace MainLoopWork { +namespace { + +struct WorkData +{ + std::function callback; + sem_t done; + + WorkData() { sem_init(&done, 0 /* shared */, 0); } + ~WorkData() { sem_destroy(&done); } + void Post() { sem_post(&done); } + void Wait() { sem_wait(&done); } +}; + +void PerformWork(intptr_t arg) +{ + WorkData * work = reinterpret_cast(arg); + + work->callback(); + work->Post(); +} + +} // namespace + +void ExecuteInMainLoop(std::function f) +{ + + // NOTE: requires CHIP_STACK_LOCK_TRACKING_ENABLED to be available (which python builds + // generally have) to ensure chip stack locks are not deadlocking, since these + // functions do not know the actual state of the chip main loop. + // + // TODO: it may be a good assumption that python code asking for this will NOT run in + // chip main loop, however we try to be generic + if (chip::DeviceLayer::PlatformMgr().IsChipStackLockedByCurrentThread()) + { + f(); + return; + } + + // NOTE: the code below assumes that chip main loop is running. + // if it does not, this will deadlock. + // + // IsChipStackLockedByCurrentThread is expected to be aware of main loop + // not running. + WorkData workdata; + workdata.callback = f; + chip::DeviceLayer::PlatformMgr().ScheduleWork(PerformWork, reinterpret_cast(&workdata)); + workdata.Wait(); +} + +} // namespace MainLoopWork +} // namespace chip diff --git a/src/controller/python/chip/tracing/TracingSetup.cpp b/src/controller/python/chip/tracing/TracingSetup.cpp index d09a655b74c633..73e0633b3bf373 100644 --- a/src/controller/python/chip/tracing/TracingSetup.cpp +++ b/src/controller/python/chip/tracing/TracingSetup.cpp @@ -16,8 +16,8 @@ * limitations under the License. */ +#include #include -#include #include #include @@ -27,17 +27,6 @@ #include namespace { - -using chip::DeviceLayer::PlatformMgr; - -class ScopedStackLock -{ -public: - ScopedStackLock() { PlatformMgr().LockChipStack(); } - - ~ScopedStackLock() { PlatformMgr().UnlockChipStack(); } -}; - chip::Tracing::Json::JsonBackend gJsonBackend; chip::Tracing::Perfetto::FileTraceOutput gPerfettoFileOutput; @@ -47,58 +36,61 @@ chip::Tracing::Perfetto::PerfettoBackend gPerfettoBackend; extern "C" void pychip_tracing_start_json_log(const char * file_name) { - - ScopedStackLock lock; - - gJsonBackend.CloseFile(); // just in case, ensure no file output - chip::Tracing::Register(gJsonBackend); + chip::MainLoopWork::ExecuteInMainLoop([] { + gJsonBackend.CloseFile(); // just in case, ensure no file output + chip::Tracing::Register(gJsonBackend); + }); } extern "C" PyChipError pychip_tracing_start_json_file(const char * file_name) { - ScopedStackLock lock; - - CHIP_ERROR err = gJsonBackend.OpenFile(file_name); - if (err != CHIP_NO_ERROR) - { - return ToPyChipError(err); - } - chip::Tracing::Register(gJsonBackend); - return ToPyChipError(CHIP_NO_ERROR); + CHIP_ERROR err = CHIP_NO_ERROR; + + chip::MainLoopWork::ExecuteInMainLoop([&err, file_name] { + err = gJsonBackend.OpenFile(file_name); + if (err != CHIP_NO_ERROR) + { + return; + } + chip::Tracing::Register(gJsonBackend); + }); + + return ToPyChipError(err); } extern "C" void pychip_tracing_start_perfetto_system() { - ScopedStackLock lock; - - chip::Tracing::Perfetto::Initialize(perfetto::kSystemBackend); - chip::Tracing::Perfetto::RegisterEventTrackingStorage(); - chip::Tracing::Register(gPerfettoBackend); + chip::MainLoopWork::ExecuteInMainLoop([] { + chip::Tracing::Perfetto::Initialize(perfetto::kSystemBackend); + chip::Tracing::Perfetto::RegisterEventTrackingStorage(); + chip::Tracing::Register(gPerfettoBackend); + }); } extern "C" PyChipError pychip_tracing_start_perfetto_file(const char * file_name) { - ScopedStackLock lock; - - chip::Tracing::Perfetto::Initialize(perfetto::kInProcessBackend); - chip::Tracing::Perfetto::RegisterEventTrackingStorage(); - - CHIP_ERROR err = gPerfettoFileOutput.Open(file_name); - if (err != CHIP_NO_ERROR) - { - return ToPyChipError(err); - } - chip::Tracing::Register(gPerfettoBackend); - - return ToPyChipError(CHIP_NO_ERROR); + CHIP_ERROR err = CHIP_NO_ERROR; + chip::MainLoopWork::ExecuteInMainLoop([&err, file_name] { + chip::Tracing::Perfetto::Initialize(perfetto::kInProcessBackend); + chip::Tracing::Perfetto::RegisterEventTrackingStorage(); + + err = gPerfettoFileOutput.Open(file_name); + if (err != CHIP_NO_ERROR) + { + return; + } + chip::Tracing::Register(gPerfettoBackend); + }); + + return ToPyChipError(err); } extern "C" void pychip_tracing_stop() { - ScopedStackLock lock; - - chip::Tracing::Perfetto::FlushEventTrackingStorage(); - gPerfettoFileOutput.Close(); - chip::Tracing::Unregister(gPerfettoBackend); - chip::Tracing::Unregister(gJsonBackend); + chip::MainLoopWork::ExecuteInMainLoop([] { + chip::Tracing::Perfetto::FlushEventTrackingStorage(); + gPerfettoFileOutput.Close(); + chip::Tracing::Unregister(gPerfettoBackend); + chip::Tracing::Unregister(gJsonBackend); + }); } diff --git a/src/credentials/FabricTable.cpp b/src/credentials/FabricTable.cpp index 6d9f4781fff576..eeb5932f01a48a 100644 --- a/src/credentials/FabricTable.cpp +++ b/src/credentials/FabricTable.cpp @@ -2080,4 +2080,19 @@ CHIP_ERROR FabricTable::GetFabricLabel(FabricIndex fabricIndex, CharSpan & outFa return CHIP_NO_ERROR; } +CHIP_ERROR FabricTable::PeekFabricIndexForNextAddition(FabricIndex & outIndex) +{ + EnsureNextAvailableFabricIndexUpdated(); + if (!mNextAvailableFabricIndex.HasValue()) + { + return CHIP_ERROR_NO_MEMORY; + } + + FabricIndex index = mNextAvailableFabricIndex.Value(); + VerifyOrReturnError(IsValidFabricIndex(index), CHIP_ERROR_INVALID_FABRIC_INDEX); + + outIndex = index; + return CHIP_NO_ERROR; +} + } // namespace chip diff --git a/src/credentials/FabricTable.h b/src/credentials/FabricTable.h index 82a82521d58be2..60cd54df220041 100644 --- a/src/credentials/FabricTable.h +++ b/src/credentials/FabricTable.h @@ -971,6 +971,14 @@ class DLL_EXPORT FabricTable #endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST } + /** + * Get the fabric index that will be used for the next fabric that will be + * added. Returns error if no more fabrics can be added, otherwise writes + * the fabric index that will be used for the next addition into the + * outparam. + */ + CHIP_ERROR PeekFabricIndexForNextAddition(FabricIndex & outIndex); + private: enum class StateFlags : uint16_t { diff --git a/src/credentials/tests/TestFabricTable.cpp b/src/credentials/tests/TestFabricTable.cpp index c6e7998f0c1788..83866b3c8bf78b 100644 --- a/src/credentials/tests/TestFabricTable.cpp +++ b/src/credentials/tests/TestFabricTable.cpp @@ -523,6 +523,12 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 0); + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 1); + } + size_t numFabricsIterated = 0; size_t numStorageKeysAtStart = storage.GetNumKeys(); @@ -588,6 +594,13 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) // No storage yet NL_TEST_ASSERT(inSuite, storage.GetNumKeys() == numStorageKeysAtStart); + // Next fabric index has not been updated yet. + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 1); + } + // Validate iterator sees pending { numFabricsIterated = 0; @@ -612,6 +625,13 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, storage.GetNumKeys() == (numStorageKeysAtStart + 4)); // 2 opcerts + fabric metadata + index + // Next fabric index has been updated. + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 2); + } + // Validate contents const auto * fabricInfo = fabricTable.FindFabricWithIndex(1); NL_TEST_ASSERT(inSuite, fabricInfo != nullptr); @@ -679,6 +699,14 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) ByteSpan noc = fabric44CertAuthority.GetNoc(); NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 1); + + // Next fabric index should still be the same as before. + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 2); + } + NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AddNewPendingTrustedRootCert(rcac)); FabricIndex newFabricIndex = kUndefinedFabricIndex; @@ -689,6 +717,12 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, newFabricIndex == 2); // No storage yet NL_TEST_ASSERT(inSuite, storage.GetNumKeys() == numStorageAfterFirstAdd); + // Next fabric index has not been updated yet. + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 2); + } // Commit, now storage should have keys NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.CommitPendingFabricData()); @@ -697,6 +731,13 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT_EQUALS(inSuite, storage.GetNumKeys(), (numStorageAfterFirstAdd + 5)); // 3 opcerts + fabric metadata + 1 operational key + // Next fabric index has been updated. + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 3); + } + // Validate contents const auto * fabricInfo = fabricTable.FindFabricWithIndex(2); NL_TEST_ASSERT(inSuite, fabricInfo != nullptr); @@ -879,6 +920,13 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, saw1 == true); NL_TEST_ASSERT(inSuite, saw2 == true); } + + // Next fabric index has stayed the same. + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 3); + } } size_t numStorageAfterUpdate = storage.GetNumKeys(); @@ -904,6 +952,13 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, fabricInfo->GetFabricLabel().data_equal(CharSpan{ "roboto", strlen("roboto") })); } } + + // Next fabric index has stayed the same. + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 3); + } } // Sequence 5: Remove FabricIndex 1 (FabricId 11, NodeId 55), make sure FabricIndex 2 (FabricId 44, NodeId 1000) still exists @@ -917,6 +972,13 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT_EQUALS(inSuite, storage.GetNumKeys(), (numStorageAfterUpdate - 3)); // Deleted NOC, RCAC, Metadata } + // Next fabric index has stayed the same. + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 3); + } + // Validate contents of Fabric Index 2 is still OK const auto * fabricInfo = fabricTable.FindFabricWithIndex(2); NL_TEST_ASSERT(inSuite, fabricInfo != nullptr); @@ -1374,6 +1436,13 @@ void TestPersistence(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, saw1 == true); NL_TEST_ASSERT(inSuite, saw2 == true); } + + // Next fabric index should now be 3, since we added 1 and 2 above. + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 3); + } } // Global: Last known good time + fabric index = 2 @@ -1501,6 +1570,13 @@ void TestPersistence(nlTestSuite * inSuite, void * inContext) CHIP_ERROR_INVALID_SIGNATURE); } } + + // Validate that next fabric index is still 3; + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 3); + } } } @@ -1544,6 +1620,12 @@ void TestAddNocFailSafe(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AddNewPendingTrustedRootCert(rcac)); FabricIndex newFabricIndex = kUndefinedFabricIndex; + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 1); + } + NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 0); NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AddNewPendingFabricWithOperationalKeystore(noc, ByteSpan{}, kVendorId, &newFabricIndex)); @@ -1596,6 +1678,13 @@ void TestAddNocFailSafe(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, numFabricsIterated == 0); NL_TEST_ASSERT(inSuite, saw1 == false); } + + // Validate next fabric index has not changed. + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 1); + } } size_t numStorageAfterRevert = storage.GetNumKeys(); diff --git a/src/crypto/CHIPCryptoPAL.h b/src/crypto/CHIPCryptoPAL.h index 88abc189b5b06f..65511668b1d5fd 100644 --- a/src/crypto/CHIPCryptoPAL.h +++ b/src/crypto/CHIPCryptoPAL.h @@ -803,7 +803,7 @@ CHIP_ERROR Hash_SHA1(const uint8_t * data, size_t data_length, uint8_t * out_buf * All implementations must check for std::is_trivially_copyable. **/ -struct alignas(size_t) HashSHA256OpaqueContext +struct alignas(CHIP_CONFIG_SHA256_CONTEXT_ALIGN) HashSHA256OpaqueContext { uint8_t mOpaque[kMAX_Hash_SHA256_Context_Size]; }; diff --git a/src/darwin/Framework/CHIP/MTRConversion.h b/src/darwin/Framework/CHIP/MTRConversion.h index 53225a690e2070..5932ff88bf597b 100644 --- a/src/darwin/Framework/CHIP/MTRConversion.h +++ b/src/darwin/Framework/CHIP/MTRConversion.h @@ -19,6 +19,8 @@ #import +#include +#include #include #include #include @@ -38,4 +40,10 @@ inline NSDate * ChipEpochSecondsAsDate(uint32_t chipEpochSeconds) return [NSDate dateWithTimeIntervalSince1970:(chip::kChipEpochSecondsSinceUnixEpoch + (NSTimeInterval) chipEpochSeconds)]; } +/** + * Utilities for converting between NSSet and chip::CATValues. + */ +CHIP_ERROR SetToCATValues(NSSet * catSet, chip::CATValues & values); +NSSet * CATValuesToSet(const chip::CATValues & values); + NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRConversion.mm b/src/darwin/Framework/CHIP/MTRConversion.mm new file mode 100644 index 00000000000000..77882742dea3e7 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRConversion.mm @@ -0,0 +1,61 @@ +/** + * Copyright (c) 2023 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 "MTRConversion.h" +#import "MTRLogging_Internal.h" + +#include + +CHIP_ERROR SetToCATValues(NSSet * catSet, chip::CATValues & values) +{ + values = chip::kUndefinedCATs; + + unsigned long long tagCount = catSet.count; + if (tagCount > chip::kMaxSubjectCATAttributeCount) { + MTR_LOG_ERROR("%llu CASE Authenticated Tags cannot be represented in a certificate.", tagCount); + return CHIP_ERROR_INVALID_ARGUMENT; + } + + size_t tagIndex = 0; + for (NSNumber * boxedTag in [catSet.allObjects sortedArrayUsingSelector:@selector(compare:)]) { + auto unboxedTag = boxedTag.unsignedLongLongValue; + if (!chip::CanCastTo(unboxedTag)) { + MTR_LOG_ERROR("0x%llx is not a valid CASE Authenticated Tag value.", unboxedTag); + return CHIP_ERROR_INVALID_ARGUMENT; + } + + auto tag = static_cast(unboxedTag); + if (!chip::IsValidCASEAuthTag(tag)) { + MTR_LOG_ERROR("0x%" PRIx32 " is not a valid CASE Authenticated Tag value.", tag); + return CHIP_ERROR_INVALID_ARGUMENT; + } + + values.values[tagIndex++] = tag; + } + + return CHIP_NO_ERROR; +} + +NSSet * CATValuesToSet(const chip::CATValues & values) +{ + auto * catSet = [[NSMutableSet alloc] initWithCapacity:values.GetNumTagsPresent()]; + for (auto & value : values.values) { + if (value != chip::kUndefinedCAT) { + [catSet addObject:@(value)]; + } + } + return [NSSet setWithSet:catSet]; +} diff --git a/src/darwin/Framework/CHIP/MTRDefines.h b/src/darwin/Framework/CHIP/MTRDefines.h index 323066b4b47fe1..dab6250019e325 100644 --- a/src/darwin/Framework/CHIP/MTRDefines.h +++ b/src/darwin/Framework/CHIP/MTRDefines.h @@ -53,7 +53,7 @@ #define MTR_NEWLY_AVAILABLE #endif -#if MTR_ENABLE_PROVISIONAL +#if defined(MTR_ENABLE_PROVISIONAL) && MTR_ENABLE_PROVISIONAL #define MTR_PROVISIONALLY_AVAILABLE MTR_NEWLY_AVAILABLE #else #define MTR_PROVISIONALLY_AVAILABLE NS_UNAVAILABLE MTR_HIDDEN diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 8b34769b09ecea..cf4ab4c068d465 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -22,6 +22,7 @@ #import "MTRCommissionableBrowser.h" #import "MTRCommissionableBrowserResult_Internal.h" #import "MTRCommissioningParameters.h" +#import "MTRConversion.h" #import "MTRDeviceControllerDelegateBridge.h" #import "MTRDeviceControllerFactory_Internal.h" #import "MTRDeviceControllerStartupParams.h" @@ -312,27 +313,11 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams chip::CATValues cats = chip::kUndefinedCATs; if (startupParams.caseAuthenticatedTags != nil) { - unsigned long long tagCount = startupParams.caseAuthenticatedTags.count; - if (tagCount > chip::kMaxSubjectCATAttributeCount) { - MTR_LOG_ERROR("%llu CASE Authenticated Tags cannot be represented in a certificate.", tagCount); + errorCode = SetToCATValues(startupParams.caseAuthenticatedTags, cats); + if (errorCode != CHIP_NO_ERROR) { + // SetToCATValues already handles logging. return; } - - size_t tagIndex = 0; - for (NSNumber * boxedTag in startupParams.caseAuthenticatedTags) { - if (!chip::CanCastTo(boxedTag.unsignedLongLongValue)) { - MTR_LOG_ERROR("0x%llx is not a valid CASE Authenticated Tag value.", boxedTag.unsignedLongLongValue); - return; - } - - auto tag = static_cast(boxedTag.unsignedLongLongValue); - if (!chip::IsValidCASEAuthTag(tag)) { - MTR_LOG_ERROR("0x%" PRIx32 " is not a valid CASE Authenticated Tag value.", tag); - return; - } - - cats.values[tagIndex++] = tag; - } } if (commissionerParams.operationalKeypair != nullptr) { diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm index 72cf8737f8aa7c..64e4af1ba29fc9 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm @@ -560,8 +560,9 @@ - (void)stopControllerFactory * the right error value in that situation. */ - (MTRDeviceController * _Nullable)_startDeviceController:(MTRDeviceControllerStartupParams *)startupParams - fabricChecker:(MTRDeviceControllerStartupParamsInternal * (^)( - FabricTable * fabricTable, CHIP_ERROR & fabricError))fabricChecker + fabricChecker:(MTRDeviceControllerStartupParamsInternal * (^)(FabricTable * fabricTable, + MTRDeviceController * controller, + CHIP_ERROR & fabricError))fabricChecker error:(NSError * __autoreleasing *)error { [self _assertCurrentQueueIsNotMatterQueue]; @@ -590,7 +591,7 @@ - (MTRDeviceController * _Nullable)_startDeviceController:(MTRDeviceControllerSt FabricTable * fabricTable = &fabricTableInstance; dispatch_sync(_chipWorkQueue, ^{ - params = fabricChecker(fabricTable, fabricError); + params = fabricChecker(fabricTable, controller, fabricError); }); if (params == nil) { @@ -624,56 +625,56 @@ - (MTRDeviceController * _Nullable)createControllerOnExistingFabric:(MTRDeviceCo { [self _assertCurrentQueueIsNotMatterQueue]; - return [self - _startDeviceController:startupParams - fabricChecker:^MTRDeviceControllerStartupParamsInternal *(FabricTable * fabricTable, CHIP_ERROR & fabricError) { - const FabricInfo * fabric = nullptr; - BOOL ok = [self findMatchingFabric:*fabricTable params:startupParams fabric:&fabric]; - if (!ok) { - MTR_LOG_ERROR("Can't start on existing fabric: fabric matching failed"); - fabricError = CHIP_ERROR_INTERNAL; - return nil; - } - - if (fabric == nullptr) { - MTR_LOG_ERROR("Can't start on existing fabric: fabric not found"); - fabricError = CHIP_ERROR_NOT_FOUND; - return nil; - } - - os_unfair_lock_lock(&self->_controllersLock); - NSArray * controllersCopy = [self->_controllers copy]; - os_unfair_lock_unlock(&self->_controllersLock); - - for (MTRDeviceController * existing in controllersCopy) { - BOOL isRunning = YES; // assume the worst - if ([existing isRunningOnFabric:fabricTable fabricIndex:fabric->GetFabricIndex() isRunning:&isRunning] - != CHIP_NO_ERROR) { - MTR_LOG_ERROR("Can't tell what fabric a controller is running on. Not safe to start."); - fabricError = CHIP_ERROR_INTERNAL; - return nil; - } - - if (isRunning) { - MTR_LOG_ERROR("Can't start on existing fabric: another controller is running on it"); - fabricError = CHIP_ERROR_INCORRECT_STATE; - return nil; - } - } - - auto * params = - [[MTRDeviceControllerStartupParamsInternal alloc] initForExistingFabric:fabricTable - fabricIndex:fabric->GetFabricIndex() - keystore:self->_keystore - advertiseOperational:self.advertiseOperational - params:startupParams]; - if (params == nil) { - fabricError = CHIP_ERROR_NO_MEMORY; - } - - return params; - } - error:error]; + return [self _startDeviceController:startupParams + fabricChecker:^MTRDeviceControllerStartupParamsInternal *( + FabricTable * fabricTable, MTRDeviceController * controller, CHIP_ERROR & fabricError) { + const FabricInfo * fabric = nullptr; + BOOL ok = [self findMatchingFabric:*fabricTable params:startupParams fabric:&fabric]; + if (!ok) { + MTR_LOG_ERROR("Can't start on existing fabric: fabric matching failed"); + fabricError = CHIP_ERROR_INTERNAL; + return nil; + } + + if (fabric == nullptr) { + MTR_LOG_ERROR("Can't start on existing fabric: fabric not found"); + fabricError = CHIP_ERROR_NOT_FOUND; + return nil; + } + + auto * controllersCopy = [self getRunningControllers]; + + for (MTRDeviceController * existing in controllersCopy) { + BOOL isRunning = YES; // assume the worst + if ([existing isRunningOnFabric:fabricTable + fabricIndex:fabric->GetFabricIndex() + isRunning:&isRunning] + != CHIP_NO_ERROR) { + MTR_LOG_ERROR("Can't tell what fabric a controller is running on. Not safe to start."); + fabricError = CHIP_ERROR_INTERNAL; + return nil; + } + + if (isRunning) { + MTR_LOG_ERROR("Can't start on existing fabric: another controller is running on it"); + fabricError = CHIP_ERROR_INCORRECT_STATE; + return nil; + } + } + + auto * params = + [[MTRDeviceControllerStartupParamsInternal alloc] initForExistingFabric:fabricTable + fabricIndex:fabric->GetFabricIndex() + keystore:self->_keystore + advertiseOperational:self.advertiseOperational + params:startupParams]; + if (params == nil) { + fabricError = CHIP_ERROR_NO_MEMORY; + } + + return params; + } + error:error]; } - (MTRDeviceController * _Nullable)createControllerOnNewFabric:(MTRDeviceControllerStartupParams *)startupParams @@ -697,33 +698,34 @@ - (MTRDeviceController * _Nullable)createControllerOnNewFabric:(MTRDeviceControl return nil; } - return [self - _startDeviceController:startupParams - fabricChecker:^MTRDeviceControllerStartupParamsInternal *(FabricTable * fabricTable, CHIP_ERROR & fabricError) { - const FabricInfo * fabric = nullptr; - BOOL ok = [self findMatchingFabric:*fabricTable params:startupParams fabric:&fabric]; - if (!ok) { - MTR_LOG_ERROR("Can't start on new fabric: fabric matching failed"); - fabricError = CHIP_ERROR_INTERNAL; - return nil; - } - - if (fabric != nullptr) { - MTR_LOG_ERROR("Can't start on new fabric that matches existing fabric"); - fabricError = CHIP_ERROR_INCORRECT_STATE; - return nil; - } - - auto * params = [[MTRDeviceControllerStartupParamsInternal alloc] initForNewFabric:fabricTable - keystore:self->_keystore - advertiseOperational:self.advertiseOperational - params:startupParams]; - if (params == nil) { - fabricError = CHIP_ERROR_NO_MEMORY; - } - return params; - } - error:error]; + return [self _startDeviceController:startupParams + fabricChecker:^MTRDeviceControllerStartupParamsInternal *( + FabricTable * fabricTable, MTRDeviceController * controller, CHIP_ERROR & fabricError) { + const FabricInfo * fabric = nullptr; + BOOL ok = [self findMatchingFabric:*fabricTable params:startupParams fabric:&fabric]; + if (!ok) { + MTR_LOG_ERROR("Can't start on new fabric: fabric matching failed"); + fabricError = CHIP_ERROR_INTERNAL; + return nil; + } + + if (fabric != nullptr) { + MTR_LOG_ERROR("Can't start on new fabric that matches existing fabric"); + fabricError = CHIP_ERROR_INCORRECT_STATE; + return nil; + } + + auto * params = + [[MTRDeviceControllerStartupParamsInternal alloc] initForNewFabric:fabricTable + keystore:self->_keystore + advertiseOperational:self.advertiseOperational + params:startupParams]; + if (params == nil) { + fabricError = CHIP_ERROR_NO_MEMORY; + } + return params; + } + error:error]; } - (MTRDeviceController * _Nullable)createController @@ -880,13 +882,19 @@ - (void)controllerShuttingDown:(MTRDeviceController *)controller [controller deinitFromFactory]; } -- (nullable MTRDeviceController *)runningControllerForFabricIndex:(chip::FabricIndex)fabricIndex +- (NSArray *)getRunningControllers { - assertChipStackLockedByCurrentThread(); - os_unfair_lock_lock(&_controllersLock); NSArray * controllersCopy = [_controllers copy]; os_unfair_lock_unlock(&_controllersLock); + return controllersCopy; +} + +- (nullable MTRDeviceController *)runningControllerForFabricIndex:(chip::FabricIndex)fabricIndex +{ + assertChipStackLockedByCurrentThread(); + + auto * controllersCopy = [self getRunningControllers]; for (MTRDeviceController * existing in controllersCopy) { if ([existing fabricIndex] == fabricIndex) { @@ -901,9 +909,7 @@ - (void)operationalInstanceAdded:(chip::PeerId &)operationalID { assertChipStackLockedByCurrentThread(); - os_unfair_lock_lock(&_controllersLock); - NSArray * controllersCopy = [_controllers copy]; - os_unfair_lock_unlock(&_controllersLock); + auto * controllersCopy = [self getRunningControllers]; for (MTRDeviceController * controller in controllersCopy) { auto * compressedFabricId = controller.compressedFabricID; diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h index 9903eaa77e2cd2..dc0b968b427782 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h @@ -42,6 +42,12 @@ NS_ASSUME_NONNULL_BEGIN - (void)controllerShuttingDown:(MTRDeviceController *)controller; +/** + * Get the list of running controllers. This will include controllers that are + * in the middle of starting up or shutting down. + */ +- (NSArray *)getRunningControllers; + /** * Find a running controller, if any, for the given fabric index. */ diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.mm index 844c7d26e7c63a..674618a5eb9987 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.mm @@ -179,7 +179,7 @@ - (void)fetchControllerIdWithQueue:(dispatch_queue_t)queue completion:(MTRFetchC dispatch_async(_workQueue, ^{ dispatch_group_t group = dispatch_group_create(); - if (!self.controllerID) { + if (!self.controllerXPCID) { dispatch_group_enter(group); [self.xpcConnection getProxyHandleWithCompletion:^( dispatch_queue_t _Nonnull proxyQueue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { @@ -188,7 +188,7 @@ - (void)fetchControllerIdWithQueue:(dispatch_queue_t)queue completion:(MTRFetchC if (error) { MTR_LOG_ERROR("Failed to fetch any shared remote controller"); } else { - self.controllerID = controller; + self.controllerXPCID = controller; handleRetainer = handle; } dispatch_group_leave(group); @@ -200,8 +200,8 @@ - (void)fetchControllerIdWithQueue:(dispatch_queue_t)queue completion:(MTRFetchC }]; } dispatch_group_notify(group, queue, ^{ - if (self.controllerID) { - completion(self.controllerID, handleRetainer, nil); + if (self.controllerXPCID) { + completion(self.controllerXPCID, handleRetainer, nil); } else { completion(nil, nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); } @@ -234,7 +234,7 @@ - (instancetype)initWithControllerID:(id)controllerID workQueue:(dispatch_queue_t)queue xpcConnection:(MTRDeviceControllerXPCConnection *)xpcConnection { - _controllerID = controllerID; + _controllerXPCID = controllerID; _workQueue = queue; _xpcConnection = xpcConnection; return self; diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC_Internal.h index ccbc2f29168450..b4d498b29295c0 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC_Internal.h @@ -25,7 +25,7 @@ typedef void (^MTRFetchControllerIDCompletion)( @interface MTRDeviceControllerOverXPC () -@property (nonatomic, readwrite, strong) id _Nullable controllerID; +@property (nonatomic, readwrite, strong) id _Nullable controllerXPCID; @property (nonatomic, readonly, strong) dispatch_queue_t workQueue; @property (nonatomic, readonly, strong) MTRDeviceControllerXPCConnection * xpcConnection; diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm index 771995bf01bc66..ca92c63bf2171b 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm @@ -16,6 +16,7 @@ #import "MTRDeviceControllerStartupParams.h" #import "MTRCertificates.h" +#import "MTRConversion.h" #import "MTRDeviceControllerStartupParams_Internal.h" #import "MTRLogging_Internal.h" #import "MTRP256KeypairBridge.h" @@ -302,13 +303,7 @@ - (instancetype)initForExistingFabric:(FabricTable *)fabricTable auto tagCount = cats.GetNumTagsPresent(); if (tagCount > 0) { - auto * catSet = [[NSMutableSet alloc] initWithCapacity:tagCount]; - for (auto & value : cats.values) { - if (value != kUndefinedCAT) { - [catSet addObject:@(value)]; - } - } - self.caseAuthenticatedTags = [NSSet setWithSet:catSet]; + self.caseAuthenticatedTags = CATValuesToSet(cats); } else { self.caseAuthenticatedTags = nil; } diff --git a/src/darwin/Framework/CHIP/MTRDeviceOverXPC.mm b/src/darwin/Framework/CHIP/MTRDeviceOverXPC.mm index cdc2dacb20c37c..98a217eb77e2d8 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceOverXPC.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceOverXPC.mm @@ -46,7 +46,7 @@ - (instancetype)initWithControllerOverXPC:(MTRDeviceControllerOverXPC *)controll deviceID:(NSNumber *)deviceID xpcConnection:(MTRDeviceControllerXPCConnection *)xpcConnection { - _controllerID = controllerOverXPC.controllerID; + _controllerID = controllerOverXPC.controllerXPCID; _controller = controllerOverXPC; _nodeID = deviceID; _xpcConnection = xpcConnection; diff --git a/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm b/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm index 7e5282eca51a52..159e772838258c 100644 --- a/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm +++ b/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm @@ -22,6 +22,7 @@ #import #import "MTRCertificates.h" +#import "MTRConversion.h" #import "MTRDeviceController_Internal.h" #import "MTRLogging_Internal.h" #import "NSDataSpanConversion.h" @@ -469,10 +470,7 @@ uint64_t GetIssuerId(NSNumber * _Nullable providedIssuerId) CATValues cats; if (caseAuthenticatedTags != nil) { - size_t idx = 0; - for (NSNumber * cat in [caseAuthenticatedTags.allObjects sortedArrayUsingSelector:@selector(compare:)]) { - cats.values[idx++] = [cat unsignedIntValue]; - } + ReturnErrorOnFailure(SetToCATValues(caseAuthenticatedTags, cats)); } uint8_t nocBuffer[Controller::kMaxCHIPDERCertLength]; diff --git a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestKeys.h b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestKeys.h index 8741eb584e3572..9afe75266d1eed 100644 --- a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestKeys.h +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestKeys.h @@ -25,6 +25,9 @@ NS_ASSUME_NONNULL_BEGIN @property (readonly, nonatomic) NSData * publicKeyData; +// Count of how many times this keypair has been used to signMessageECDSA_DER. +@property (readonly, nonatomic, assign) unsigned signatureCount; + - (instancetype)init; @end diff --git a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestKeys.m b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestKeys.m index 2d073f64d11fb4..23b602e2e7208c 100644 --- a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestKeys.m +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestKeys.m @@ -69,11 +69,15 @@ - (instancetype)init } _publicKey = SecKeyCopyPublicKey(_privateKey); + _signatureCount = 0; + return self; } - (NSData *)signMessageECDSA_DER:(NSData *)message { + ++_signatureCount; + CFErrorRef error = NULL; CFDataRef outData = SecKeyCreateSignature(_privateKey, kSecKeyAlgorithmECDSASignatureMessageX962SHA256, (__bridge CFDataRef) message, &error); diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index fea8bd9966ac2a..93d491bf23ac1f 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -154,6 +154,7 @@ 51431AF927D2973E008A7943 /* MTRIMDispatch.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51431AF827D2973E008A7943 /* MTRIMDispatch.mm */; }; 51431AFB27D29CA4008A7943 /* ota-provider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51431AFA27D29CA4008A7943 /* ota-provider.cpp */; }; 5143851E2A65885500EDC8E6 /* MTRSwiftPairingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5143851D2A65885500EDC8E6 /* MTRSwiftPairingTests.swift */; }; + 51565CAE2A79D42100469F18 /* MTRConversion.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51565CAD2A79D42100469F18 /* MTRConversion.mm */; }; 515C1C6F284F9FFB00A48F0C /* MTRFramework.mm in Sources */ = {isa = PBXBuildFile; fileRef = 515C1C6D284F9FFB00A48F0C /* MTRFramework.mm */; }; 515C1C70284F9FFB00A48F0C /* MTRFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 515C1C6E284F9FFB00A48F0C /* MTRFramework.h */; }; 51669AF02913204400F4AA36 /* MTRBackwardsCompatTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 51669AEF2913204400F4AA36 /* MTRBackwardsCompatTests.m */; }; @@ -458,6 +459,7 @@ 51431AFA27D29CA4008A7943 /* ota-provider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "ota-provider.cpp"; path = "clusters/ota-provider/ota-provider.cpp"; sourceTree = ""; }; 5143851C2A65885400EDC8E6 /* MatterTests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MatterTests-Bridging-Header.h"; sourceTree = ""; }; 5143851D2A65885500EDC8E6 /* MTRSwiftPairingTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MTRSwiftPairingTests.swift; sourceTree = ""; }; + 51565CAD2A79D42100469F18 /* MTRConversion.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRConversion.mm; sourceTree = ""; }; 515C1C6D284F9FFB00A48F0C /* MTRFramework.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRFramework.mm; sourceTree = ""; }; 515C1C6E284F9FFB00A48F0C /* MTRFramework.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRFramework.h; sourceTree = ""; }; 51669AEF2913204400F4AA36 /* MTRBackwardsCompatTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRBackwardsCompatTests.m; sourceTree = ""; }; @@ -1025,6 +1027,7 @@ 51E030FE27EA20D20083DC9C /* MTRControllerAccessControl.h */, 51E030FF27EA20D20083DC9C /* MTRControllerAccessControl.mm */, 3DFCB32B29678C9500332B35 /* MTRConversion.h */, + 51565CAD2A79D42100469F18 /* MTRConversion.mm */, 3CF134A6289D8AD90017A19E /* MTRCSRInfo.h */, 3CF134A8289D8D800017A19E /* MTRCSRInfo.mm */, 3DECCB732934C21B00585AEC /* MTRDefines.h */, @@ -1500,6 +1503,7 @@ 1ED276E226C5812A00547A89 /* MTRCluster.mm in Sources */, B2E0D7B3245B0B5C003C5B48 /* MTRError.mm in Sources */, 51E51FC1282AD37A00FC978D /* MTRDeviceControllerStartupParams.mm in Sources */, + 51565CAE2A79D42100469F18 /* MTRConversion.mm in Sources */, 1ED276E026C57CF000547A89 /* MTRCallbackBridge.mm in Sources */, 517BF3F1282B62B800A8B7DB /* MTRCertificates.mm in Sources */, 5A6FEC9627B5983000F25F42 /* MTRDeviceControllerXPCConnection.mm in Sources */, diff --git a/src/darwin/Framework/chip_xcode_build_connector.sh b/src/darwin/Framework/chip_xcode_build_connector.sh index 888ae55c786e59..2127313659614c 100755 --- a/src/darwin/Framework/chip_xcode_build_connector.sh +++ b/src/darwin/Framework/chip_xcode_build_connector.sh @@ -96,6 +96,7 @@ declare -a args=( 'chip_build_tools=false' 'chip_build_tests=false' 'chip_enable_wifi=false' + 'chip_enable_python_modules=false' 'chip_log_message_max_size=4096' # might as well allow nice long log messages 'chip_disable_platform_kvs=true' 'enable_fuzz_test_targets=false' diff --git a/src/include/platform/CHIPDeviceEvent.h b/src/include/platform/CHIPDeviceEvent.h index 47f32fc1346d39..47573ba348fd78 100644 --- a/src/include/platform/CHIPDeviceEvent.h +++ b/src/include/platform/CHIPDeviceEvent.h @@ -274,6 +274,16 @@ enum PublicEventTypes */ kChipMsgRxEventHandled, + /** + * This event is used to sync the ICD with any Reliable Message exchange + * expecting an ack. The ICD shall stay in active Mode + * until the Reliable Message exchange post this event again + * informing the ICD that it is no longer awaiting the ack. + * + * This event contains an AckSync structure. + */ + kICDMsgAckSyncEvent, + /** * An application event occured that should wake up the system/device */ @@ -580,6 +590,15 @@ struct ChipDeviceEvent final bool wasReceived; bool clearsExpectedResponse; } RxEventContext; + + struct + { + /* + * Set to true when a Reliable Message Context is awaiting for a ack to a message sent + * Set to false when the Reliable Message Context is no longer awaiting for a ack + */ + bool awaitingAck; + } AckSync; }; void Clear() { memset(this, 0, sizeof(*this)); } diff --git a/src/lib/core/CHIPConfig.h b/src/lib/core/CHIPConfig.h index d1e6dc45cd8c7b..2aba0915a2d52d 100644 --- a/src/lib/core/CHIPConfig.h +++ b/src/lib/core/CHIPConfig.h @@ -185,6 +185,15 @@ #define CHIP_CONFIG_SHA256_CONTEXT_SIZE ((sizeof(unsigned int) * (8 + 2 + 16 + 2)) + sizeof(uint64_t)) #endif // CHIP_CONFIG_SHA256_CONTEXT_SIZE +/** + * @def CHIP_CONFIG_SHA256_CONTEXT_ALIGN + * + * @brief The alignment of SHA256 context buffer. + */ +#ifndef CHIP_CONFIG_SHA256_CONTEXT_ALIGN +#define CHIP_CONFIG_SHA256_CONTEXT_ALIGN size_t +#endif // CHIP_CONFIG_SHA256_CONTEXT_ALIGN + /** * @def CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS * @@ -1470,7 +1479,7 @@ extern const char CHIP_NON_PRODUCTION_MARKER[]; * @brief Default value for the ICD Management cluster IdleModeInterval attribute, in milliseconds */ #ifndef CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL -#define CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL 500 +#define CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL 2000 #endif /** diff --git a/src/lib/shell/MainLoopSilabs.cpp b/src/lib/shell/MainLoopSilabs.cpp index 2b755119fd8cd5..9cb5dfed0bd586 100644 --- a/src/lib/shell/MainLoopSilabs.cpp +++ b/src/lib/shell/MainLoopSilabs.cpp @@ -32,15 +32,19 @@ using chip::Shell::streamer_get; namespace { -constexpr const char kShellPrompt[] = "matterCli > "; +constexpr const char kShellPrompt[] = "matterCli> "; + +// To track carriage returns of Windows return cases of '\r\n' +bool haveCR = false; -// max > 1 void ReadLine(char * buffer, size_t max) { size_t line_sz = 0; + size_t read = 0; + bool done = false; // Read in characters until we get a line ending or EOT. - for (bool done = false; !done;) + while ((line_sz < max) && !done) { // Stop reading if we've run out of space in the buffer (still need to null-terminate). if (line_sz >= max - 1u) @@ -52,45 +56,72 @@ void ReadLine(char * buffer, size_t max) #ifdef BRD4325A // for 917 SoC board, we need to create a rx event before we wait for the shell activity // NotifyShellProcessFromISR() is called once the buffer is filled - if (streamer_read(streamer_get(), buffer + line_sz, 1) != 1) + while (streamer_read(streamer_get(), buffer + read, 1) == 1) { - continue; + // Count how many characters were read; usually one but could be copy/paste + read++; } #endif chip::WaitForShellActivity(); #ifndef BRD4325A // for EFR32 boards - if (streamer_read(streamer_get(), buffer + line_sz, 1) != 1) + while (streamer_read(streamer_get(), buffer + read, 1) == 1) { - continue; + // Count how many characters were read; usually one but could be copy/paste + read++; } #endif - - // Process character we just read. - switch (buffer[line_sz]) + // Process all characters that were read until we run out or exceed max char limit + while (line_sz < read && line_sz < max) { - case '\r': - case '\n': - streamer_printf(streamer_get(), "\r\n"); - buffer[line_sz] = '\0'; - line_sz++; - done = true; - break; - case 0x7F: - // Do not accept backspace character (i.e. don't increment line_sz) and remove 1 additional character if it exists. - if (line_sz >= 1u) + switch (buffer[line_sz]) { - streamer_printf(streamer_get(), "\b \b"); - line_sz--; - } - break; - default: - if (isprint(static_cast(buffer[line_sz])) || buffer[line_sz] == '\t') - { - streamer_printf(streamer_get(), "%c", buffer[line_sz]); + case '\r': + // Mac OS return case of '\r' or beginning of Windows return case '\r\n' + buffer[line_sz] = '\0'; + streamer_printf(streamer_get(), "\r\n"); + haveCR = true; + done = true; line_sz++; + break; + case '\n': + // True if Windows return case of '\r\n' + if (haveCR) + { + // Do nothing - already taken care of with CR, return to loop and don't increment buffer + haveCR = false; + read--; + } + // Linux return case of just '\n' + else + { + buffer[line_sz] = '\0'; + streamer_printf(streamer_get(), "\r\n"); + done = true; + line_sz++; + } + break; + case 0x7F: + // Do not accept backspace character (i.e. don't increment line_sz) and remove 1 additional character if it exists. + if (line_sz >= 1u) + { + // Delete backspace character + whatever came before it + streamer_printf(streamer_get(), "\b \b"); + line_sz--; + read--; + } + // Remove backspace character regardless + read--; + + break; + default: + if (isprint(static_cast(buffer[line_sz])) || buffer[line_sz] == '\t') + { + streamer_printf(streamer_get(), "%c", buffer[line_sz]); + line_sz++; + } + break; } - break; } } } diff --git a/src/messaging/ReliableMessageContext.cpp b/src/messaging/ReliableMessageContext.cpp index 06decfc320c41f..fcba107a734c5f 100644 --- a/src/messaging/ReliableMessageContext.cpp +++ b/src/messaging/ReliableMessageContext.cpp @@ -33,9 +33,12 @@ #include #include #include +#include #include #include +using namespace chip::DeviceLayer; + namespace chip { namespace Messaging { @@ -51,6 +54,22 @@ ReliableMessageMgr * ReliableMessageContext::GetReliableMessageMgr() return static_cast(this)->GetExchangeMgr()->GetReliableMessageMgr(); } +void ReliableMessageContext::SetMessageNotAcked(bool messageNotAcked) +{ + mFlags.Set(Flags::kFlagMessageNotAcked, messageNotAcked); + +#if CONFIG_DEVICE_LAYER + DeviceLayer::ChipDeviceEvent event; + event.Type = DeviceLayer::DeviceEventType::kICDMsgAckSyncEvent; + event.AckSync.awaitingAck = messageNotAcked; + CHIP_ERROR status = DeviceLayer::PlatformMgr().PostEvent(&event); + if (status != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "Failed to post AckSync event %" CHIP_ERROR_FORMAT, status.Format()); + } +#endif +} + CHIP_ERROR ReliableMessageContext::FlushAcks() { CHIP_ERROR err = CHIP_NO_ERROR; diff --git a/src/messaging/ReliableMessageContext.h b/src/messaging/ReliableMessageContext.h index 57ec4561740376..2ee9fe50a2f763 100644 --- a/src/messaging/ReliableMessageContext.h +++ b/src/messaging/ReliableMessageContext.h @@ -241,11 +241,6 @@ inline void ReliableMessageContext::SetAckPending(bool inAckPending) mFlags.Set(Flags::kFlagAckPending, inAckPending); } -inline void ReliableMessageContext::SetMessageNotAcked(bool messageNotAcked) -{ - mFlags.Set(Flags::kFlagMessageNotAcked, messageNotAcked); -} - inline void ReliableMessageContext::SetRequestingActiveMode(bool activeMode) { mFlags.Set(Flags::kFlagActiveMode, activeMode); diff --git a/src/platform/Darwin/BleConnectionDelegateImpl.mm b/src/platform/Darwin/BleConnectionDelegateImpl.mm index 8baed2da9be929..1d4e76618ac321 100644 --- a/src/platform/Darwin/BleConnectionDelegateImpl.mm +++ b/src/platform/Darwin/BleConnectionDelegateImpl.mm @@ -181,8 +181,10 @@ - (void)removePeripheralsFromCache; [ble stop]; ble = [[BleConnection alloc] initWithDelegate:delegate queue:bleWorkQueue]; - ble.onConnectionComplete = OnConnectionComplete; - ble.onConnectionError = OnConnectionError; + // Do _not_ set onConnectionComplete and onConnectionError + // here. The connection callbacks we have expect an appState + // that we do not have here, and in any case connection + // complete/error make no sense for a scan. ble.centralManager = [ble.centralManager initWithDelegate:ble queue:bleWorkQueue]; }); } diff --git a/src/platform/android/SystemPlatformConfig.h b/src/platform/android/SystemPlatformConfig.h index 1c601906812edc..085d1e58f96e0b 100644 --- a/src/platform/android/SystemPlatformConfig.h +++ b/src/platform/android/SystemPlatformConfig.h @@ -41,4 +41,5 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_USE_POSIX_TIME_FUNCTS 1 +#define CHIP_SYSTEM_CONFIG_POOL_USE_HEAP 1 // ========== Platform-specific Configuration Overrides ========= diff --git a/src/platform/silabs/CHIPDevicePlatformConfig.h b/src/platform/silabs/CHIPDevicePlatformConfig.h index 7ea977bf54aa88..c51a923367ffaf 100644 --- a/src/platform/silabs/CHIPDevicePlatformConfig.h +++ b/src/platform/silabs/CHIPDevicePlatformConfig.h @@ -138,18 +138,6 @@ #define CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE (6 * 1024) #endif // CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE -#ifndef CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL -#define CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL chip::System::Clock::Milliseconds32(SL_OT_IDLE_INTERVAL) -#endif // CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL - -#ifndef CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL -#define CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL chip::System::Clock::Milliseconds32(SL_OT_ACTIVE_INTERVAL) -#endif // CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL - -#ifndef CHIP_DEVICE_CONFIG_SED_ACTIVE_THRESHOLD -#define CHIP_DEVICE_CONFIG_SED_ACTIVE_THRESHOLD chip::System::Clock::Milliseconds32(SL_ACTIVE_MODE_THRESHOLD) -#endif // CHIP_DEVICE_CONFIG_SED_ACTIVE_THRESHOLD - #ifndef CHIP_DEVICE_CONFIG_THREAD_TASK_STACK_SIZE #if defined(EFR32MG21) #define CHIP_DEVICE_CONFIG_THREAD_TASK_STACK_SIZE (2 * 1024) @@ -167,3 +155,15 @@ #endif // CHIP_DEVICE_CONFIG_BLE_APP_TASK_NAME #define CHIP_DEVICE_CONFIG_MAX_EVENT_QUEUE_SIZE 25 + +/* + ICD Configuration Defines +*/ + +#ifndef CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL +#define CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL chip::System::Clock::Milliseconds32(SL_OT_IDLE_INTERVAL) +#endif // CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL + +#ifndef CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL +#define CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL chip::System::Clock::Milliseconds32(SL_OT_ACTIVE_INTERVAL) +#endif // CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL diff --git a/src/platform/silabs/CHIPPlatformConfig.h b/src/platform/silabs/CHIPPlatformConfig.h index ec36bc8f46eae2..a9105527fb7b15 100644 --- a/src/platform/silabs/CHIPPlatformConfig.h +++ b/src/platform/silabs/CHIPPlatformConfig.h @@ -84,6 +84,26 @@ #define CHIP_CONFIG_MAX_FABRICS 5 // 4 fabrics + 1 for rotation slack #endif +#ifdef SL_ICD_ENABLED + +#ifndef CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL +#define CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL SL_IDLE_MODE_INTERVAL +#endif // CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL + +#ifndef CHIP_CONFIG_ICD_ACTIVE_MODE_INTERVAL +#define CHIP_CONFIG_ICD_ACTIVE_MODE_INTERVAL SL_ACTIVE_MODE_INTERVAL +#endif // CHIP_CONFIG_ICD_ACTIVE_MODE_INTERVAL + +#ifndef CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD +#define CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD SL_ACTIVE_MODE_THRESHOLD +#endif // CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD + +#ifndef CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC +#define CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC SL_ICD_SUPPORTED_CLIENTS_PER_FABRIC +#endif // CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC + +#endif // SL_ICD_ENABLED + // ==================== FreeRTOS Configuration Overrides ==================== #ifndef CHIP_CONFIG_FREERTOS_USE_STATIC_TASK #define CHIP_CONFIG_FREERTOS_USE_STATIC_TASK 1 diff --git a/src/protocols/secure_channel/CASEServer.cpp b/src/protocols/secure_channel/CASEServer.cpp index b78f5f40630680..f8d580fdd9957b 100644 --- a/src/protocols/secure_channel/CASEServer.cpp +++ b/src/protocols/secure_channel/CASEServer.cpp @@ -84,10 +84,17 @@ CHIP_ERROR CASEServer::OnMessageReceived(Messaging::ExchangeContext * ec, const bool watchdogFired = GetSession().InvokeBackgroundWorkWatchdog(); if (!watchdogFired) { - // Handshake wasn't stuck, let it continue its work - // TODO: Send Busy response, #27473 - ChipLogError(Inet, "CASE session is in establishing state, returning without responding"); - return CHIP_NO_ERROR; + // Handshake wasn't stuck, send the busy status report and let the existing handshake continue. + + // A successful CASE handshake can take several seconds and some may time out (30 seconds or more). + // TODO: Come up with better estimate: https://github.com/project-chip/connectedhomeip/issues/28288 + // For now, setting minimum wait time to 5000 milliseconds. + CHIP_ERROR err = SendBusyStatusReport(ec, System::Clock::Milliseconds16(5000)); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Inet, "Failed to send the busy status report, err:%" CHIP_ERROR_FORMAT, err.Format()); + } + return err; } } @@ -181,4 +188,16 @@ void CASEServer::OnSessionEstablished(const SessionHandle & session) ChipLogValueScopedNodeId(session->GetPeer())); PrepareForSessionEstablishment(session->GetPeer()); } + +CHIP_ERROR CASEServer::SendBusyStatusReport(Messaging::ExchangeContext * ec, System::Clock::Milliseconds16 minimumWaitTime) +{ + ChipLogProgress(Inet, "Already in the middle of CASE handshake, sending busy status report"); + + System::PacketBufferHandle handle = Protocols::SecureChannel::StatusReport::MakeBusyStatusReportMessage(minimumWaitTime); + VerifyOrReturnError(!handle.IsNull(), CHIP_ERROR_NO_MEMORY); + + ChipLogProgress(Inet, "Sending status report, exchange " ChipLogFormatExchange, ChipLogValueExchange(ec)); + return ec->SendMessage(Protocols::SecureChannel::MsgType::StatusReport, std::move(handle)); +} + } // namespace chip diff --git a/src/protocols/secure_channel/CASEServer.h b/src/protocols/secure_channel/CASEServer.h index 894d496c93bfac..0c1f1d26dcb963 100644 --- a/src/protocols/secure_channel/CASEServer.h +++ b/src/protocols/secure_channel/CASEServer.h @@ -22,6 +22,7 @@ #include #include #include +#include namespace chip { @@ -107,6 +108,13 @@ class CASEServer : public SessionEstablishmentDelegate, * */ void PrepareForSessionEstablishment(const ScopedNodeId & previouslyEstablishedPeer = ScopedNodeId()); + + // If we are in the middle of handshake and receive a Sigma1 then respond with Busy status code. + // @param[in] ec Exchange Context + // @param[in] minimumWaitTime Minimum wait time reported to client before it can attempt to resend sigma1 + // + // @return CHIP_NO_ERROR on success, error code otherwise + CHIP_ERROR SendBusyStatusReport(Messaging::ExchangeContext * ec, System::Clock::Milliseconds16 minimumWaitTime); }; } // namespace chip diff --git a/src/protocols/secure_channel/CASESession.cpp b/src/protocols/secure_channel/CASESession.cpp index 07a75cf5fcbb2a..2afc40feacaf02 100644 --- a/src/protocols/secure_channel/CASESession.cpp +++ b/src/protocols/secure_channel/CASESession.cpp @@ -1977,6 +1977,10 @@ CHIP_ERROR CASESession::OnFailureStatusReport(Protocols::SecureChannel::GeneralS err = CHIP_ERROR_NO_SHARED_TRUSTED_ROOT; break; + case kProtocolCodeBusy: + err = CHIP_ERROR_BUSY; + break; + default: err = CHIP_ERROR_INTERNAL; break; diff --git a/src/protocols/secure_channel/PairingSession.h b/src/protocols/secure_channel/PairingSession.h index 6e59f06dcaa660..ccbbd4a452ae64 100644 --- a/src/protocols/secure_channel/PairingSession.h +++ b/src/protocols/secure_channel/PairingSession.h @@ -174,6 +174,29 @@ class DLL_EXPORT PairingSession : public SessionDelegate else { err = OnFailureStatusReport(report.GetGeneralCode(), report.GetProtocolCode()); + + if (report.GetGeneralCode() == Protocols::SecureChannel::GeneralStatusCode::kBusy && + report.GetProtocolCode() == Protocols::SecureChannel::kProtocolCodeBusy) + { + if (!report.GetProtocolData().IsNull()) + { + Encoding::LittleEndian::Reader reader(report.GetProtocolData()->Start(), + report.GetProtocolData()->DataLength()); + + uint16_t minimumWaitTime = 0; + err = reader.Read16(&minimumWaitTime).StatusCode(); + if (err != CHIP_NO_ERROR) + { + ChipLogError(SecureChannel, "Failed to read the minimum wait time: %" CHIP_ERROR_FORMAT, err.Format()); + } + else + { + // TODO: CASE: Notify minimum wait time to clients on receiving busy status report #28290 + ChipLogProgress(SecureChannel, "Received busy status report with minimum wait time: %u ms", + minimumWaitTime); + } + } + } } return err; diff --git a/src/protocols/secure_channel/StatusReport.cpp b/src/protocols/secure_channel/StatusReport.cpp index 18df6f7383e516..e31c832b469f51 100644 --- a/src/protocols/secure_channel/StatusReport.cpp +++ b/src/protocols/secure_channel/StatusReport.cpp @@ -95,6 +95,34 @@ size_t StatusReport::Size() const return WriteToBuffer(emptyBuf).Needed(); } +System::PacketBufferHandle StatusReport::MakeBusyStatusReportMessage(System::Clock::Milliseconds16 minimumWaitTime) +{ + using namespace Protocols::SecureChannel; + constexpr uint8_t kBusyStatusReportProtocolDataSize = sizeof(minimumWaitTime.count()); // 16-bits + + auto handle = System::PacketBufferHandle::New(kBusyStatusReportProtocolDataSize, 0); + VerifyOrReturnValue(!handle.IsNull(), handle, + ChipLogError(SecureChannel, "Failed to allocate protocol data for busy status report")); + + // Build the protocol data with minimum wait time + Encoding::LittleEndian::PacketBufferWriter protocolDataBufferWriter(std::move(handle)); + protocolDataBufferWriter.Put16(minimumWaitTime.count()); + handle = protocolDataBufferWriter.Finalize(); + VerifyOrReturnValue(!handle.IsNull(), handle, + ChipLogError(SecureChannel, "Failed to finalize protocol data for busy status report")); + + // Build a busy status report + StatusReport statusReport(GeneralStatusCode::kBusy, Protocols::SecureChannel::Id, kProtocolCodeBusy, std::move(handle)); + + // Build the status report message + handle = System::PacketBufferHandle::New(statusReport.Size()); + VerifyOrReturnValue(!handle.IsNull(), handle, ChipLogError(SecureChannel, "Failed to allocate status report message")); + Encoding::LittleEndian::PacketBufferWriter bbuf(std::move(handle)); + + statusReport.WriteToBuffer(bbuf); + return bbuf.Finalize(); +} + } // namespace SecureChannel } // namespace Protocols } // namespace chip diff --git a/src/protocols/secure_channel/StatusReport.h b/src/protocols/secure_channel/StatusReport.h index cd26b798eab1db..e25f2c6dc1a20b 100644 --- a/src/protocols/secure_channel/StatusReport.h +++ b/src/protocols/secure_channel/StatusReport.h @@ -21,6 +21,7 @@ #include #include #include +#include #include namespace chip { @@ -94,6 +95,15 @@ class DLL_EXPORT StatusReport uint16_t GetProtocolCode() const { return mProtocolCode; } const System::PacketBufferHandle & GetProtocolData() const { return mProtocolData; } + /** + * Builds a busy status report with protocol data containing the minimum wait time. + * + * @param[in] minimumWaitTime Time in milliseconds before initiator retries the request + * + * @return Packet buffer handle which can be passed to SendMessage. + */ + static System::PacketBufferHandle MakeBusyStatusReportMessage(System::Clock::Milliseconds16 minimumWaitTime); + private: GeneralStatusCode mGeneralCode; Protocols::Id mProtocolId; diff --git a/src/protocols/secure_channel/tests/TestStatusReport.cpp b/src/protocols/secure_channel/tests/TestStatusReport.cpp index 35cbe1b5bca65e..093453029b156b 100644 --- a/src/protocols/secure_channel/tests/TestStatusReport.cpp +++ b/src/protocols/secure_channel/tests/TestStatusReport.cpp @@ -16,6 +16,7 @@ * limitations under the License. */ +#include #include #include #include @@ -104,6 +105,33 @@ void TestBadStatusReport(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, err != CHIP_NO_ERROR); } +void TestMakeBusyStatusReport(nlTestSuite * inSuite, void * inContext) +{ + GeneralStatusCode generalCode = GeneralStatusCode::kBusy; + auto protocolId = SecureChannel::Id; + uint16_t protocolCode = kProtocolCodeBusy; + System::Clock::Milliseconds16 minimumWaitTime = System::Clock::Milliseconds16(5000); + + System::PacketBufferHandle handle = StatusReport::MakeBusyStatusReportMessage(minimumWaitTime); + NL_TEST_ASSERT(inSuite, !handle.IsNull()); + + StatusReport reportToParse; + CHIP_ERROR err = reportToParse.Parse(std::move(handle)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == err); + NL_TEST_ASSERT(inSuite, reportToParse.GetGeneralCode() == generalCode); + NL_TEST_ASSERT(inSuite, reportToParse.GetProtocolId() == protocolId); + NL_TEST_ASSERT(inSuite, reportToParse.GetProtocolCode() == protocolCode); + + const System::PacketBufferHandle & rcvData = reportToParse.GetProtocolData(); + NL_TEST_ASSERT(inSuite, !rcvData.IsNull()); + NL_TEST_ASSERT(inSuite, rcvData->DataLength() == sizeof(minimumWaitTime)); + + uint16_t readMinimumWaitTime = 0; + Encoding::LittleEndian::Reader reader(rcvData->Start(), rcvData->DataLength()); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == reader.Read16(&readMinimumWaitTime).StatusCode()); + NL_TEST_ASSERT(inSuite, System::Clock::Milliseconds16(readMinimumWaitTime) == minimumWaitTime); +} + // Test Suite /** @@ -115,6 +143,7 @@ static const nlTest sTests[] = NL_TEST_DEF("TestStatusReport_NoData", TestStatusReport_NoData), NL_TEST_DEF("TestStatusReport_WithData", TestStatusReport_WithData), NL_TEST_DEF("TestBadStatusReport", TestBadStatusReport), + NL_TEST_DEF("TestMakeBusyStatusReport", TestMakeBusyStatusReport), NL_TEST_SENTINEL() }; diff --git a/src/python_testing/TC_RVCCLEANM_2_1.py b/src/python_testing/TC_RVCCLEANM_2_1.py index 8a2683c2317472..e082b83bb67a20 100644 --- a/src/python_testing/TC_RVCCLEANM_2_1.py +++ b/src/python_testing/TC_RVCCLEANM_2_1.py @@ -23,7 +23,7 @@ # This test requires several additional command line arguments # run with -# --int-arg PIXIT_ENDPOINT: PIXIT_MODEOK: PIXIT_MODEFAIL: +# --int-arg PIXIT_ENDPOINT: PIXIT.RVCCLEANM.MODE_CHANGE_OK: PIXIT.RVCCLEANM.MODE_CHANGE_FAIL: class TC_RVCCLEANM_2_1(MatterBaseTest): @@ -44,20 +44,16 @@ async def test_TC_RVCCLEANM_2_1(self): asserts.assert_true('PIXIT_ENDPOINT' in self.matter_test_config.global_test_params, "PIXIT_ENDPOINT must be included on the command line in " "the --int-arg flag as PIXIT_ENDPOINT:") - asserts.assert_true('PIXIT_MODEOK' in self.matter_test_config.global_test_params, - "PIXIT_MODEOK must be included on the command line in " - "the --int-arg flag as PIXIT_MODEOK:") - asserts.assert_true('PIXIT_MODEFAIL' in self.matter_test_config.global_test_params, - "PIXIT_MODEFAIL must be included on the command line in " - "the --int-arg flag as PIXIT_MODEFAIL:") - asserts.assert_true('pixit_can_test_mode_failure' in self.matter_test_config.global_test_params, - "PIXIT_CAN_TEST_MODE_FAILURE must be included on the command line in " - "the --bool-arg flag as PIXIT_CAN_TEST_MODE_FAILURE:") + asserts.assert_true('PIXIT.RVCCLEANM.MODE_CHANGE_OK' in self.matter_test_config.global_test_params, + "PIXIT.RVCCLEANM.MODE_CHANGE_OK must be included on the command line in " + "the --int-arg flag as PIXIT.RVCCLEANM.MODE_CHANGE_OK:") + asserts.assert_true('PIXIT.RVCCLEANM.MODE_CHANGE_FAIL' in self.matter_test_config.global_test_params, + "PIXIT.RVCCLEANM.MODE_CHANGE_FAIL must be included on the command line in " + "the --int-arg flag as PIXIT.RVCCLEANM.MODE_CHANGE_FAIL:") self.endpoint = self.matter_test_config.global_test_params['PIXIT_ENDPOINT'] - self.modeok = self.matter_test_config.global_test_params['PIXIT_MODEOK'] - self.modefail = self.matter_test_config.global_test_params['PIXIT_MODEFAIL'] - self.can_test_mode_failure = self.matter_test_config.global_test_params['pixit_can_test_mode_failure'] + self.modeok = self.matter_test_config.global_test_params['PIXIT.RVCCLEANM.MODE_CHANGE_OK'] + self.modefail = self.matter_test_config.global_test_params['PIXIT.RVCCLEANM.MODE_CHANGE_FAIL'] asserts.assert_true(self.check_pics("RVCCLEANM.S.A0000"), "RVCCLEANM.S.A0000 must be supported") asserts.assert_true(self.check_pics("RVCCLEANM.S.A0001"), "RVCCLEANM.S.A0001 must be supported") @@ -101,7 +97,7 @@ class CommonCodes(Enum): ret = await self.send_change_to_mode_cmd(newMode=old_current_mode) asserts.assert_true(ret.status == CommonCodes.SUCCESS.value, "Changing the mode to the current mode should be a no-op") - if self.can_test_mode_failure is True: + if self.check_pics("RVCCLEANM.S.M.CAN_TEST_MODE_FAILURE"): self.print_step(5, "Manually put the device in a state from which it will FAIL to transition to mode %d" % (self.modefail)) input("Press Enter when done.\n") diff --git a/src/python_testing/TC_RVCOPSTATE_2_1.py b/src/python_testing/TC_RVCOPSTATE_2_1.py index acd0ba35b6a4f4..29d2757363a726 100644 --- a/src/python_testing/TC_RVCOPSTATE_2_1.py +++ b/src/python_testing/TC_RVCOPSTATE_2_1.py @@ -33,6 +33,22 @@ async def read_mod_attribute_expect_success(self, endpoint, attribute): cluster = Clusters.Objects.RvcOperationalState return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + async def read_and_validate_opstate(self, step, expected_state): + self.print_step(step, "Read OperationalState attribute") + operational_state = await self.read_mod_attribute_expect_success( + endpoint=self.endpoint, attribute=Clusters.RvcOperationalState.Attributes.OperationalState) + logging.info("OperationalState: %s" % (operational_state)) + asserts.assert_equal(operational_state, expected_state, + "OperationalState(%s) should equal %s" % (operational_state, expected_state)) + + async def read_and_validate_operror(self, step, expected_error): + self.print_step(step, "Read OperationalError attribute") + operational_error = await self.read_mod_attribute_expect_success( + endpoint=self.endpoint, attribute=Clusters.RvcOperationalState.Attributes.OperationalError) + logging.info("OperationalError: %s" % (operational_error)) + asserts.assert_equal(operational_error.errorStateID, expected_error, + "errorStateID(%s) should equal %s" % (operational_error.errorStateID, expected_error)) + @async_test_body async def test_TC_RVCOPSTATE_2_1(self): @@ -57,7 +73,7 @@ async def test_TC_RVCOPSTATE_2_1(self): phase_list_len = len(phase_list) - asserts.assert_less_equal(phase_list_len, 32, "PhaseList must have no more than 32 entries!") + asserts.assert_less_equal(phase_list_len, 32, "PhaseList length(%d) must be less than 32!" % phase_list_len) if self.check_pics("RVCOPSTATE.S.A0001"): self.print_step(3, "Read CurrentPhase attribute") @@ -65,10 +81,10 @@ async def test_TC_RVCOPSTATE_2_1(self): logging.info("CurrentPhase: %s" % (current_phase)) if phase_list == NullValue: - asserts.assert_true(current_phase == NullValue, "CurrentPhase should be null") + asserts.assert_true(current_phase == NullValue, "CurrentPhase(%s) should be null" % current_phase) else: - asserts.assert_true(0 <= current_phase and current_phase <= (phase_list_len - 1), - "CurrentPhase must be between 0 and (phase-list-size - 1)") + asserts.assert_true(0 <= current_phase < phase_list_len, + "CurrentPhase(%s) must be between 0 and %d" % (current_phase, (phase_list_len - 1))) if self.check_pics("RVCOPSTATE.S.A0002"): self.print_step(4, "Read CountdownTime attribute") @@ -77,7 +93,8 @@ async def test_TC_RVCOPSTATE_2_1(self): logging.info("CountdownTime: %s" % (countdown_time)) if countdown_time is not NullValue: - asserts.assert_true(countdown_time >= 0 and countdown_time <= 259200, "CountdownTime must be between 0 and 259200") + asserts.assert_true(countdown_time >= 0 and countdown_time <= 259200, + "CountdownTime(%s) must be between 0 and 259200" % countdown_time) if self.check_pics("RVCOPSTATE.S.A0003"): self.print_step(5, "Read OperationalStateList attribute") @@ -86,20 +103,22 @@ async def test_TC_RVCOPSTATE_2_1(self): logging.info("OperationalStateList: %s" % (operational_state_list)) - state_ids = [s.operationalStateID for s in operational_state_list] - defined_states = [state.value for state in Clusters.OperationalState.Enums.OperationalStateEnum if state is not Clusters.OperationalState.Enums.OperationalStateEnum.kUnknownEnumValue] defined_states.extend(state.value for state in Clusters.RvcOperationalState.Enums.OperationalStateEnum if state is not Clusters.RvcOperationalState.Enums.OperationalStateEnum.kUnknownEnumValue) - for state_id in state_ids: - in_range = (0x8000 <= state_id and state_id <= 0xBFFF) - asserts.assert_true(state_id in defined_states or in_range, - "Found a OperationalStateList entry with invalid ID value!") - if state_id == Clusters.OperationalState.Enums.OperationalStateEnum.kError: - error_present_in_list = True - asserts.assert_true(error_present_in_list, "The OperationalStateList does not have an ID entry of Error(0x03)") + for state in operational_state_list: + in_range = (0x80 <= state.operationalStateID <= 0xBF) + asserts.assert_true(state.operationalStateID in defined_states or in_range, + "Found an OperationalStateList entry with an invalid ID value: %s" % state.operationalStateID) + if in_range: + asserts.assert_true(state.operationalStateLabel is not None, + "The OperationalStateLabel should be populated") + if state.operationalStateID == Clusters.OperationalState.Enums.OperationalStateEnum.kError: + error_state_present = True + + asserts.assert_true(error_state_present, "The OperationalStateList does not have an ID entry of Error(0x03)") if self.check_pics("RVCOPSTATE.S.A0004"): self.print_step(6, "Read OperationalState attribute") @@ -108,9 +127,38 @@ async def test_TC_RVCOPSTATE_2_1(self): logging.info("OperationalState: %s" % (operational_state)) - in_range = (0x8000 <= operational_state and operational_state <= 0xBFFF) + in_range = (0x80 <= operational_state and operational_state <= 0xBF) asserts.assert_true(operational_state in defined_states or in_range, "OperationalState has an invalid ID value!") + if self.check_pics("RVCOPSTATE.S.M.ST_STOPPED"): + self.print_step("6a", "Manually put the device in the stopped state") + input("Press Enter when done.\n") + await self.read_and_validate_opstate(step="6b", expected_state=Clusters.OperationalState.Enums.OperationalStateEnum.kStopped) + if self.check_pics("RVCOPSTATE.S.M.ST_RUNNING"): + self.print_step("6c", "Manually put the device in the running state") + input("Press Enter when done.\n") + await self.read_and_validate_opstate(step="6d", expected_state=Clusters.OperationalState.Enums.OperationalStateEnum.kRunning) + if self.check_pics("RVCOPSTATE.S.M.ST_PAUSED"): + self.print_step("6e", "Manually put the device in the paused state") + input("Press Enter when done.\n") + await self.read_and_validate_opstate(step="6f", expected_state=Clusters.OperationalState.Enums.OperationalStateEnum.kPaused) + if self.check_pics("RVCOPSTATE.S.M.ST_ERROR"): + self.print_step("6g", "Manually put the device in the error state") + input("Press Enter when done.\n") + await self.read_and_validate_opstate(step="6h", expected_state=Clusters.OperationalState.Enums.OperationalStateEnum.kError) + if self.check_pics("RVCOPSTATE.S.M.ST_SEEKING_CHARGER"): + self.print_step("6i", "Manually put the device in the seeking charger state") + input("Press Enter when done.\n") + await self.read_and_validate_opstate(step="6j", expected_state=Clusters.RvcOperationalState.Enums.OperationalStateEnum.kSeekingCharger) + if self.check_pics("RVCOPSTATE.S.M.ST_CHARGING"): + self.print_step("6k", "Manually put the device in the charging state") + input("Press Enter when done.\n") + await self.read_and_validate_opstate(step="6l", expected_state=Clusters.RvcOperationalState.Enums.OperationalStateEnum.kCharging) + if self.check_pics("RVCOPSTATE.S.M.ST_DOCKED"): + self.print_step("6m", "Manually put the device in the docked state") + input("Press Enter when done.\n") + await self.read_and_validate_opstate(step="6n", expected_state=Clusters.RvcOperationalState.Enums.OperationalStateEnum.kDocked) + if self.check_pics("RVCOPSTATE.S.A0005"): self.print_step(7, "Read OperationalError attribute") operational_error = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, @@ -124,9 +172,60 @@ async def test_TC_RVCOPSTATE_2_1(self): defined_errors.extend(error.value for error in Clusters.RvcOperationalState.Enums.ErrorStateEnum if error is not Clusters.RvcOperationalState.Enums.ErrorStateEnum.kUnknownEnumValue) - in_range = (0x8000 <= operational_error.errorStateID and operational_error.errorStateID <= 0xBFFF) + in_range = (0x80 <= operational_error.errorStateID <= 0xBF) asserts.assert_true(operational_error.errorStateID in defined_errors - or in_range, "OperationalError has an invalid ID value!") + or in_range, "OperationalError(%s) has an invalid ID value!" % operational_error.errorStateID) + if in_range: + asserts.assert_true(operational_error.errorStateLabel is not None, "ErrorStateLabel should be populated") + + if self.check_pics("RVCOPSTATE.S.M.ERR_NO_ERROR"): + self.print_step("7a", "Manually put the device in the no error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7b", expected_error=Clusters.OperationalState.Enums.ErrorStateEnum.kNoError) + if self.check_pics("RVCOPSTATE.S.M.ERR_UNABLE_TO_START_OR_RESUME"): + self.print_step("7c", "Manually put the device in the unable to start or resume error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7d", expected_error=Clusters.OperationalState.Enums.ErrorStateEnum.kUnableToStartOrResume) + if self.check_pics("RVCOPSTATE.S.M.ERR_UNABLE_TO_COMPLETE_OPERATION"): + self.print_step("7e", "Manually put the device in the unable to complete operation error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7f", expected_error=Clusters.OperationalState.Enums.ErrorStateEnum.kUnableToCompleteOperation) + if self.check_pics("RVCOPSTATE.S.M.ERR_COMMAND_INVALID_STATE"): + self.print_step("7g", "Manually put the device in the command invalid error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7h", expected_error=Clusters.OperationalState.Enums.ErrorStateEnum.kCommandInvalidInState) + if self.check_pics("RVCOPSTATE.S.M.ERR_FAILED_FIND_DOCK"): + self.print_step("7i", "Manually put the device in the failed to find dock error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7j", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kFailedToFindChargingDock) + if self.check_pics("RVCOPSTATE.S.M.ERR_STUCK"): + self.print_step("7k", "Manually put the device in the stuck error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7l", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kStuck) + if self.check_pics("RVCOPSTATE.S.M.ERR_DUST_BIN_MISSING"): + self.print_step("7m", "Manually put the device in the dust bin missing error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7n", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kDustBinMissing) + if self.check_pics("RVCOPSTATE.S.M.ERR_DUST_BIN_FULL"): + self.print_step("7o", "Manually put the device in the dust bin full error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7p", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kDustBinFull) + if self.check_pics("RVCOPSTATE.S.M.ERR_WATER_TANK_EMPTY"): + self.print_step("7q", "Manually put the device in the water tank empty error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7r", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kWaterTankEmpty) + if self.check_pics("RVCOPSTATE.S.M.ERR_WATER_TANK_MISSING"): + self.print_step("7s", "Manually put the device in the water tank missing error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7t", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kWaterTankMissing) + if self.check_pics("RVCOPSTATE.S.M.ERR_WATER_TANK_LID_OPEN"): + self.print_step("7u", "Manually put the device in the water tank lid open error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7v", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kWaterTankLidOpen) + if self.check_pics("RVCOPSTATE.S.M.ERR_MOP_CLEANING_PAD_MISSING"): + self.print_step("7w", "Manually put the device in the mop cleaning pad missing error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7x", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kMopCleaningPadMissing) if __name__ == "__main__": diff --git a/src/python_testing/TC_RVCOPSTATE_2_3.py b/src/python_testing/TC_RVCOPSTATE_2_3.py index 288e40f7099ba3..405523cb4a4f25 100644 --- a/src/python_testing/TC_RVCOPSTATE_2_3.py +++ b/src/python_testing/TC_RVCOPSTATE_2_3.py @@ -77,29 +77,30 @@ async def test_TC_RVCOPSTATE_2_3(self): defined_states = [state.value for state in Clusters.OperationalState.Enums.OperationalStateEnum if state is not Clusters.OperationalState.Enums.OperationalStateEnum.kUnknownEnumValue] - state_ids = [s.operationalStateID for s in op_state_list] + state_ids = set([s.operationalStateID for s in op_state_list]) asserts.assert_true(all(id in state_ids for id in defined_states), "OperationalStateList is missing a required entry") self.print_step(4, "Send Pause command") ret = await self.send_pause_cmd() asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kNoError, - "ErrorStateID should be NoError(0x00)") + "errorStateID(%s) should be NoError(0x00)" % ret.commandResponseState.errorStateID) self.print_step(5, "Read OperationalState attribute") operational_state = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.OperationalState) logging.info("OperationalState: %s" % (operational_state)) asserts.assert_equal(operational_state, Clusters.OperationalState.Enums.OperationalStateEnum.kPaused, - "OperationalState ID should be Paused(0x02)") + "OperationalState(%s) should be Paused(0x02)" % operational_state) self.print_step(6, "Read CountdownTime attribute") initial_countdown_time = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CountdownTime) logging.info("CountdownTime: %s" % (initial_countdown_time)) if initial_countdown_time is not NullValue: - in_range = (1 <= initial_countdown_time and initial_countdown_time <= 259200) - asserts.assert_true(initial_countdown_time is NullValue or in_range, "invalid CountdownTime") + in_range = (1 <= initial_countdown_time <= 259200) + asserts.assert_true(initial_countdown_time is NullValue or in_range, + "invalid CountdownTime(%s). Must be in between 1 and 259200, or null" % initial_countdown_time) self.print_step(7, "Waiting for 5 seconds") time.sleep(5) @@ -107,31 +108,32 @@ async def test_TC_RVCOPSTATE_2_3(self): self.print_step(8, "Read CountdownTime attribute") countdown_time = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CountdownTime) logging.info("CountdownTime: %s" % (countdown_time)) - asserts.assert_true(countdown_time != 0 or countdown_time == NullValue, "invalid CountdownTime") + asserts.assert_true(countdown_time != 0 or countdown_time == NullValue, + "invalid CountdownTime(%s). Must be a non zero integer, or null" % countdown_time) asserts.assert_equal(countdown_time, initial_countdown_time, - "CountdownTime does not equal to the intial CountdownTime %s" % initial_countdown_time) + "CountdownTime(%s) does not equal to the intial CountdownTime (%s)" % (countdown_time, initial_countdown_time)) self.print_step(9, "Send Pause command") ret = await self.send_pause_cmd() asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kNoError, - "ErrorStateID should be NoError(0x00)") + "errorStateID(%s) should be NoError(0x00)" % ret.commandResponseState.errorStateID) self.print_step(10, "Send Resume command") ret = await self.send_resume_cmd() asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kNoError, - "ErrorStateID should be NoError(0x00)") + "errorStateID(%s) should be NoError(0x00)" % ret.commandResponseState.errorStateID) self.print_step(11, "Read OperationalState attribute") operational_state = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.OperationalState) logging.info("OperationalState: %s" % (operational_state)) asserts.assert_equal(operational_state, Clusters.OperationalState.Enums.OperationalStateEnum.kRunning, - "OperationalState ID should be Running(0x01)") + "OperationalState(%s) should be Running(0x01)" % operational_state) self.print_step(12, "Send Resume command") ret = await self.send_resume_cmd() asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kNoError, - "errorStateID should be NoError(0x00)") + "errorStateID(%s) should be NoError(0x00)" % ret.commandResponseState.errorStateID) self.print_step(13, "Manually put the device in a state where it cannot receive a Pause command") input("Press Enter when done.\n") @@ -140,7 +142,7 @@ async def test_TC_RVCOPSTATE_2_3(self): ret = await self.send_pause_cmd() asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kCommandInvalidInState, - "errorStateID should be CommandInvalidInState(0x03)") + "errorStateID(%s) should be CommandInvalidInState(0x03)" % ret.commandResponseState.errorStateID) self.print_step(15, "Manually put the device in a state where it cannot receive a Resume command") input("Press Enter when done.\n") @@ -149,7 +151,7 @@ async def test_TC_RVCOPSTATE_2_3(self): ret = await self.send_resume_cmd() asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kCommandInvalidInState, - "errorStateID should be CommandInvalidInState(0x03)") + "errorStateID(%s) should be CommandInvalidInState(0x03)" % ret.commandResponseState.errorStateID) if __name__ == "__main__": diff --git a/src/python_testing/TC_RVCRUNM_2_1.py b/src/python_testing/TC_RVCRUNM_2_1.py index f9bd8937ae59bb..f6be1d2287f371 100644 --- a/src/python_testing/TC_RVCRUNM_2_1.py +++ b/src/python_testing/TC_RVCRUNM_2_1.py @@ -23,7 +23,7 @@ # This test requires several additional command line arguments # run with -# --int-arg PIXIT_ENDPOINT: PIXIT_MODEOK: PIXIT_MODEFAIL: +# --int-arg PIXIT_ENDPOINT: PIXIT.RVCRUNM.MODE_CHANGE_OK: PIXIT.RVCRUNM.MODE_CHANGE_FAIL: class TC_RVCRUNM_2_1(MatterBaseTest): @@ -44,20 +44,16 @@ async def test_TC_RVCRUNM_2_1(self): asserts.assert_true('PIXIT_ENDPOINT' in self.matter_test_config.global_test_params, "PIXIT_ENDPOINT must be included on the command line in " "the --int-arg flag as PIXIT_ENDPOINT:") - asserts.assert_true('PIXIT_MODEOK' in self.matter_test_config.global_test_params, - "PIXIT_MODEOK must be included on the command line in " - "the --int-arg flag as PIXIT_MODEOK:") - asserts.assert_true('PIXIT_MODEFAIL' in self.matter_test_config.global_test_params, - "PIXIT_MODEFAIL must be included on the command line in " - "the --int-arg flag as PIXIT_MODEFAIL:") - asserts.assert_true('pixit_can_test_mode_failure' in self.matter_test_config.global_test_params, - "PIXIT_CAN_TEST_MODE_FAILURE must be included on the command line in " - "the --bool-arg flag as PIXIT_CAN_TEST_MODE_FAILURE:") + asserts.assert_true('PIXIT.RVCRUNM.MODE_CHANGE_OK' in self.matter_test_config.global_test_params, + "PIXIT.RVCRUNM.MODE_CHANGE_OK must be included on the command line in " + "the --int-arg flag as PIXIT.RVCRUNM.MODE_CHANGE_OK:") + asserts.assert_true('PIXIT.RVCRUNM.MODE_CHANGE_FAIL' in self.matter_test_config.global_test_params, + "PIXIT.RVCRUNM.MODE_CHANGE_FAIL must be included on the command line in " + "the --int-arg flag as PIXIT.RVCRUNM.MODE_CHANGE_FAIL:") self.endpoint = self.matter_test_config.global_test_params['PIXIT_ENDPOINT'] - self.modeok = self.matter_test_config.global_test_params['PIXIT_MODEOK'] - self.modefail = self.matter_test_config.global_test_params['PIXIT_MODEFAIL'] - self.can_test_mode_failure = self.matter_test_config.global_test_params['pixit_can_test_mode_failure'] + self.modeok = self.matter_test_config.global_test_params['PIXIT.RVCRUNM.MODE_CHANGE_OK'] + self.modefail = self.matter_test_config.global_test_params['PIXIT.RVCRUNM.MODE_CHANGE_FAIL'] asserts.assert_true(self.check_pics("RVCRUNM.S.A0000"), "RVCRUNM.S.A0000 must be supported") asserts.assert_true(self.check_pics("RVCRUNM.S.A0001"), "RVCRUNM.S.A0001 must be supported") @@ -101,7 +97,7 @@ class CommonCodes(Enum): ret = await self.send_change_to_mode_cmd(newMode=old_current_mode) asserts.assert_true(ret.status == CommonCodes.SUCCESS.value, "Changing the mode to the current mode should be a no-op") - if self.can_test_mode_failure is True: + if self.check_pics("RVCRUNM.S.M.CAN_TEST_MODE_FAILURE"): self.print_step(5, "Manually put the device in a state from which it will FAIL to transition to mode %d" % (self.modefail)) input("Press Enter when done.\n") diff --git a/src/test_driver/esp32/main/main_app.cpp b/src/test_driver/esp32/main/main_app.cpp index 1eef2ae345439a..0ff3ce4690d6b8 100644 --- a/src/test_driver/esp32/main/main_app.cpp +++ b/src/test_driver/esp32/main/main_app.cpp @@ -19,12 +19,12 @@ #include "esp_heap_caps_init.h" #include "esp_log.h" #include "esp_netif.h" -#include "esp_spi_flash.h" #include "esp_system.h" #include "esp_wifi.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "nvs_flash.h" +#include "spi_flash_mmap.h" #include @@ -48,17 +48,6 @@ static void tester_task(void * pvParameters) extern "C" void app_main() { - esp_chip_info_t chip_info; - esp_chip_info(&chip_info); - - ESP_LOGI(TAG, "This is ESP32 chip with %d CPU cores, WiFi%s%s, ", chip_info.cores, - (chip_info.features & CHIP_FEATURE_BT) ? "/BT" : "", (chip_info.features & CHIP_FEATURE_BLE) ? "/BLE" : ""); - - ESP_LOGI(TAG, "silicon revision %d, ", chip_info.revision); - - ESP_LOGI(TAG, "%dMB %s flash\n", spi_flash_get_chip_size() / (1024 * 1024), - (chip_info.features & CHIP_FEATURE_EMB_FLASH) ? "embedded" : "external"); - // Initialize the ESP NVS layer. esp_err_t err = nvs_flash_init(); if (err != ESP_OK) diff --git a/third_party/silabs/efr32_sdk.gni b/third_party/silabs/efr32_sdk.gni index dd3e93fb0a6883..9c64cd951cd5d9 100644 --- a/third_party/silabs/efr32_sdk.gni +++ b/third_party/silabs/efr32_sdk.gni @@ -46,10 +46,16 @@ declare_args() { # Enable Segger System View use_system_view = false - # ICD Configuration flags - sl_ot_idle_interval_ms = 30000 # 30s Idle Intervals - sl_ot_active_interval_ms = 200 # 500ms Active Intervals - sl_active_mode_threshold = 1000 # 1s Active mode threshold + # ICD Openthread Configuration flags + sl_ot_idle_interval_ms = 15000 # 15s Idle Intervals + sl_ot_active_interval_ms = 200 # 200ms Active Intervals + + # ICD Matter Configuration flags + sl_idle_mode_interval_ms = 600000 # 10min Idle Mode Interval + sl_active_mode_interval_ms = 1000 # 1s Active Mode Interval + sl_active_mode_threshold_ms = 500 # 500ms Active Mode Threshold + sl_icd_supported_clients_per_fabric = 2 # 2 registration slots per fabric + sl_use_subscription_synching = false silabs_log_enabled = true @@ -149,12 +155,6 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/service/system/inc", "${efr32_sdk_root}/platform/service/udelay/inc", "${efr32_sdk_root}/platform/service/legacy_hal/inc", - "${efr32_sdk_root}/platform/service/token_manager/config", - "${efr32_sdk_root}/platform/service/token_manager/inc", - "${efr32_sdk_root}/platform/service/token_manager/test", - "${efr32_sdk_root}/platform/service/token_manager/test/include", - "${efr32_sdk_root}/platform/service/token_manager/test/stack/config", - "${efr32_sdk_root}/platform/service/token_manager/test/stack/include", "${efr32_sdk_root}/platform/middleware/glib", "${efr32_sdk_root}/platform/middleware/glib/config", "${efr32_sdk_root}/platform/middleware/glib/glib", @@ -335,11 +335,21 @@ template("efr32_sdk") { if (chip_enable_icd_server) { defines += [ - "SL_OT_IDLE_INTERVAL=${sl_ot_idle_interval_ms}", - "SL_OT_ACTIVE_INTERVAL=${sl_ot_active_interval_ms}", - "SL_ACTIVE_MODE_THRESHOLD=${sl_active_mode_threshold}", + "SL_ICD_ENABLED=1", + "SL_ACTIVE_MODE_THRESHOLD=${sl_active_mode_threshold_ms}", + "SL_ACTIVE_MODE_INTERVAL=${sl_active_mode_interval_ms}", + "SL_IDLE_MODE_INTERVAL=${sl_idle_mode_interval_ms}", + "SL_ICD_SUPPORTED_CLIENTS_PER_FABRIC=${sl_icd_supported_clients_per_fabric}", ] + if (defined(invoker.chip_enable_openthread) && + invoker.chip_enable_openthread) { + defines += [ + "SL_OT_IDLE_INTERVAL=${sl_ot_idle_interval_ms}", + "SL_OT_ACTIVE_INTERVAL=${sl_ot_active_interval_ms}", + ] + } + if (defined(invoker.chip_enable_wifi) && invoker.chip_enable_wifi) { defines += [ # Used for wifi devices to get packet details @@ -380,9 +390,15 @@ template("efr32_sdk") { "${efr32_sdk_root}/hardware/driver/memlcd/inc/memlcd_usart", ] } + if (invoker.enable_dic) { _include_dirs += [ "${chip_root}/third_party/silabs/mqtt/stack" ] } + + if (sl_use_subscription_synching) { + defines += [ "CHIP_CONFIG_SYNCHRONOUS_REPORTS_ENABLED=1" ] + } + if (silabs_family == "efr32mg12") { _include_dirs += [ "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG12P/Include", @@ -404,26 +420,6 @@ template("efr32_sdk") { } defines += [ "EFR32MG12" ] - } else if (silabs_family == "efr32mg21") { - _include_dirs += [ - "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG21/Include", - "${efr32_sdk_root}/platform/radio/rail_lib/chip/efr32/efr32xg2x", - "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure", - "${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg21", - "${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg21/config", - "${efr32_sdk_root}/platform/service/device_init/config/s2/", - ] - - libs += [ - "${sdk_support_root}/protocol/bluetooth/lib/EFR32MG21/GCC/libbluetooth.a", - "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_multiprotocol_efr32xg21_gcc_release.a", - "${sdk_support_root}/platform/emdrv/nvm3/lib/libnvm3_CM33_gcc.a", - ] - - defines += [ - "EFR32MG21", - "EFR32_SERIES2_CONFIG1_MICRO", - ] } else if (silabs_family == "efr32mg24") { _include_dirs += [ "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG24/Include", @@ -606,7 +602,6 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_lfrco.c", "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_nvic.c", "${efr32_sdk_root}/platform/service/hfxo_manager/src/sl_hfxo_manager.c", - "${efr32_sdk_root}/platform/service/legacy_hal/src/token_legacy.c", "${efr32_sdk_root}/platform/service/mpu/src/sl_mpu.c", "${efr32_sdk_root}/platform/service/power_manager/src/sl_power_manager.c", "${efr32_sdk_root}/platform/service/power_manager/src/sl_power_manager_debug.c", @@ -617,9 +612,6 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/service/sleeptimer/src/sl_sleeptimer_hal_sysrtc.c", "${efr32_sdk_root}/platform/service/system/src/sl_system_init.c", "${efr32_sdk_root}/platform/service/system/src/sl_system_kernel.c", - "${efr32_sdk_root}/platform/service/token_manager/src/sl_token_def.c", - "${efr32_sdk_root}/platform/service/token_manager/src/sl_token_manager.c", - "${efr32_sdk_root}/platform/service/token_manager/src/sl_token_manufacturing.c", "${efr32_sdk_root}/platform/service/udelay/src/sl_udelay.c", "${efr32_sdk_root}/platform/service/udelay/src/sl_udelay_armv6m_gcc.S", "${efr32_sdk_root}/util/plugin/security_manager/security_manager.c", @@ -844,84 +836,12 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_lfxo_s1.c", "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM4F/port.c", ] - } else if (silabs_family == "efr32mg21") { - sources += [ - "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG21/Source/startup_efr32mg21.c", - "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG21/Source/system_efr32mg21.c", - "${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_rf_path/sl_rail_util_rf_path.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_cipher.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_entropy.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_hash.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_key_derivation.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_key_handling.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_signature.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_util.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_alt/source/sl_se_management.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/se_aes.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/se_gcm.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/se_jpake.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_protocol_crypto/src/sli_radioaes_management.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_aead.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_cipher.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_key_derivation.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_key_management.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_mac.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_opaque_driver_aead.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_opaque_driver_cipher.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_opaque_driver_mac.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_opaque_key_derivation.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_driver_cipher.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_driver_hash.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_driver_mac.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_key_derivation.c", - "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_emu_s2.c", - "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_hfrco.c", - "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_hfxo_s2.c", - "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_lfxo_s2.c", - "${efr32_sdk_root}/platform/service/hfxo_manager/src/sl_hfxo_manager_hal_s2.c", - "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure/port.c", - "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.c", - ] } else if (silabs_family == "efr32mg24") { sources += [ "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG24/Source/startup_efr32mg24.c", "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG24/Source/system_efr32mg24.c", "${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/pa_curves_efr32.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_attestation.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_cipher.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_entropy.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_hash.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_key_derivation.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_key_handling.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_signature.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_util.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/se_aes.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/se_jpake.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_protocol_crypto/src/sli_radioaes_management.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_aead.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_cipher.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_key_derivation.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_key_management.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_mac.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_opaque_driver_aead.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_opaque_driver_cipher.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_opaque_driver_mac.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_opaque_key_derivation.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_driver_aead.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_driver_cipher.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_driver_hash.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_driver_mac.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_key_derivation.c", - "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_dcdc_s2.c", - "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_dpll_s2.c", - "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_emu_s2.c", "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_hfxo_s2.c", - "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_lfxo_s2.c", - "${efr32_sdk_root}/platform/service/hfxo_manager/src/sl_hfxo_manager_hal_s2.c", - "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure/port.c", - "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.c", ] } else if (silabs_family == "mgm24") { sources += [ @@ -929,6 +849,12 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/Device/SiliconLabs/MGM24/Source/system_mgm24.c", "${efr32_sdk_root}/platform/radio/rail_lib/plugin/fem_util/sl_fem_util.c", "${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_rssi/sl_rail_util_rssi.c", + "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_hfxo_mgm24.c", + ] + } + + if (silabs_family == "mgm24" || silabs_family == "efr32mg24") { + sources += [ "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager.c", "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_attestation.c", "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_cipher.c", @@ -958,7 +884,6 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_dcdc_s2.c", "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_dpll_s2.c", "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_emu_s2.c", - "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_hfxo_mgm24.c", "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_lfxo_s2.c", "${efr32_sdk_root}/platform/service/hfxo_manager/src/sl_hfxo_manager_hal_s2.c", "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure/port.c", diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 7198be4927de21..d157cf5183082c 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -32078,7 +32078,7 @@ class TestIcdManagementClusterSuite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("idleModeInterval", value, 500UL)); + VerifyOrReturn(CheckValue("idleModeInterval", value, 2000UL)); } break; case 2: @@ -113404,7 +113404,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand { public: TestGroupKeyManagementClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestGroupKeyManagementCluster", 63, credsIssuerConfig) + TestCommand("TestGroupKeyManagementCluster", 64, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -113562,18 +113562,21 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } break; case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED)); break; case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113602,7 +113605,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 33: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113647,7 +113650,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 34: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113676,7 +113679,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 35: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113721,7 +113724,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 36: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -113730,7 +113733,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); } break; - case 37: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -113739,7 +113742,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 258U)); } break; - case 38: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -113748,7 +113751,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 259U)); } break; - case 39: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -113757,7 +113760,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 260U)); } break; - case 40: + case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -113766,7 +113769,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 261U)); } break; - case 41: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113835,7 +113838,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 42: + case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113918,7 +113921,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 43: + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113945,7 +113948,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 44: + case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -114028,13 +114031,13 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 45: + case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 46: + case 47: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; - case 47: + case 48: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType value; @@ -114055,7 +114058,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand CheckValue("groupKeySet.epochStartTime2.Value()", value.groupKeySet.epochStartTime2.Value(), 2110002ULL)); } break; - case 48: + case 49: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType value; @@ -114076,7 +114079,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand CheckValue("groupKeySet.epochStartTime2.Value()", value.groupKeySet.epochStartTime2.Value(), 2110002ULL)); } break; - case 49: + case 50: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType value; @@ -114085,7 +114088,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); } break; - case 50: + case 51: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -114140,10 +114143,10 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 51: + case 52: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 52: + case 53: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -114156,14 +114159,11 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 54: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 55: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; case 56: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -114178,6 +114178,9 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 60: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 61: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -114194,10 +114197,10 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 61: + case 62: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 62: + case 63: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -114886,7 +114889,42 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } case 28: { - LogStep(28, "Write Group Keys (invalid)"); + LogStep(28, "Write one keyset too many when already full"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 546U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\321\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 3110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\341\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 3110001ULL; + value.groupKeySet.epochKey2.SetNonNull(); + value.groupKeySet.epochKey2.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\361\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime2.SetNonNull(); + value.groupKeySet.epochStartTime2.Value() = 3110002ULL; + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 29: { + LogStep(29, "Write Group Keys (invalid)"); ListFreer listFreer; chip::app::DataModel::List value; @@ -114904,8 +114942,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 29: { - LogStep(29, "Write Group Keys (too many)"); + case 30: { + LogStep(30, "Write Group Keys (too many)"); ListFreer listFreer; chip::app::DataModel::List value; @@ -114975,8 +115013,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 30: { - LogStep(30, "Write Group Keys on alpha"); + case 31: { + LogStep(31, "Write Group Keys on alpha"); ListFreer listFreer; chip::app::DataModel::List value; @@ -115006,8 +115044,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 31: { - LogStep(31, "Write Group Keys on beta"); + case 32: { + LogStep(32, "Write Group Keys on beta"); ListFreer listFreer; chip::app::DataModel::List value; @@ -115037,28 +115075,28 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 32: { - LogStep(32, "Read Group Keys on alpha"); + case 33: { + LogStep(33, "Read Group Keys on alpha"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); } - case 33: { - LogStep(33, "Read Group Keys on alpha without fabric filtering"); + case 34: { + LogStep(34, "Read Group Keys on alpha without fabric filtering"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, false, chip::NullOptional); } - case 34: { - LogStep(34, "Read Group Keys on beta"); + case 35: { + LogStep(35, "Read Group Keys on beta"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); } - case 35: { - LogStep(35, "Read Group Keys on beta without fabric filtering"); + case 36: { + LogStep(36, "Read Group Keys on beta without fabric filtering"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, false, chip::NullOptional); } - case 36: { - LogStep(36, "Add Group 1"); + case 37: { + LogStep(37, "Add Group 1"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 257U; @@ -115067,8 +115105,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 37: { - LogStep(37, "Add Group 2"); + case 38: { + LogStep(38, "Add Group 2"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 258U; @@ -115077,8 +115115,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 38: { - LogStep(38, "Add Group 3"); + case 39: { + LogStep(39, "Add Group 3"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 259U; @@ -115087,8 +115125,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 39: { - LogStep(39, "Add Group 4"); + case 40: { + LogStep(40, "Add Group 4"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 260U; @@ -115097,8 +115135,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 40: { - LogStep(40, "Add Group 5"); + case 41: { + LogStep(41, "Add Group 5"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 261U; @@ -115107,28 +115145,28 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 41: { - LogStep(41, "Read GroupTable from alpha"); + case 42: { + LogStep(42, "Read GroupTable from alpha"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); } - case 42: { - LogStep(42, "Read GroupTable from alpha without fabric filtering"); + case 43: { + LogStep(43, "Read GroupTable from alpha without fabric filtering"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, false, chip::NullOptional); } - case 43: { - LogStep(43, "Read GroupTable from beta"); + case 44: { + LogStep(44, "Read GroupTable from beta"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); } - case 44: { - LogStep(44, "Read GroupTable from beta without fabric filtering"); + case 45: { + LogStep(45, "Read GroupTable from beta without fabric filtering"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, false, chip::NullOptional); } - case 45: { - LogStep(45, "KeySet Remove 1"); + case 46: { + LogStep(46, "KeySet Remove 1"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; value.groupKeySetID = 417U; @@ -115137,8 +115175,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 46: { - LogStep(46, "KeySet Read (removed)"); + case 47: { + LogStep(47, "KeySet Read (removed)"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; value.groupKeySetID = 417U; @@ -115147,8 +115185,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 47: { - LogStep(47, "KeySet Read (not removed) CacheAndSync"); + case 48: { + LogStep(48, "KeySet Read (not removed) CacheAndSync"); VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; @@ -115158,8 +115196,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 48: { - LogStep(48, "KeySet Read (not removed) TrustFirst"); + case 49: { + LogStep(49, "KeySet Read (not removed) TrustFirst"); VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; @@ -115169,8 +115207,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 49: { - LogStep(49, "Remove Group 1"); + case 50: { + LogStep(50, "Remove Group 1"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::RemoveGroup::Type value; value.groupID = 257U; @@ -115179,13 +115217,13 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 50: { - LogStep(50, "Read GroupTable 2"); + case 51: { + LogStep(51, "Read GroupTable 2"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); } - case 51: { - LogStep(51, "Remove All"); + case 52: { + LogStep(52, "Remove All"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveAllGroups::Id, value, @@ -115193,13 +115231,13 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 52: { - LogStep(52, "Read GroupTable 3"); + case 53: { + LogStep(53, "Read GroupTable 3"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); } - case 53: { - LogStep(53, "KeySet Remove 2"); + case 54: { + LogStep(54, "KeySet Remove 2"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; value.groupKeySetID = 418U; @@ -115208,8 +115246,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 54: { - LogStep(54, "KeySet Read (also removed)"); + case 55: { + LogStep(55, "KeySet Read (also removed)"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; value.groupKeySetID = 418U; @@ -115218,8 +115256,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 55: { - LogStep(55, "KeySet Write 1"); + case 56: { + LogStep(56, "KeySet Write 1"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; @@ -115253,8 +115291,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 56: { - LogStep(56, "KeySet Write 2 CacheAndSync"); + case 57: { + LogStep(57, "KeySet Write 2 CacheAndSync"); VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; @@ -115289,8 +115327,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 57: { - LogStep(57, "KeySet Write 2 TrustFirst"); + case 58: { + LogStep(58, "KeySet Write 2 TrustFirst"); VerifyOrDo(!ShouldSkip("!GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; @@ -115325,8 +115363,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 58: { - LogStep(58, "Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2"); + case 59: { + LogStep(59, "Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2"); ListFreer listFreer; chip::app::DataModel::List value; @@ -115352,8 +115390,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 59: { - LogStep(59, "Remove keyset 1"); + case 60: { + LogStep(60, "Remove keyset 1"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; value.groupKeySetID = 417U; @@ -115362,13 +115400,13 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 60: { - LogStep(60, "TH verifies GroupKeyMap entries for KeySet 1 have been removed"); + case 61: { + LogStep(61, "TH verifies GroupKeyMap entries for KeySet 1 have been removed"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); } - case 61: { - LogStep(61, "Remove keyset 2"); + case 62: { + LogStep(62, "Remove keyset 2"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; value.groupKeySetID = 418U; @@ -115377,8 +115415,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 62: { - LogStep(62, "TH verifies GroupKeyMap entries for KeySet 2 have been removed"); + case 63: { + LogStep(63, "TH verifies GroupKeyMap entries for KeySet 2 have been removed"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); } diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 5acafa1f5f6831..e753c024da9f07 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -43148,7 +43148,7 @@ class TestIcdManagementCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("IdleModeInterval", actualValue, 500UL)); + VerifyOrReturn(CheckValue("IdleModeInterval", actualValue, 2000UL)); } NextTest(); @@ -175828,160 +175828,164 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { err = TestKeySetReadAllIndices_27(); break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Write Group Keys (invalid)\n"); - err = TestWriteGroupKeysInvalid_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Write one keyset too many when already full\n"); + err = TestWriteOneKeysetTooManyWhenAlreadyFull_28(); break; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Write Group Keys (too many)\n"); - err = TestWriteGroupKeysTooMany_29(); + ChipLogProgress(chipTool, " ***** Test Step 29 : Write Group Keys (invalid)\n"); + err = TestWriteGroupKeysInvalid_29(); break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Write Group Keys on alpha\n"); - err = TestWriteGroupKeysOnAlpha_30(); + ChipLogProgress(chipTool, " ***** Test Step 30 : Write Group Keys (too many)\n"); + err = TestWriteGroupKeysTooMany_30(); break; case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Write Group Keys on beta\n"); - err = TestWriteGroupKeysOnBeta_31(); + ChipLogProgress(chipTool, " ***** Test Step 31 : Write Group Keys on alpha\n"); + err = TestWriteGroupKeysOnAlpha_31(); break; case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Read Group Keys on alpha\n"); - err = TestReadGroupKeysOnAlpha_32(); + ChipLogProgress(chipTool, " ***** Test Step 32 : Write Group Keys on beta\n"); + err = TestWriteGroupKeysOnBeta_32(); break; case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Read Group Keys on alpha without fabric filtering\n"); - err = TestReadGroupKeysOnAlphaWithoutFabricFiltering_33(); + ChipLogProgress(chipTool, " ***** Test Step 33 : Read Group Keys on alpha\n"); + err = TestReadGroupKeysOnAlpha_33(); break; case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Read Group Keys on beta\n"); - err = TestReadGroupKeysOnBeta_34(); + ChipLogProgress(chipTool, " ***** Test Step 34 : Read Group Keys on alpha without fabric filtering\n"); + err = TestReadGroupKeysOnAlphaWithoutFabricFiltering_34(); break; case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Read Group Keys on beta without fabric filtering\n"); - err = TestReadGroupKeysOnBetaWithoutFabricFiltering_35(); + ChipLogProgress(chipTool, " ***** Test Step 35 : Read Group Keys on beta\n"); + err = TestReadGroupKeysOnBeta_35(); break; case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Add Group 1\n"); - err = TestAddGroup1_36(); + ChipLogProgress(chipTool, " ***** Test Step 36 : Read Group Keys on beta without fabric filtering\n"); + err = TestReadGroupKeysOnBetaWithoutFabricFiltering_36(); break; case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Add Group 2\n"); - err = TestAddGroup2_37(); + ChipLogProgress(chipTool, " ***** Test Step 37 : Add Group 1\n"); + err = TestAddGroup1_37(); break; case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : Add Group 3\n"); - err = TestAddGroup3_38(); + ChipLogProgress(chipTool, " ***** Test Step 38 : Add Group 2\n"); + err = TestAddGroup2_38(); break; case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : Add Group 4\n"); - err = TestAddGroup4_39(); + ChipLogProgress(chipTool, " ***** Test Step 39 : Add Group 3\n"); + err = TestAddGroup3_39(); break; case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : Add Group 5\n"); - err = TestAddGroup5_40(); + ChipLogProgress(chipTool, " ***** Test Step 40 : Add Group 4\n"); + err = TestAddGroup4_40(); break; case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : Read GroupTable from alpha\n"); - err = TestReadGroupTableFromAlpha_41(); + ChipLogProgress(chipTool, " ***** Test Step 41 : Add Group 5\n"); + err = TestAddGroup5_41(); break; case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : Read GroupTable from alpha without fabric filtering\n"); - err = TestReadGroupTableFromAlphaWithoutFabricFiltering_42(); + ChipLogProgress(chipTool, " ***** Test Step 42 : Read GroupTable from alpha\n"); + err = TestReadGroupTableFromAlpha_42(); break; case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : Read GroupTable from beta\n"); - err = TestReadGroupTableFromBeta_43(); + ChipLogProgress(chipTool, " ***** Test Step 43 : Read GroupTable from alpha without fabric filtering\n"); + err = TestReadGroupTableFromAlphaWithoutFabricFiltering_43(); break; case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : Read GroupTable from beta without fabric filtering\n"); - err = TestReadGroupTableFromBetaWithoutFabricFiltering_44(); + ChipLogProgress(chipTool, " ***** Test Step 44 : Read GroupTable from beta\n"); + err = TestReadGroupTableFromBeta_44(); break; case 45: - ChipLogProgress(chipTool, " ***** Test Step 45 : KeySet Remove 1\n"); - err = TestKeySetRemove1_45(); + ChipLogProgress(chipTool, " ***** Test Step 45 : Read GroupTable from beta without fabric filtering\n"); + err = TestReadGroupTableFromBetaWithoutFabricFiltering_45(); break; case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : KeySet Read (removed)\n"); - err = TestKeySetReadRemoved_46(); + ChipLogProgress(chipTool, " ***** Test Step 46 : KeySet Remove 1\n"); + err = TestKeySetRemove1_46(); break; case 47: - ChipLogProgress(chipTool, " ***** Test Step 47 : KeySet Read (not removed) CacheAndSync\n"); + ChipLogProgress(chipTool, " ***** Test Step 47 : KeySet Read (removed)\n"); + err = TestKeySetReadRemoved_47(); + break; + case 48: + ChipLogProgress(chipTool, " ***** Test Step 48 : KeySet Read (not removed) CacheAndSync\n"); if (ShouldSkip("GRPKEY.S.F00")) { NextTest(); return; } - err = TestKeySetReadNotRemovedCacheAndSync_47(); + err = TestKeySetReadNotRemovedCacheAndSync_48(); break; - case 48: - ChipLogProgress(chipTool, " ***** Test Step 48 : KeySet Read (not removed) TrustFirst\n"); + case 49: + ChipLogProgress(chipTool, " ***** Test Step 49 : KeySet Read (not removed) TrustFirst\n"); if (ShouldSkip("GRPKEY.S.F00")) { NextTest(); return; } - err = TestKeySetReadNotRemovedTrustFirst_48(); - break; - case 49: - ChipLogProgress(chipTool, " ***** Test Step 49 : Remove Group 1\n"); - err = TestRemoveGroup1_49(); + err = TestKeySetReadNotRemovedTrustFirst_49(); break; case 50: - ChipLogProgress(chipTool, " ***** Test Step 50 : Read GroupTable 2\n"); - err = TestReadGroupTable2_50(); + ChipLogProgress(chipTool, " ***** Test Step 50 : Remove Group 1\n"); + err = TestRemoveGroup1_50(); break; case 51: - ChipLogProgress(chipTool, " ***** Test Step 51 : Remove All\n"); - err = TestRemoveAll_51(); + ChipLogProgress(chipTool, " ***** Test Step 51 : Read GroupTable 2\n"); + err = TestReadGroupTable2_51(); break; case 52: - ChipLogProgress(chipTool, " ***** Test Step 52 : Read GroupTable 3\n"); - err = TestReadGroupTable3_52(); + ChipLogProgress(chipTool, " ***** Test Step 52 : Remove All\n"); + err = TestRemoveAll_52(); break; case 53: - ChipLogProgress(chipTool, " ***** Test Step 53 : KeySet Remove 2\n"); - err = TestKeySetRemove2_53(); + ChipLogProgress(chipTool, " ***** Test Step 53 : Read GroupTable 3\n"); + err = TestReadGroupTable3_53(); break; case 54: - ChipLogProgress(chipTool, " ***** Test Step 54 : KeySet Read (also removed)\n"); - err = TestKeySetReadAlsoRemoved_54(); + ChipLogProgress(chipTool, " ***** Test Step 54 : KeySet Remove 2\n"); + err = TestKeySetRemove2_54(); break; case 55: - ChipLogProgress(chipTool, " ***** Test Step 55 : KeySet Write 1\n"); - err = TestKeySetWrite1_55(); + ChipLogProgress(chipTool, " ***** Test Step 55 : KeySet Read (also removed)\n"); + err = TestKeySetReadAlsoRemoved_55(); break; case 56: - ChipLogProgress(chipTool, " ***** Test Step 56 : KeySet Write 2 CacheAndSync\n"); + ChipLogProgress(chipTool, " ***** Test Step 56 : KeySet Write 1\n"); + err = TestKeySetWrite1_56(); + break; + case 57: + ChipLogProgress(chipTool, " ***** Test Step 57 : KeySet Write 2 CacheAndSync\n"); if (ShouldSkip("GRPKEY.S.F00")) { NextTest(); return; } - err = TestKeySetWrite2CacheAndSync_56(); + err = TestKeySetWrite2CacheAndSync_57(); break; - case 57: - ChipLogProgress(chipTool, " ***** Test Step 57 : KeySet Write 2 TrustFirst\n"); + case 58: + ChipLogProgress(chipTool, " ***** Test Step 58 : KeySet Write 2 TrustFirst\n"); if (ShouldSkip("!GRPKEY.S.F00")) { NextTest(); return; } - err = TestKeySetWrite2TrustFirst_57(); - break; - case 58: - ChipLogProgress(chipTool, " ***** Test Step 58 : Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2\n"); - err = TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_58(); + err = TestKeySetWrite2TrustFirst_58(); break; case 59: - ChipLogProgress(chipTool, " ***** Test Step 59 : Remove keyset 1\n"); - err = TestRemoveKeyset1_59(); + ChipLogProgress(chipTool, " ***** Test Step 59 : Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2\n"); + err = TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_59(); break; case 60: - ChipLogProgress(chipTool, " ***** Test Step 60 : TH verifies GroupKeyMap entries for KeySet 1 have been removed\n"); - err = TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_60(); + ChipLogProgress(chipTool, " ***** Test Step 60 : Remove keyset 1\n"); + err = TestRemoveKeyset1_60(); break; case 61: - ChipLogProgress(chipTool, " ***** Test Step 61 : Remove keyset 2\n"); - err = TestRemoveKeyset2_61(); + ChipLogProgress(chipTool, " ***** Test Step 61 : TH verifies GroupKeyMap entries for KeySet 1 have been removed\n"); + err = TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_61(); break; case 62: - ChipLogProgress(chipTool, " ***** Test Step 62 : TH verifies GroupKeyMap entries for KeySet 2 have been removed\n"); - err = TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_62(); + ChipLogProgress(chipTool, " ***** Test Step 62 : Remove keyset 2\n"); + err = TestRemoveKeyset2_62(); + break; + case 63: + ChipLogProgress(chipTool, " ***** Test Step 63 : TH verifies GroupKeyMap entries for KeySet 2 have been removed\n"); + err = TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_63(); break; } @@ -176079,13 +176083,13 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED)); break; case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -176133,10 +176137,10 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; case 48: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -176157,10 +176161,10 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 54: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 55: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; case 56: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -176183,6 +176187,9 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { case 62: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 63: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -176196,7 +176203,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 63; + const uint16_t mTestCount = 64; chip::Optional mNodeId; chip::Optional mCluster; @@ -177185,7 +177192,50 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteGroupKeysInvalid_28() + CHIP_ERROR TestWriteOneKeysetTooManyWhenAlreadyFull_28() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:546U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\321\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:3110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\341\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:3110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\361\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:3110002ULL]; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Write one keyset too many when already full Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWriteGroupKeysInvalid_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177220,7 +177270,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteGroupKeysTooMany_29() + CHIP_ERROR TestWriteGroupKeysTooMany_30() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177320,7 +177370,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteGroupKeysOnAlpha_30() + CHIP_ERROR TestWriteGroupKeysOnAlpha_31() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177366,7 +177416,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteGroupKeysOnBeta_31() + CHIP_ERROR TestWriteGroupKeysOnBeta_32() { MTRBaseDevice * device = GetDevice("beta"); @@ -177412,7 +177462,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupKeysOnAlpha_32() + CHIP_ERROR TestReadGroupKeysOnAlpha_33() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177474,7 +177524,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupKeysOnAlphaWithoutFabricFiltering_33() + CHIP_ERROR TestReadGroupKeysOnAlphaWithoutFabricFiltering_34() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177568,7 +177618,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupKeysOnBeta_34() + CHIP_ERROR TestReadGroupKeysOnBeta_35() { MTRBaseDevice * device = GetDevice("beta"); @@ -177630,7 +177680,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupKeysOnBetaWithoutFabricFiltering_35() + CHIP_ERROR TestReadGroupKeysOnBetaWithoutFabricFiltering_36() { MTRBaseDevice * device = GetDevice("beta"); @@ -177724,7 +177774,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup1_36() + CHIP_ERROR TestAddGroup1_37() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177756,7 +177806,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup2_37() + CHIP_ERROR TestAddGroup2_38() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177788,7 +177838,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup3_38() + CHIP_ERROR TestAddGroup3_39() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177820,7 +177870,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup4_39() + CHIP_ERROR TestAddGroup4_40() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177852,7 +177902,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup5_40() + CHIP_ERROR TestAddGroup5_41() { MTRBaseDevice * device = GetDevice("beta"); @@ -177884,7 +177934,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromAlpha_41() + CHIP_ERROR TestReadGroupTableFromAlpha_42() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177973,7 +178023,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromAlphaWithoutFabricFiltering_42() + CHIP_ERROR TestReadGroupTableFromAlphaWithoutFabricFiltering_43() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178077,7 +178127,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromBeta_43() + CHIP_ERROR TestReadGroupTableFromBeta_44() { MTRBaseDevice * device = GetDevice("beta"); @@ -178121,7 +178171,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromBetaWithoutFabricFiltering_44() + CHIP_ERROR TestReadGroupTableFromBetaWithoutFabricFiltering_45() { MTRBaseDevice * device = GetDevice("beta"); @@ -178225,7 +178275,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetRemove1_45() + CHIP_ERROR TestKeySetRemove1_46() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178248,7 +178298,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadRemoved_46() + CHIP_ERROR TestKeySetReadRemoved_47() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178275,7 +178325,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadNotRemovedCacheAndSync_47() + CHIP_ERROR TestKeySetReadNotRemovedCacheAndSync_48() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178326,7 +178376,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadNotRemovedTrustFirst_48() + CHIP_ERROR TestKeySetReadNotRemovedTrustFirst_49() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178377,7 +178427,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveGroup1_49() + CHIP_ERROR TestRemoveGroup1_50() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178408,7 +178458,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTable2_50() + CHIP_ERROR TestReadGroupTable2_51() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178482,7 +178532,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveAll_51() + CHIP_ERROR TestRemoveAll_52() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178500,7 +178550,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTable3_52() + CHIP_ERROR TestReadGroupTable3_53() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178529,7 +178579,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetRemove2_53() + CHIP_ERROR TestKeySetRemove2_54() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178552,7 +178602,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadAlsoRemoved_54() + CHIP_ERROR TestKeySetReadAlsoRemoved_55() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178579,7 +178629,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite1_55() + CHIP_ERROR TestKeySetWrite1_56() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178619,7 +178669,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite2CacheAndSync_56() + CHIP_ERROR TestKeySetWrite2CacheAndSync_57() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178659,7 +178709,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite2TrustFirst_57() + CHIP_ERROR TestKeySetWrite2TrustFirst_58() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178699,7 +178749,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_58() + CHIP_ERROR TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_59() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178740,7 +178790,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveKeyset1_59() + CHIP_ERROR TestRemoveKeyset1_60() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178763,7 +178813,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_60() + CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_61() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178801,7 +178851,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveKeyset2_61() + CHIP_ERROR TestRemoveKeyset2_62() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178824,7 +178874,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_62() + CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_63() { MTRBaseDevice * device = GetDevice("alpha");