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/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index c4c164f880cd0c..5ccb16bfab073a 100644 --- a/.github/workflows/examples-ameba.yaml +++ b/.github/workflows/examples-ameba.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ameba:1 + image: ghcr.io/project-chip/chip-build-ameba:4 options: --user root steps: diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 685a641e5a552a..b0e3eef9b3cbe7 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -67,7 +67,7 @@ jobs: "./scripts/build/build_examples.py \ --enable-flashbundle \ --target efr32-brd4187c-thermostat-openthread_mtd \ - --target efr32-brd4187c-switch-sed-shell-use_ot_coap_lib \ + --target efr32-brd4187c-switch-shell-use_ot_coap_lib \ --target efr32-brd4187c-unit-test \ build \ --copy-artifacts-to out/artifacts \ @@ -81,7 +81,7 @@ jobs: --enable-flashbundle \ --target efr32-brd4187c-light-use_ot_lib \ --target efr32-brd4187c-pump \ - --target efr32-brd4187c-lock-rpc-shell-enable_heap_monitoring \ + --target efr32-brd4187c-lock-shell-enable_heap_monitoring \ build \ --copy-artifacts-to out/artifacts \ " 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/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index dfda6287ccb60e..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() 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/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/ameba/README.md b/examples/all-clusters-app/ameba/README.md index d02447ebfb6330..cb07a50deba7e1 100644 --- a/examples/all-clusters-app/ameba/README.md +++ b/examples/all-clusters-app/ameba/README.md @@ -27,11 +27,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:1 + $ docker pull ghcr.io/project-chip/chip-build-ameba:4 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:1 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 - Setup build environment: 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..1df3180dada7bf 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 @@ -113,6 +115,7 @@ class ExampleDeviceInstanceInfoProvider : public DeviceInstanceInfoProvider public: void Init(DeviceInstanceInfoProvider * defaultProvider) { mDefaultProvider = defaultProvider; } + CHIP_ERROR GetDeviceName(char * buf, size_t bufSize) override { return mDefaultProvider->GetDeviceName(buf, bufSize); } CHIP_ERROR GetVendorName(char * buf, size_t bufSize) override { return mDefaultProvider->GetVendorName(buf, bufSize); } CHIP_ERROR GetVendorId(uint16_t & vendorId) override { return mDefaultProvider->GetVendorId(vendorId); } CHIP_ERROR GetProductName(char * buf, size_t bufSize) override { return mDefaultProvider->GetProductName(buf, bufSize); } @@ -205,6 +208,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/ameba/README.md b/examples/all-clusters-minimal-app/ameba/README.md index 21d7c94f4859f0..f4ae242ea0aa05 100644 --- a/examples/all-clusters-minimal-app/ameba/README.md +++ b/examples/all-clusters-minimal-app/ameba/README.md @@ -27,13 +27,13 @@ The CHIP demo application is supported on - Pull docker image: ``` - $ docker pull ghcr.io/project-chip/chip-build-ameba:1 + $ docker pull ghcr.io/project-chip/chip-build-ameba:4 ``` - Run docker container: ``` - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:1 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 ``` - Setup build environment: 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.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index 3fa94f796969e9..b52350856139ab 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1215,58 +1215,6 @@ server cluster EthernetNetworkDiagnostics = 55 { command ResetCounts(): 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 { @@ -1556,12 +1504,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - 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; @@ -1780,13 +1722,6 @@ endpoint 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; diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap index 05a923ced5d212..d487930194b61e 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": [ { @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4642,7 +4642,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", @@ -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.matter b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter index a10059b8f5d77d..37d8723570e27f 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter @@ -682,58 +682,6 @@ server cluster GeneralDiagnostics = 51 { 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 { @@ -1807,12 +1755,6 @@ server cluster RadonConcentrationMeasurement = 1071 { 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; @@ -1905,13 +1847,6 @@ endpoint 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; 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..9f584e99db4640 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 @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 3, "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, @@ -198,7 +224,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4645,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", @@ -5394,7 +5420,33 @@ ] }, { + "id": 7, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 45, + "code": 45, + "profileId": 259, + "label": "MA-air-purifier", + "name": "MA-air-purifier" + }, + "deviceTypes": [ + { + "id": 45, + "code": 45, + "profileId": 259, + "label": "MA-air-purifier", + "name": "MA-air-purifier" + } + ], + "deviceTypeRefs": [ + 45 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 45 + ], "deviceTypeName": "MA-air-purifier", "deviceTypeCode": 45, "deviceTypeProfileId": 259, @@ -10884,7 +10936,33 @@ ] }, { + "id": 4, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 46, + "code": 44, + "profileId": 259, + "label": "MA-air-quality-sensor", + "name": "MA-air-quality-sensor" + }, + "deviceTypes": [ + { + "id": 46, + "code": 44, + "profileId": 259, + "label": "MA-air-quality-sensor", + "name": "MA-air-quality-sensor" + } + ], + "deviceTypeRefs": [ + 46 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 44 + ], "deviceTypeName": "MA-air-quality-sensor", "deviceTypeCode": 44, "deviceTypeProfileId": 259, @@ -11136,7 +11214,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11152,7 +11230,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11168,7 +11246,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11184,7 +11262,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11200,7 +11278,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11216,7 +11294,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11232,7 +11310,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11248,7 +11326,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11264,7 +11342,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15138,7 +15216,33 @@ ] }, { + "id": 6, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 24, + "code": 770, + "profileId": 259, + "label": "MA-tempsensor", + "name": "MA-tempsensor" + }, + "deviceTypes": [ + { + "id": 24, + "code": 770, + "profileId": 259, + "label": "MA-tempsensor", + "name": "MA-tempsensor" + } + ], + "deviceTypeRefs": [ + 24 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 770 + ], "deviceTypeName": "MA-tempsensor", "deviceTypeCode": 770, "deviceTypeProfileId": 259, @@ -15784,7 +15888,33 @@ ] }, { + "id": 5, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 27, + "code": 775, + "profileId": 259, + "label": "MA-humiditysensor", + "name": "MA-humiditysensor" + }, + "deviceTypes": [ + { + "id": 27, + "code": 775, + "profileId": 259, + "label": "MA-humiditysensor", + "name": "MA-humiditysensor" + } + ], + "deviceTypeRefs": [ + 27 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 775 + ], "deviceTypeName": "MA-humiditysensor", "deviceTypeCode": 775, "deviceTypeProfileId": 259, @@ -16430,7 +16560,33 @@ ] }, { + "id": 8, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 34, + "code": 769, + "profileId": 259, + "label": "MA-thermostat", + "name": "MA-thermostat" + }, + "deviceTypes": [ + { + "id": 34, + "code": 769, + "profileId": 259, + "label": "MA-thermostat", + "name": "MA-thermostat" + } + ], + "deviceTypeRefs": [ + 34 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 769 + ], "deviceTypeName": "MA-thermostat", "deviceTypeCode": 769, "deviceTypeProfileId": 259, @@ -17928,54 +18084,42 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 45 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 2, "profileId": 259, "endpointId": 2, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 44 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 3, "profileId": 259, "endpointId": 3, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 770 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 4, "profileId": 259, "endpointId": 4, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 775 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 5, "profileId": 259, "endpointId": 5, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 769 + "networkId": 0 } ], "log": [] diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter index 169129dd542a12..3c51ea71c7b222 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter @@ -33,75 +33,6 @@ struct OperationalStateStruct { optional char_string<64> operationalStateLabel = 1; } -/** 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 { @@ -915,58 +846,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): 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 { @@ -1587,12 +1466,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - 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; @@ -1721,13 +1594,6 @@ endpoint 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; diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap index 49051bc9b0e123..711eaeb3fd40a2 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 10, "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, @@ -198,7 +224,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4645,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", @@ -5394,7 +5420,33 @@ ] }, { + "id": 9, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 37, + "code": 40, + "profileId": 259, + "label": "MA-basic-videoplayer", + "name": "MA-basic-videoplayer" + }, + "deviceTypes": [ + { + "id": 37, + "code": 40, + "profileId": 259, + "label": "MA-basic-videoplayer", + "name": "MA-basic-videoplayer" + } + ], + "deviceTypeRefs": [ + 37 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 40 + ], "deviceTypeName": "MA-basic-videoplayer", "deviceTypeCode": 40, "deviceTypeProfileId": 259, @@ -7488,18 +7540,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 40 + "networkId": 0 } ], "log": [] diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index d4ed8ae7833f32..ed53816698d54f 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -1537,12 +1537,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - 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; diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap index 5cfbf082e43abd..640d0f39b6d6a0 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": [ { @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index e757bfca40c244..69106c33cf137b 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -929,58 +929,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): 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 { @@ -1246,12 +1194,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - 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; @@ -1380,13 +1322,6 @@ endpoint 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; diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap index e89aecd12781ae..9eac9221ebe424 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": [ { @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", @@ -6319,5 +6319,6 @@ "endpointVersion": 1, "deviceIdentifier": 21 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index ecddba32229e2a..8ee5b39e03d3e4 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1079,58 +1079,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): 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 { @@ -1420,12 +1368,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - 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; @@ -1556,13 +1498,6 @@ endpoint 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; diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap index 7fba5c4134daf5..18900740bf7806 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": [ { @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4667,7 +4667,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", @@ -7539,5 +7539,6 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index cb7af5398cb2d9..85f6c9bb9a5be1 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -929,58 +929,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): 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 { @@ -1718,12 +1666,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - 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; @@ -1852,13 +1794,6 @@ endpoint 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; diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap index 5a46308f437617..fdfffe135b50bd 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": [ { @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", @@ -9312,5 +9312,6 @@ "endpointVersion": 1, "deviceIdentifier": 10 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index cd0309d8576232..25ac0f188072b3 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -1079,58 +1079,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): 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 { @@ -1649,12 +1597,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - 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; @@ -1783,13 +1725,6 @@ endpoint 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; diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap index 79e9cc632850e1..acc303bb710b01 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": [ { @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", @@ -8609,5 +8609,6 @@ "endpointVersion": 1, "deviceIdentifier": 269 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter index 5253394dac1473..2f2fb298b4d5aa 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter @@ -916,58 +916,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): 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 { @@ -1288,12 +1236,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - 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; @@ -1423,13 +1365,6 @@ endpoint 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; diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap index 321bbb3b20bf07..011ff039daa3ac 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": [ { @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4667,7 +4667,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index 5f7dc401654574..6c8e865f26610f 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -148,75 +148,6 @@ client cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** 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; -} - /** 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 { @@ -1004,58 +935,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): 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 { @@ -1320,12 +1199,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - 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; @@ -1454,13 +1327,6 @@ endpoint 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; diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap index 886a475473db1f..59abbd4ae12012 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": [ { @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", @@ -6367,5 +6367,6 @@ "endpointVersion": 1, "deviceIdentifier": 774 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index 5c16ff4316165a..d57906a51bf465 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -1073,58 +1073,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): 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 { @@ -1598,12 +1546,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - 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; @@ -1732,13 +1674,6 @@ endpoint 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; diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap index 945ddd6d1e5ce8..66561779d4cd88 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": [ { @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index 282e57cb787065..a37d8142cff436 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -148,75 +148,6 @@ client cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** 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; -} - /** 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 { @@ -1004,58 +935,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): 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 { @@ -1320,12 +1199,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - 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; @@ -1454,13 +1327,6 @@ endpoint 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; diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap index b978f4ec63924f..250d24c35eb7cc 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": [ { @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", @@ -6367,5 +6367,6 @@ "endpointVersion": 1, "deviceIdentifier": 775 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index 60663594687e76..828bede7d73b36 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -148,75 +148,6 @@ client cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** 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; -} - /** 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 { @@ -1004,58 +935,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): 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 { @@ -1325,12 +1204,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - 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; @@ -1459,13 +1332,6 @@ endpoint 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; diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap index f9afc87acb29fe..019a4617f0a72c 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": [ { @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", @@ -6383,5 +6383,6 @@ "endpointVersion": 1, "deviceIdentifier": 262 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index 159d6df5d0c559..64035c5820d1aa 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -148,75 +148,6 @@ client cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** 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; -} - /** 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 { @@ -1004,58 +935,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): 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 { @@ -1336,12 +1215,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - 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; @@ -1470,13 +1343,6 @@ endpoint 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; diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap index 3afbcce18145ec..e08e37d82df559 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": [ { @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", @@ -6495,5 +6495,6 @@ "endpointVersion": 1, "deviceIdentifier": 263 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index 82a253ba91ab62..26e8c6a26c324a 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -1079,58 +1079,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): 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 { @@ -1381,12 +1329,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - 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; @@ -1515,13 +1457,6 @@ endpoint 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; diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap index 936482b5b5f361..9fc7b0e9296203 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": [ { @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", @@ -7491,5 +7491,6 @@ "endpointVersion": 1, "deviceIdentifier": 256 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index 3e3de2c710e365..c3ba8a911d9e97 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -1043,58 +1043,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): 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 { @@ -1345,12 +1293,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - 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; @@ -1479,13 +1421,6 @@ endpoint 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; diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap index 0f1824d8ea2bea..20c1653ac2ea07 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": [ { @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", @@ -7491,5 +7491,6 @@ "endpointVersion": 1, "deviceIdentifier": 259 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index 0f341394b711b3..4b7cc83be7cd9e 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -978,58 +978,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): 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 { @@ -1280,12 +1228,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - 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; @@ -1414,13 +1356,6 @@ endpoint 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; diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap index fbecf55ef040e4..68ea6f87083982 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": [ { @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", @@ -7167,5 +7167,6 @@ "endpointVersion": 1, "deviceIdentifier": 266 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index eadffeffcfd559..1155193e3cd3d5 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -148,75 +148,6 @@ client cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** 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; -} - /** 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 { @@ -1004,58 +935,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): 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 { @@ -1339,12 +1218,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - 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; @@ -1473,13 +1346,6 @@ endpoint 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; diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap index bc3b79d37dc51b..ad8e1134b6a71a 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": [ { @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", @@ -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 index 8fb00caaadd6a7..e1df348a9052ab 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter @@ -801,58 +801,6 @@ server cluster GeneralDiagnostics = 51 { 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 { @@ -1247,12 +1195,6 @@ server cluster RvcOperationalState = 97 { 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; @@ -1345,13 +1287,6 @@ endpoint 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; diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap index 237921c27cd1ca..6e71a2c6cb74e1 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", @@ -7042,7 +7042,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7390,7 +7390,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7406,7 +7406,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7422,7 +7422,7 @@ "side": "server", "type": "int8u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7438,7 +7438,7 @@ "side": "server", "type": "int8u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7454,7 +7454,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7470,7 +7470,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7486,7 +7486,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7502,7 +7502,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7622,7 +7622,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7638,7 +7638,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7654,7 +7654,7 @@ "side": "server", "type": "int8u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7670,7 +7670,7 @@ "side": "server", "type": "int8u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7686,7 +7686,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7702,7 +7702,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7718,7 +7718,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7734,7 +7734,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7862,7 +7862,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7878,7 +7878,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7894,7 +7894,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7910,7 +7910,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7926,7 +7926,7 @@ "side": "server", "type": "enum8", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7942,7 +7942,7 @@ "side": "server", "type": "ErrorStateStruct", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7958,7 +7958,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7974,7 +7974,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7990,7 +7990,7 @@ "side": "server", "type": "array", "included": 1, - "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": "", 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.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index d452974aac5c8e..ef5096d4182ecb 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -73,75 +73,6 @@ server cluster Identify = 3 { command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; } -/** 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 { @@ -1073,58 +1004,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): 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 { @@ -1375,12 +1254,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - 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; @@ -1509,13 +1382,6 @@ endpoint 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; diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap index 2a6dbf5b9ce81d..8b4cbf9a609dee 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": [ { @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", @@ -6599,5 +6599,6 @@ "endpointVersion": 1, "deviceIdentifier": 34 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index b4eb0ec4c22094..1fc82bcf1508b8 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -148,75 +148,6 @@ client cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** 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; -} - /** 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 { @@ -1004,58 +935,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): 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 { @@ -1319,12 +1198,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - 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; @@ -1453,13 +1326,6 @@ endpoint 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; diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap index f1dbfdd711a930..5f512e7848cbef 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": [ { @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", @@ -6367,5 +6367,6 @@ "endpointVersion": 1, "deviceIdentifier": 770 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 57f3f09d4a4963..45831b2a87159b 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -929,58 +929,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): 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 { @@ -1499,12 +1447,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - 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; @@ -1633,13 +1575,6 @@ endpoint 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; diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap index 4ab16c9f1ee7b1..6e6f841d558dd1 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": [ { @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4667,7 +4667,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", @@ -7847,5 +7847,6 @@ "endpointVersion": 1, "deviceIdentifier": 769 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index a5e2ad2299635d..8bae0ae4946a79 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -929,58 +929,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): 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 { @@ -1375,12 +1323,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - 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; @@ -1509,13 +1451,6 @@ endpoint 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; diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap index df025f16b7344f..56e76d3ce58aab 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": [ { @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", @@ -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..f74e712a6b4ff5 100644 --- a/examples/chef/devices/template.zap +++ b/examples/chef/devices/template.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,33 @@ ], "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, @@ -198,7 +224,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4645,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", @@ -5394,7 +5420,33 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 52, + "code": 0, + "profileId": 259, + "label": "MA-all-clusters-app", + "name": "MA-all-clusters-app" + }, + "deviceTypes": [ + { + "id": 52, + "code": 0, + "profileId": 259, + "label": "MA-all-clusters-app", + "name": "MA-all-clusters-app" + } + ], + "deviceTypeRefs": [ + 52 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 0 + ], "deviceTypeName": "MA-all-clusters-app", "deviceTypeCode": 0, "deviceTypeProfileId": 259, @@ -5478,7 +5530,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5494,7 +5546,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5538,7 +5590,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5742,7 +5794,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5786,7 +5838,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6010,11 +6062,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 +6082,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6046,7 +6098,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6062,7 +6114,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6078,7 +6130,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6122,7 +6174,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6138,7 +6190,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6154,7 +6206,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6170,7 +6222,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6186,7 +6238,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6392,7 +6444,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6408,7 +6460,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6424,7 +6476,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6440,7 +6492,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6610,7 +6662,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6830,7 +6882,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6846,7 +6898,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6862,7 +6914,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6878,7 +6930,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6998,7 +7050,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7014,7 +7066,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7030,7 +7082,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7074,7 +7126,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7238,7 +7290,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8006,7 +8058,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8022,7 +8074,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8038,7 +8090,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8054,7 +8106,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8332,7 +8384,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8348,7 +8400,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8364,7 +8416,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8380,7 +8432,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8630,7 +8682,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8678,7 +8730,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8694,7 +8746,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8726,7 +8778,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x01", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8742,7 +8794,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8758,7 +8810,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8774,7 +8826,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8790,7 +8842,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8806,7 +8858,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8822,7 +8874,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8838,7 +8890,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8854,7 +8906,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8870,7 +8922,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8886,7 +8938,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8902,7 +8954,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8918,7 +8970,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8934,7 +8986,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8950,7 +9002,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8966,7 +9018,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8982,7 +9034,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8998,7 +9050,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9014,7 +9066,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9030,7 +9082,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9046,7 +9098,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9062,7 +9114,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9078,7 +9130,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9094,7 +9146,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9110,7 +9162,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9126,7 +9178,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9142,7 +9194,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9158,7 +9210,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9174,7 +9226,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9190,7 +9242,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9206,7 +9258,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9222,7 +9274,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9238,7 +9290,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9254,7 +9306,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x01", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9270,7 +9322,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9286,7 +9338,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9302,7 +9354,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0019", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9350,7 +9402,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9366,7 +9418,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9382,7 +9434,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0xFEFF", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9398,7 +9450,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9414,7 +9466,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9426,7 +9478,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9442,7 +9494,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9458,7 +9510,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9474,7 +9526,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9638,7 +9690,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9654,7 +9706,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9670,7 +9722,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9686,7 +9738,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10062,18 +10114,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 0 + "networkId": 0 } ], "log": [] diff --git a/examples/chef/sample_app_util/matter_device_types.json b/examples/chef/sample_app_util/matter_device_types.json index 9d14653828d7fc..53b418e1fc916d 100644 --- a/examples/chef/sample_app_util/matter_device_types.json +++ b/examples/chef/sample_app_util/matter_device_types.json @@ -42,5 +42,6 @@ "Mode Select": 39, "Air Purifier": 45, "Air Quality Sensor": 44, - "Robotic Vacuum Cleaner": 116 + "Robotic Vacuum Cleaner": 116, + "Room Air Conditioner": 114 } 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/ameba/README.md b/examples/light-switch-app/ameba/README.md index 03ee7caacb0447..8c45c2ee225d0c 100644 --- a/examples/light-switch-app/ameba/README.md +++ b/examples/light-switch-app/ameba/README.md @@ -26,11 +26,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:1 + $ docker pull ghcr.io/project-chip/chip-build-ameba:4 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:1 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 - Setup build environment: 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/ameba/README.md b/examples/lighting-app/ameba/README.md index bd764b23558643..8297c2a3bb2dbc 100644 --- a/examples/lighting-app/ameba/README.md +++ b/examples/lighting-app/ameba/README.md @@ -23,11 +23,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:1 + $ docker pull ghcr.io/project-chip/chip-build-ameba:4 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:1 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 - Setup build environment: 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/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.matter b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter index 89681a67ce9e42..2745e2fd4d5092 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -1914,53 +1914,6 @@ 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 access(read: administer) MonitoringRegistrationStruct registeredClients[] = 3; - readonly attribute access(read: administer) int32u ICDCounter = 4; - readonly attribute int16u clientsSupportedPerFabric = 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 RegisterClientRequest { - node_id checkInNodeID = 0; - INT64U monitoredSubject = 1; - OCTET_STRING<16> key = 2; - optional OCTET_STRING<16> verificationKey = 3; - } - - request struct UnregisterClientRequest { - node_id checkInNodeID = 0; - optional OCTET_STRING<16> verificationKey = 1; - } - - response struct RegisterClientResponse = 1 { - INT32U ICDCounter = 0; - } - - fabric command access(invoke: manage) RegisterClient(RegisterClientRequest): RegisterClientResponse = 0; - fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2; - command access(invoke: manage) StayActiveRequest(): DefaultSuccess = 3; -} - /** Attributes and commands for controlling the color properties of a color-capable light. */ server cluster ColorControl = 768 { enum ColorLoopAction : ENUM8 { @@ -2463,20 +2416,6 @@ 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; - callback attribute registeredClients; - callback attribute ICDCounter; - callback attribute clientsSupportedPerFabric default = 1; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 1; - ram attribute clusterRevision default = 1; - } } endpoint 1 { device type dimmablelight = 257, version 1; 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..77ce7f1f3b2077 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": [ { @@ -33,7 +33,33 @@ ], "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, @@ -5555,7 +5581,7 @@ "mfgCode": null, "define": "ICD_MANAGEMENT_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "RegisterClientResponse", @@ -5574,7 +5600,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "500", @@ -5590,7 +5616,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "300", @@ -5606,7 +5632,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "300", @@ -5638,7 +5664,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5654,7 +5680,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -5764,7 +5790,33 @@ ] }, { + "id": 2, "name": "MA-dimmablelight", + "deviceTypeRef": { + "id": 9, + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + }, + "deviceTypes": [ + { + "id": 9, + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + } + ], + "deviceTypeRefs": [ + 9 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 257 + ], "deviceTypeName": "MA-dimmablelight", "deviceTypeCode": 257, "deviceTypeProfileId": 259, @@ -7760,7 +7812,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9103,18 +9155,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "MA-dimmablelight", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 257 + "networkId": 0 } ], "log": [] 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 dc5fa500b03434..a6aded6af0065c 100644 --- a/examples/lock-app/esp32/main/CMakeLists.txt +++ b/examples/lock-app/esp32/main/CMakeLists.txt @@ -50,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" @@ -74,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) @@ -162,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" @@ -189,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/ameba/README.md b/examples/ota-requestor-app/ameba/README.md index cb175df24d9116..534db2f8b18b62 100644 --- a/examples/ota-requestor-app/ameba/README.md +++ b/examples/ota-requestor-app/ameba/README.md @@ -6,11 +6,11 @@ A prototype application that demonstrates OTA Requestor capabilities. - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:1 + $ docker pull ghcr.io/project-chip/chip-build-ameba:4 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:1 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 - Setup build environment: 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/ameba/README.md b/examples/pigweed-app/ameba/README.md index 77ea1e196429f7..4f6ed1830b6cce 100644 --- a/examples/pigweed-app/ameba/README.md +++ b/examples/pigweed-app/ameba/README.md @@ -31,11 +31,11 @@ following features are available: - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:1 + $ docker pull ghcr.io/project-chip/chip-build-ameba:4 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:1 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 - Setup build environment: diff --git a/examples/pigweed-app/ameba/chip_main.cmake b/examples/pigweed-app/ameba/chip_main.cmake index e18ecb62bdf48c..1f0db465a6878b 100644 --- a/examples/pigweed-app/ameba/chip_main.cmake +++ b/examples/pigweed-app/ameba/chip_main.cmake @@ -100,9 +100,9 @@ list( APPEND chip_main_cpp_flags -Wno-unused-parameter - -std=gnu++17 + -std=c++17 -fno-rtti - -fno-use-cxa-atexit + -fno-use-cxa-atexit ) target_compile_definitions(${chip_main} PRIVATE ${chip_main_flags} ) target_compile_options(${chip_main} PRIVATE ${chip_main_cpp_flags}) 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/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/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/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 6b5e738e874668..dfab429dbd9f0a 100644 --- a/integrations/docker/images/base/chip-build/version +++ b/integrations/docker/images/base/chip-build/version @@ -1 +1 @@ -2 : Update esp-idf to v5.1 and remove few pinned package version +5 : Use west to download the K32W0 SDK diff --git a/integrations/docker/images/stage-2/chip-build-ameba/Dockerfile b/integrations/docker/images/stage-2/chip-build-ameba/Dockerfile index 07f8118b5f004d..af659cb7a08e0c 100644 --- a/integrations/docker/images/stage-2/chip-build-ameba/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-ameba/Dockerfile @@ -4,7 +4,7 @@ LABEL org.opencontainers.image.source https://github.com/project-chip/connectedh # Setup Ameba ARG AMEBA_DIR=/opt/ameba -ARG TAG_NAME=ameba_update_2023_06_28 +ARG TAG_NAME=ameba_update_2023_08_01 RUN set -x \ && apt-get update \ && mkdir ${AMEBA_DIR} \ diff --git a/integrations/docker/images/stage-2/chip-build-k32w/Dockerfile b/integrations/docker/images/stage-2/chip-build-k32w/Dockerfile index 42e1dde62a56d9..dd629a9824c6ee 100644 --- a/integrations/docker/images/stage-2/chip-build-k32w/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-k32w/Dockerfile @@ -11,15 +11,19 @@ RUN set -x \ && : # last line WORKDIR /opt/sdk -# Setup the K32W SDK + RUN set -x \ - && wget https://cache.nxp.com/lgfiles/bsps/SDK_2_6_11_K32W061DK6.zip \ - && unzip SDK_2_6_11_K32W061DK6.zip \ - && rm -rf SDK_2_6_11_K32W061DK6.zip \ + && python3 -m pip install -U --no-cache-dir west==1.0.0 \ + && west init -m https://github.com/nxp-mcuxpresso/mcux-sdk --mr "release/2.6.x_k32w0" \ + && west update \ + && chmod +x core/tools/imagetool/sign_images.sh \ + && ln -sf ../rtos core \ + && ln -sf ../middleware core \ + && cp -R examples/* core/boards && rm -rf examples \ && : # last line FROM ghcr.io/project-chip/chip-build:${VERSION} COPY --from=build /opt/sdk/ /opt/sdk/ -ENV NXP_K32W0_SDK_ROOT=/opt/sdk +ENV NXP_K32W0_SDK_ROOT=/opt/sdk/core diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index b6bb80b2ebe5c7..609400764e0c72 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -237,8 +237,8 @@ def BuildEfr32Target(): target.AppendModifier('rpc', enable_rpcs=True) target.AppendModifier('with-ota-requestor', enable_ota_requestor=True) - target.AppendModifier('sed', enable_sed=True) - target.AppendModifier('low-power', enable_low_power=True).OnlyIfRe('-sed') + target.AppendModifier('icd', enable_icd=True) + target.AppendModifier('low-power', enable_low_power=True).OnlyIfRe('-icd') target.AppendModifier('shell', chip_build_libshell=True) target.AppendModifier('no_logging', chip_logging=False) target.AppendModifier('openthread_mtd', chip_openthread_ftd=False) diff --git a/scripts/build/builders/efr32.py b/scripts/build/builders/efr32.py index e45574accd3894..990f44993eb55d 100644 --- a/scripts/build/builders/efr32.py +++ b/scripts/build/builders/efr32.py @@ -140,7 +140,7 @@ def __init__(self, show_qr_code: bool = False, enable_rpcs: bool = False, enable_ota_requestor: bool = False, - enable_sed: bool = False, + enable_icd: bool = False, enable_low_power: bool = False, enable_wifi: bool = False, enable_rs911x: bool = False, @@ -164,7 +164,7 @@ def __init__(self, if enable_ota_requestor: self.extra_gn_options.append('chip_enable_ota_requestor=true') - if enable_sed: + if enable_icd: self.extra_gn_options.append('chip_enable_icd_server=true chip_openthread_ftd=false') if enable_low_power: diff --git a/scripts/build/testdata/all_targets_linux_x64.txt b/scripts/build/testdata/all_targets_linux_x64.txt index db0d31ea145989..1ac764d6f1afb0 100644 --- a/scripts/build/testdata/all_targets_linux_x64.txt +++ b/scripts/build/testdata/all_targets_linux_x64.txt @@ -6,7 +6,7 @@ cc32xx-lock ti-cc13x2x7_26x2x7-{lighting,lock,pump,pump-controller}[-mtd] ti-cc13x4_26x4-{all-clusters,lighting,lock,pump,pump-controller}[-mtd][-ftd] cyw30739-cyw930739m2evb_01-{light,lock,ota-requestor,switch} -efr32-{brd4161a,brd4187c,brd4186c,brd4163a,brd4164a,brd4166a,brd4170a,brd4186a,brd4187a,brd4304a}-{window-covering,switch,unit-test,light,lock,thermostat,pump}[-rpc][-with-ota-requestor][-sed][-low-power][-shell][-no_logging][-openthread_mtd][-enable_heap_monitoring][-no_openthread_cli][-show_qr_code][-wifi][-rs911x][-wf200][-wifi_ipv4][-additional_data_advertising][-use_ot_lib][-use_ot_coap_lib][-no-version] +efr32-{brd4161a,brd4187c,brd4186c,brd4163a,brd4164a,brd4166a,brd4170a,brd4186a,brd4187a,brd4304a}-{window-covering,switch,unit-test,light,lock,thermostat,pump}[-rpc][-with-ota-requestor][-icd][-low-power][-shell][-no_logging][-openthread_mtd][-enable_heap_monitoring][-no_openthread_cli][-show_qr_code][-wifi][-rs911x][-wf200][-wifi_ipv4][-additional_data_advertising][-use_ot_lib][-use_ot_coap_lib][-no-version] esp32-{m5stack,c3devkit,devkitc,qemu}-{all-clusters,all-clusters-minimal,ota-provider,ota-requestor,shell,light,lock,bridge,temperature-measurement,ota-requestor,tests}[-rpc][-ipv6only] genio-lighting-app linux-fake-tests[-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-coverage][-dmalloc][-clang] 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 fa15e9d94ab800..a80c8a297d9fa8 100644 --- a/scripts/setup/constraints.txt +++ b/scripts/setup/constraints.txt @@ -379,7 +379,7 @@ wheel==0.38.4 ; sys_platform == "linux" # pip-tools # The following packages are considered to be unsafe in a requirements file: -pip==23.2 +pip==23.2.1 # via # fastcore # ghapi 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/chip_data_model.cmake b/src/app/chip_data_model.cmake index 8f0f7f82301cfc..63ebf1b4ef1eee 100644 --- a/src/app/chip_data_model.cmake +++ b/src/app/chip_data_model.cmake @@ -16,13 +16,6 @@ set(CHIP_APP_BASE_DIR ${CMAKE_CURRENT_LIST_DIR}) -if (NOT CHIP_ROOT) - # TODO: these are WORKAROUNDS and should be removed - if(DEFINED ameba_matter_root) - SET(CHIP_ROOT "${ameba_matter_root}") - endif() -endif() - include("${CHIP_ROOT}/build/chip/chip_codegen.cmake") # Configure ${APP_TARGET} with source files associated with ${CLUSTER} cluster 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/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 90b4796fef3c47..9078702fb983e9 100644 --- a/src/app/tests/BUILD.gn +++ b/src/app/tests/BUILD.gn @@ -78,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", @@ -133,6 +145,7 @@ chip_test_suite("tests") { "TestNumericAttributeTraits.cpp", "TestOperationalStateDelegate.cpp", "TestPendingNotificationMap.cpp", + "TestPowerSourceCluster.cpp", "TestReadInteraction.cpp", "TestReportingEngine.cpp", "TestSceneTable.cpp", @@ -183,6 +196,7 @@ 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", 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 88571b040e866d..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; @@ -1918,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); { @@ -1983,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; @@ -1995,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); @@ -2015,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); @@ -2034,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); @@ -2053,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; @@ -2117,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); @@ -2138,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); @@ -2163,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; @@ -2204,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); @@ -2377,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; @@ -2391,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); @@ -2401,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; @@ -2423,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 @@ -2497,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; @@ -2510,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); @@ -2578,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; @@ -2588,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); @@ -2705,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(); @@ -2848,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; @@ -2885,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; @@ -2896,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(); @@ -3221,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; @@ -3251,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; @@ -3324,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; @@ -3354,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; @@ -3425,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; @@ -3460,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. @@ -4736,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); @@ -4753,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); 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/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/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/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/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/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/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/include/platform/DeviceInstanceInfoProvider.h b/src/include/platform/DeviceInstanceInfoProvider.h index c072df6b55a999..66f8599de1ba84 100644 --- a/src/include/platform/DeviceInstanceInfoProvider.h +++ b/src/include/platform/DeviceInstanceInfoProvider.h @@ -29,6 +29,19 @@ class DeviceInstanceInfoProvider DeviceInstanceInfoProvider() = default; virtual ~DeviceInstanceInfoProvider() = default; + /** + * @brief Obtain the Device Name from the device's factory data. + * + * @param[out] buf Buffer to copy string. + * On CHIP_NO_ERROR return from this function this buffer will be null-terminated. + * On error CHIP_ERROR_BUFFER_TOO_SMALL there is no guarantee that buffer will be null-terminated. + * @param[in] bufSize Size of data, including the null terminator, that can be written to buf. + * This size should be +1 higher than maximum possible string. + * @returns CHIP_NO_ERROR on success, or another CHIP_ERROR from the underlying implementation + * if access fails. + */ + virtual CHIP_ERROR GetDeviceName(char * buf, size_t bufSize) = 0; + /** * @brief Obtain the Vendor Name from the device's factory data. * diff --git a/src/include/platform/internal/GenericConfigurationManagerImpl.ipp b/src/include/platform/internal/GenericConfigurationManagerImpl.ipp index ca7d27ae47b332..ff8bc3947a92a8 100644 --- a/src/include/platform/internal/GenericConfigurationManagerImpl.ipp +++ b/src/include/platform/internal/GenericConfigurationManagerImpl.ipp @@ -635,9 +635,7 @@ bool GenericConfigurationManagerImpl::IsCommissionableDeviceNameEna template CHIP_ERROR GenericConfigurationManagerImpl::GetCommissionableDeviceName(char * buf, size_t bufSize) { - ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_DEVICE_NAME), CHIP_ERROR_BUFFER_TOO_SMALL); - strcpy(buf, CHIP_DEVICE_CONFIG_DEVICE_NAME); - return CHIP_NO_ERROR; + return GetDeviceInstanceInfoProvider()->GetDeviceName(buf, bufSize); } template diff --git a/src/include/platform/internal/GenericDeviceInstanceInfoProvider.h b/src/include/platform/internal/GenericDeviceInstanceInfoProvider.h index 831b49a0037e7e..3ba655d2d1f8da 100644 --- a/src/include/platform/internal/GenericDeviceInstanceInfoProvider.h +++ b/src/include/platform/internal/GenericDeviceInstanceInfoProvider.h @@ -41,6 +41,7 @@ class GenericDeviceInstanceInfoProvider : public DeviceInstanceInfoProvider mGenericConfigManager(configManager) {} + CHIP_ERROR GetDeviceName(char * buf, size_t bufSize) override; CHIP_ERROR GetVendorName(char * buf, size_t bufSize) override; CHIP_ERROR GetVendorId(uint16_t & vendorId) override; CHIP_ERROR GetProductName(char * buf, size_t bufSize) override; diff --git a/src/include/platform/internal/GenericDeviceInstanceInfoProvider.ipp b/src/include/platform/internal/GenericDeviceInstanceInfoProvider.ipp index 549c3eb360aa95..4cb1672c890699 100644 --- a/src/include/platform/internal/GenericDeviceInstanceInfoProvider.ipp +++ b/src/include/platform/internal/GenericDeviceInstanceInfoProvider.ipp @@ -21,6 +21,15 @@ namespace chip { namespace DeviceLayer { namespace Internal { +template +CHIP_ERROR GenericDeviceInstanceInfoProvider::GetDeviceName(char * buf, size_t bufSize) +{ + ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_DEVICE_NAME), CHIP_ERROR_BUFFER_TOO_SMALL); + strcpy(buf, CHIP_DEVICE_CONFIG_DEVICE_NAME); + + return CHIP_NO_ERROR; +} + template CHIP_ERROR GenericDeviceInstanceInfoProvider::GetVendorId(uint16_t & vendorId) { diff --git a/src/lib/core/CHIPConfig.h b/src/lib/core/CHIPConfig.h index 80b3d18cfe410f..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 * 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/AndroidConfig.cpp b/src/platform/android/AndroidConfig.cpp index b2e33571598e64..5b3dafa378e412 100644 --- a/src/platform/android/AndroidConfig.cpp +++ b/src/platform/android/AndroidConfig.cpp @@ -60,6 +60,7 @@ const char AndroidConfig::kConfigNamespace_ChipCounters[] = "chip-counters"; // Keys stored in the Chip-factory namespace const AndroidConfig::Key AndroidConfig::kConfigKey_SerialNum = { kConfigNamespace_ChipFactory, "serial-num" }; +const AndroidConfig::Key AndroidConfig::kConfigKey_MfrDeviceName = { kConfigNamespace_ChipFactory, "device-name" }; const AndroidConfig::Key AndroidConfig::kConfigKey_MfrDeviceId = { kConfigNamespace_ChipFactory, "device-id" }; const AndroidConfig::Key AndroidConfig::kConfigKey_MfrDeviceCert = { kConfigNamespace_ChipFactory, "device-cert" }; const AndroidConfig::Key AndroidConfig::kConfigKey_MfrDeviceICACerts = { kConfigNamespace_ChipFactory, "device-ca-certs" }; diff --git a/src/platform/android/AndroidConfig.h b/src/platform/android/AndroidConfig.h index d6f446d0fc4ee6..81bc492e62a5db 100644 --- a/src/platform/android/AndroidConfig.h +++ b/src/platform/android/AndroidConfig.h @@ -54,6 +54,7 @@ class AndroidConfig // Key definitions for well-known keys. static const Key kConfigKey_SerialNum; + static const Key kConfigKey_MfrDeviceName; static const Key kConfigKey_MfrDeviceId; static const Key kConfigKey_MfrDeviceCert; static const Key kConfigKey_MfrDeviceICACerts; diff --git a/src/platform/android/DeviceInstanceInfoProviderImpl.cpp b/src/platform/android/DeviceInstanceInfoProviderImpl.cpp index cd07215c378e74..48ced6294b3d11 100644 --- a/src/platform/android/DeviceInstanceInfoProviderImpl.cpp +++ b/src/platform/android/DeviceInstanceInfoProviderImpl.cpp @@ -73,6 +73,20 @@ CHIP_ERROR DeviceInstanceInfoProviderImpl::GetProductLabel(char * buf, size_t bu return Internal::AndroidConfig::ReadConfigValueStr(Internal::AndroidConfig::kConfigKey_ProductLabel, buf, bufSize, dateLen); } +CHIP_ERROR DeviceInstanceInfoProviderImpl::GetDeviceName(char * buf, size_t bufSize) +{ + CHIP_ERROR err; + size_t deviceNameSize = 0; // without counting null-terminator + err = Internal::AndroidConfig::ReadConfigValueStr(Internal::AndroidConfig::kConfigKey_MfrDeviceName, buf, bufSize, + deviceNameSize); + if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) + { + ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_DEVICE_NAME), CHIP_ERROR_BUFFER_TOO_SMALL); + strcpy(buf, CHIP_DEVICE_CONFIG_DEVICE_NAME); + } + return CHIP_NO_ERROR; +} + CHIP_ERROR DeviceInstanceInfoProviderImpl::GetProductName(char * buf, size_t bufSize) { CHIP_ERROR err; diff --git a/src/platform/android/DeviceInstanceInfoProviderImpl.h b/src/platform/android/DeviceInstanceInfoProviderImpl.h index 489861d502fbce..1fd5592809370e 100644 --- a/src/platform/android/DeviceInstanceInfoProviderImpl.h +++ b/src/platform/android/DeviceInstanceInfoProviderImpl.h @@ -27,6 +27,7 @@ namespace DeviceLayer { class DeviceInstanceInfoProviderImpl : public Internal::GenericDeviceInstanceInfoProvider { public: + CHIP_ERROR GetDeviceName(char * buf, size_t bufSize) override; CHIP_ERROR GetProductName(char * buf, size_t bufSize) override; CHIP_ERROR GetProductId(uint16_t & productId) override; CHIP_ERROR GetPartNumber(char * buf, size_t bufSize) override; 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/android/java/chip/platform/ConfigurationManager.java b/src/platform/android/java/chip/platform/ConfigurationManager.java index b05b061e757c36..dcc4aeb589044e 100644 --- a/src/platform/android/java/chip/platform/ConfigurationManager.java +++ b/src/platform/android/java/chip/platform/ConfigurationManager.java @@ -26,6 +26,7 @@ public interface ConfigurationManager { // Keys stored in the Chip-factory namespace String kConfigKey_SerialNum = "serial-num"; + String kConfigKey_MfrDeviceName = "device-name"; String kConfigKey_MfrDeviceId = "device-id"; String kConfigKey_MfrDeviceCert = "device-cert"; String kConfigKey_MfrDeviceICACerts = "device-ca-certs"; 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 e0b699d8373498..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,16 +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.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.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") diff --git a/src/python_testing/TC_RVCRUNM_2_1.py b/src/python_testing/TC_RVCRUNM_2_1.py index 1ef5cefe6525e6..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,16 +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.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.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") diff --git a/third_party/silabs/efr32_sdk.gni b/third_party/silabs/efr32_sdk.gni index 579cc1df7ede98..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 @@ -329,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 @@ -374,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", diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 0ab94dafd7c628..d157cf5183082c 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -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 5f4ad1bcda5777..e753c024da9f07 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -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");